@LabelIndex 139265
@StringIndex 17911
class 0 us1_battle_manager_b : default_npc {
parameter:
	string	my_maker1 = "rumwarsha13_1424_1101";
	string	my_maker2 = "rumwarsha13_1424_1102";
	string	my_maker3 = "rumwarsha13_1424_1103";
	string	my_maker4 = "rumwarsha13_1424_1104";
	string	my_maker5 = "rumwarsha13_1424_1105";
	string	my_maker6 = "rumwarsha13_1424_1106";
	string	tumor_maker1 = "rumwarsha13_1424_1801";
	string	tumor_maker2 = "rumwarsha13_1424_1802";
	int	start_time = 0;
	int	now_time = 0;
	int	loc_x = -173703;
	int	loc_y = 218097;
	int	loc_z = -9528;

handler:
	EventHandler CREATED(maker0,i0,maker1) {
		myself.i_ai0 = 0;
		myself.i_ai1 = 0;
		myself.i_ai2 = 0;
		myself.i_ai0 = myself::GetCurrentTick();
		myself::AddTimerEx(1001,1000);
		myself::AddTimerEx(1003,( 60 * 1000 ));
		maker1 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),tumor_maker2);
		if( gg::IsNull(maker1) == 0 ) {
			gg::SendMakerScriptEvent(maker1,1001,0,0);
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id,i0,maker0) {
		if( timer_id == 1001 ) {
			i0 = myself::GetCurrentTick();
			myself.i_ai1 = ( i0 - myself.i_ai0 );
			myself::AddTimerEx(1001,1000);
		} else if( timer_id == 1003 ) {
			i0 = myself::InstantZone_GetId();
			maker0 = gg::InstantZone_GetNpcMaker(i0,my_maker1);
			if( gg::IsNull(maker0) == 0 ) {
				gg::SendMakerScriptEvent(maker0,1001,0,0);
			}
		}
	}

	EventHandler SEE_CREATURE(creature,i0,i1) {
		if( creature.is_pc == 1 ) {
			if( myself.i_ai1 >= 60 ) {
				i0 = gg::FloatToInt(( myself.i_ai1 / 60 ));
				i1 = ( myself.i_ai1 - ( i0 * 60 ) );
			} else if( myself.i_ai1 < 60 ) {
				i0 = 0;
				i1 = myself.i_ai1;
			}
			gg::SendUIEvent(creature,0,0,0,"1",gg::IntToStr(i0),gg::IntToStr(i1),"ˆˆ: ","60","0");
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,c0,maker0) {
		if( script_event_arg1 == 989809 ) {
			switch(script_event_arg2) {
				case 1: {
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),my_maker2);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,1001,gg::GetIndexFromCreature(myself.sm),0);
					}
					break;
				}
				case 2: {
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),my_maker3);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,1001,gg::GetIndexFromCreature(myself.sm),0);
					}
					break;
				}
				case 3: {
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),my_maker4);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,1001,gg::GetIndexFromCreature(myself.sm),0);
					}
					break;
				}
				case 4: {
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),my_maker5);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,1001,gg::GetIndexFromCreature(myself.sm),0);
					}
					break;
				}
				case 5: {
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),my_maker6);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,1001,gg::GetIndexFromCreature(myself.sm),0);
					}
					break;
				}
				case 3001: {
					myself::CreateOnePrivateEx(1032530,"ai_is_time_attack_reward",0,0,loc_x,loc_y,loc_z,0,myself.i_ai1,1,0);
					myself::InstantZone_Finish(5);
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),tumor_maker1);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,998916,0,0);
					}
					maker0 = gg::InstantZone_GetNpcMaker(myself::InstantZone_GetId(),tumor_maker2);
					if( gg::IsNull(maker0) == 0 ) {
						gg::SendMakerScriptEvent(maker0,998916,0,0);
					}
					break;
				}
			}
		}
	}

}
