class 1 hall_alarm_device : (null)
{
parameter:
	int	GM_ID = 24;
	int	GM_ID1 = 25;
	int	Timer = 1;

handler:
	EventHandler CREATED()
	{
		myself::RegisterGlobalMap(GM_ID,myself::GetIndexFromCreature(myself.sm));
		myself::Castle_GateOpenClose2("Godad_fritezza_door01a",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01b",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01c",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01d",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01e",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01f",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01g",1);
		myself::Castle_GateOpenClose2("Godad_fritezza_door01h",1);
		maker0 = gg::GetNpcMaker("hall_keeper");
		gg::SendMakerScriptEvent(maker0,10011,0,0);
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2)
	{
		myself::UnregisterGlobalMap(GM_ID);
		maker0 = gg::GetNpcMaker("hall_keeper");
		gg::SendMakerScriptEvent(maker0,10000,0,0);
		myself::Despawn();
	}

	EventHandler MY_DYING()
	{
		myself::UnregisterGlobalMap(GM_ID);
		i0 = myself::GetGlobalMap(GM_ID1);
		if( i0 == -1 )
		{
			myself::CreateOnePrivateEx(1018337,"undeadband_member_archer",0,0,174106,-81762,-5050,0,0,0,0);
			myself::CreateOnePrivateEx(1018339,"dark_choir_player",0,0,174106,-81762,-5050,0,0,0,0);
			maker0 = gg::GetNpcMaker("hall_keeper");
			gg::SendMakerScriptEvent(maker0,10000,0,0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01a",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01b",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01c",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01d",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01e",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01f",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01g",0);
			myself::Castle_GateOpenClose2("Godad_fritezza_door01h",0);
		}
	}

}
