@LabelIndex 396932
@StringIndex 59310
class 0 harlkil_q0236a : citizen {
handler:
	EventHandler TALK_SELECTED(c0,fhtml0,npc0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 22 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Seeds of Chaos (In Progress)");
			}
			if( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 30 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Seeds of Chaos (In Progress)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 22 ) ) {
						myself::SetCurrentQuestID(236);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) ) {
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						c0 = gg::GetCreatureFromIndex(myself.sm.param1);
						npc0 = gg::GetNPCFromID(myself.sm.param3);
						if( talker == c0 ) {
							myself::ShowPage(talker,"harlkil_q0236a_q0236_08.htm");
						} else {
							myself::ShowPage(talker,"harlkil_q0236a_q0236_09.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 30 ) ) {
						myself::SetCurrentQuestID(236);
						if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) ) {
							myself::ShowSystemMessage(talker,1118);
							return;
						}
						myself::ShowPage(talker,"harlkil_q0236a_q0236_18.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(c0,npc0,timer_id) {
		myself::SetCurrentQuestID(236);
		if( timer_id == 23615 ) {
			npc0 = gg::GetNPCFromID(myself.sm.param3);
			if( gg::IsNull(npc0) == 0 ) {
				if( npc0.i_quest0 == 1 ) {
					npc0.i_quest0 = 0;
					myself::Say(gg::MakeFString(23686,"","","","",""));
				}
			}
			myself::Despawn();
		}
		super;
	}

	EventHandler CREATED(c0,c1,i0) {
		myself::SetCurrentQuestID(236);
		c0 = gg::GetCreatureFromIndex(myself.sm.param1);
		myself::AddTimerEx(23615,( 1000 * 120 ));
		if( gg::IsNull(c0) == 0 ) {
			myself::Say(gg::MakeFString(23685,c0.name,"","","",""));
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,c0,npc0,reply,talker) {
		if( ask == 236 ) {
			myself::SetCurrentQuestID(236);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) ) {
				myself::ShowSystemMessage(talker,1118);
				return;
			}
		}
		if( ask == 236 ) {
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 22 ) {
					c0 = gg::GetCreatureFromIndex(myself.sm.param1);
					if( talker == c0 ) {
						myself::DeleteItem1(talker,9743,gg::OwnItemCount(talker,9743));
						myself::SetMemoState(talker,236,30);
						myself::ShowPage(talker,"harlkil_q0236a_q0236_17.htm");
						myself::SetFlagJournal(talker,236,14);
						myself::ShowQuestMark(talker,236);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
			if( reply == 5 ) {
				if( gg::HaveMemo(talker,236) == 1 && gg::GetMemoState(talker,236) == 30 ) {
					c0 = gg::GetCreatureFromIndex(myself.sm.param1);
					npc0 = gg::GetNPCFromID(myself.sm.param3);
					if( talker == c0 ) {
						if( gg::IsNull(npc0) == 0 ) {
							npc0.i_quest0 = 0;
						}
						myself::Say(gg::MakeFString(23687,"","","","",""));
						myself::Despawn();
					}
				}
			}
		}
		super;
	}

}
