@LabelIndex 399547
@StringIndex 59784
class 0 kirklan : npc_seed_trader {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) < 1 && gg::OwnItemCount(talker,13865) < 1 && gg::OwnItemCount(talker,13866) < 1 && gg::OwnItemCount(talker,13867) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"How to Oppose Evil (in progress)");
			}
			if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && ( gg::OwnItemCount(talker,13863) >= 1 || gg::OwnItemCount(talker,13865) >= 1 || gg::OwnItemCount(talker,13866) >= 1 || gg::OwnItemCount(talker,13867) >= 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"How to Oppose Evil (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,692) == 1 && gg::GetMemoState(talker,692) == 2 ) ) {
						myself::SetCurrentQuestID(692);
						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,"kirklan_q0692_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) < 1 && gg::OwnItemCount(talker,13865) < 1 && gg::OwnItemCount(talker,13866) < 1 && gg::OwnItemCount(talker,13867) < 1 ) ) {
						myself::SetCurrentQuestID(692);
						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,"kirklan_q0692_03.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && ( gg::OwnItemCount(talker,13863) >= 1 || gg::OwnItemCount(talker,13865) >= 1 || gg::OwnItemCount(talker,13866) >= 1 || gg::OwnItemCount(talker,13867) >= 1 ) ) ) {
						myself::SetCurrentQuestID(692);
						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,"kirklan_q0692_04.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 692 ) {
			myself::SetCurrentQuestID(692);
			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 == 692 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 2 ) {
					myself::SetMemoState(talker,692,3);
					myself::ShowPage(talker,"kirklan_q0692_02.htm");
					myself::SetFlagJournal(talker,692,3);
					myself::ShowQuestMark(talker,692);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 10 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) >= 5 ) {
					myself::GiveItem1(talker,13796,1);
					myself::DeleteItem1(talker,13863,5);
					myself::ShowPage(talker,"kirklan_q0692_05.htm");
					gg::AddLog(3,talker,692);
				} else if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13863) < 5 ) {
					myself::ShowPage(talker,"kirklan_q0692_06.htm");
				}
			}
			if( reply == 12 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13865) >= 5 ) {
					myself::GiveItem1(talker,13841,1);
					myself::DeleteItem1(talker,13865,5);
					myself::ShowPage(talker,"kirklan_q0692_09.htm");
					gg::AddLog(3,talker,692);
				} else if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13865) < 5 ) {
					myself::ShowPage(talker,"kirklan_q0692_10.htm");
				}
			}
			if( reply == 20 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13866) >= 1 ) {
					myself::GiveItem1(talker,57,( gg::OwnItemCount(talker,13866) * 288 ));
					myself::DeleteItem1(talker,13866,gg::OwnItemCount(talker,13866));
					myself::ShowPage(talker,"kirklan_q0692_11.htm");
					gg::AddLog(3,talker,692);
				} else if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13866) < 1 ) {
					myself::ShowPage(talker,"kirklan_q0692_12.htm");
				}
			}
			if( reply == 21 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13867) >= 1 ) {
					myself::GiveItem1(talker,57,( gg::OwnItemCount(talker,13867) * 288 ));
					myself::DeleteItem1(talker,13867,gg::OwnItemCount(talker,13867));
					myself::ShowPage(talker,"kirklan_q0692_13.htm");
					gg::AddLog(3,talker,692);
				} else if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 && gg::OwnItemCount(talker,13867) < 1 ) {
					myself::ShowPage(talker,"kirklan_q0692_14.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 ) {
					myself::ShowPage(talker,"kirklan_q0692_15.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,692) == 1 && gg::GetMemoState(talker,692) == 3 ) {
					myself::RemoveMemo(talker,692);
					myself::SoundEffect(talker,"ItemSound.quest_finish");
					gg::AddLog(2,talker,692);
					myself::ShowPage(talker,"kirklan_q0692_16.htm");
				}
			}
		}
		super;
	}

}
