@LabelIndex 101897
@StringIndex 11785
class 0 npc_downtown_native : default_npc {
parameter:
	string	fnHi = "downtown_native001.htm";
	string	fnHi2 = "downtown_native002.htm";
	int	Skill01_ID = 302514177;
	int	FieldCycle = 1;
	int	FieldCycle_Condition = 104;
	int	FieldCycle_Quantity = 10;
	int	Threshold_Level_Min = 10;
	int	Threshold_Level_Max = 10;
	int	Threshold_Point_Min = -1;
	int	Threshold_Point_Max = 1000000000;

handler:
	EventHandler CREATED() {
		myself.i_ai0 = 0;
		myself::AddUseSkillDesire(myself.sm,Skill01_ID,0,1,10000000000);
		myself::AddTimerEx(78002,( 357 * 1000 ));
		super;
	}

	EventHandler TALKED(talker,ask,reply,i0) {
		if( myself.i_ai0 == 0 ) {
			myself::ShowPage(talker,fnHi);
		} else {
			myself::ShowPage(talker,fnHi2);
		}
	}

	EventHandler MENU_SELECTED(talker,ask,reply,maker0,i0,i1) {
		if( ask == -7801 ) {
			if( reply == 1 ) {
				if( myself.i_ai0 == 0 ) {
					myself::Say(gg::MakeFString(1000503,"","","","","") + " " + gg::MakeFString(1800120,"","","","",""));
					myself::Dispel(myself.sm,myself::Skill_GetAbnormalType(Skill01_ID));
					myself::BroadcastScriptEvent(78010001,gg::GetIndexFromCreature(myself.sm),5000);
					myself::AddTimerEx(78001,( 3 * 1000 ));
					myself.i_ai0 = 1;
					if( FieldCycle != -1 && FieldCycle_Condition == 104 ) {
						i0 = gg::GetStep_FieldCycle(FieldCycle);
						i1 = gg::GetPoint_FieldCycle(FieldCycle);
						if( i0 >= Threshold_Level_Min && i0 <= Threshold_Level_Max ) {
							if( i1 >= Threshold_Point_Min && i1 <= Threshold_Point_Max ) {
								gg::AddPoint_FieldCycle(FieldCycle,FieldCycle_Quantity,1,talker);
							}
						}
					}
				} else {
					myself::Say(gg::MakeFString(1000503,"","","","","") + " " + gg::MakeFString(1800121,"","","","",""));
				}
			}
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,i0,i1) {
		if( script_event_arg1 == 78010029 ) {
			myself.i_ai0 = 1;
		}
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 78001 ) {
			myself::Despawn();
		} else if( timer_id == 78002 ) {
			if( myself.i_ai0 == 0 ) {
				myself::AddUseSkillDesire(myself.sm,Skill01_ID,0,1,10000000);
			}
		}
	}

}
