@LabelIndex 377530
@StringIndex 55463
class 0 lady_of_the_lake : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Path of the Noblesse, Precious Soul - 4 (In Progress)");
			}
			if( myself::GetOneTimeQuestFlag(talker,247) == 1 && gg::OwnItemCount(talker,7694) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Path of the Noblesse, Precious Soul - 4 (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,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) ) {
						myself::SetCurrentQuestID(247);
						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,"lady_of_the_lake_q0247_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( myself::GetOneTimeQuestFlag(talker,247) == 1 && gg::OwnItemCount(talker,7694) == 0 ) ) {
						myself::SetCurrentQuestID(247);
						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::GiveItem1(talker,7694,1);
						myself::ShowPage(talker,"lady_of_the_lake_q0247_07.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 247 ) {
			myself::SetCurrentQuestID(247);
			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 == 247 ) {
			if( reply == 1 && gg::HaveMemo(talker,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) {
				myself::ShowPage(talker,"lady_of_the_lake_q0247_02.htm");
			}
			if( reply == 2 && gg::HaveMemo(talker,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) {
				myself::ShowPage(talker,"lady_of_the_lake_q0247_03.htm");
			}
			if( reply == 3 && gg::HaveMemo(talker,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) {
				myself::ShowPage(talker,"lady_of_the_lake_q0247_04.htm");
			}
			if( reply == 4 && gg::HaveMemo(talker,247) == 1 && gg::GetMemoState(talker,247) == 2 && talker.subjob_id != 0 && myself::GetOneTimeQuestFlag(talker,247) == 0 ) {
				if( talker.level >= 75 && talker.subjob_id != 0 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7694,1);
						myself::IncrementParam(talker,0,93836);
						myself::RemoveMemo(talker,247);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::ShowPage(talker,"lady_of_the_lake_q0247_05.htm");
						gg::AddLog(2,talker,247);
						myself::SetOneTimeQuestFlag(talker,247,1);
						myself::AddUseSkillDesire(talker,284360705,0,0,1000000);
						gg::AddPCSocial(gg::GetIndexFromCreature(talker),3);
						myself::SetNobless(talker);
					}
				} else {
					myself::ShowPage(talker,"lady_of_the_lake_q0247_06.htm");
				}
			}
		}
		super;
	}

}
