@LabelIndex 401515
@StringIndex 60126
class 0 silen_priest_relrikia : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Birth of the Seed (in progress)");
			}
			if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 11 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Birth of the Seed (in progress)");
			}
			if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Light Fragment (in progress)");
			}
			if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 11 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Light Fragment (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,10270) == 1 && gg::GetMemoState(talker,10270) == 10 ) ) {
						myself::SetCurrentQuestID(10270);
						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,"silen_priest_relrikia_q10270_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 11 ) ) {
						myself::SetCurrentQuestID(10270);
						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,"silen_priest_relrikia_q10270_06.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 10 ) ) {
						myself::SetCurrentQuestID(10272);
						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,"silen_priest_relrikia_q10272_01.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 11 ) ) {
						myself::SetCurrentQuestID(10272);
						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,"silen_priest_relrikia_q10272_05.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 10270 ) {
			myself::SetCurrentQuestID(10270);
			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 == 10270 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 10 ) {
					myself::ShowPage(talker,"silen_priest_relrikia_q10270_02.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 10 ) {
					myself::ShowPage(talker,"silen_priest_relrikia_q10270_03.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 10 ) {
					myself::SetMemoState(talker,10270,11);
					myself::ShowPage(talker,"silen_priest_relrikia_q10270_05.htm");
					myself::SetFlagJournal(talker,10270,5);
					myself::ShowQuestMark(talker,10270);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,10270) == 1 && gg::GetMemoState(talker,10270) == 11 ) {
					myself::SetMemoState(talker,10270,20);
					myself::ShowPage(talker,"silen_priest_relrikia_q10270_07.htm");
					myself::InstantZone_Leave(talker);
				}
			}
		}
		if( ask == 10272 ) {
			myself::SetCurrentQuestID(10272);
			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 == 10272 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 10 ) {
					myself::ShowPage(talker,"silen_priest_relrikia_q10272_02.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 10 ) {
					myself::ShowPage(talker,"silen_priest_relrikia_q10272_03.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 10 ) {
					myself::SetMemoState(talker,10272,11);
					myself::ShowPage(talker,"silen_priest_relrikia_q10272_04.htm");
					myself::SetFlagJournal(talker,10272,4);
					myself::ShowQuestMark(talker,10272);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,10272) == 1 && gg::GetMemoState(talker,10272) == 11 ) {
					myself::SetMemoState(talker,10272,20);
					myself::ShowPage(talker,"silen_priest_relrikia_q10272_06.htm");
					myself::InstantZone_Leave(talker);
				}
			}
		}
		super;
	}

}
