@LabelIndex 395754
@StringIndex 59029
class 0 future_door_cont : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Into the Large Cavern (In Progress)");
			}
			if( myself::GetOneTimeQuestFlag(talker,179) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Into the Large Cavern (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,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) ) {
						myself::SetCurrentQuestID(179);
						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,"future_door_cont_q0179_01.htm");
						myself::SetMemoStateEx(talker,179,1,0);
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || myself::GetOneTimeQuestFlag(talker,179) == 1 ) {
						myself::SetCurrentQuestID(179);
						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,"future_door_cont_q0179_02.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,i0,reply,talker) {
		if( ask == 179 ) {
			myself::SetCurrentQuestID(179);
			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 == 179 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
					myself::ShowPage(talker,"future_door_cont_q0179_03.htm");
					myself::SetMemoStateEx(talker,179,1,0);
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
					i0 = gg::GetMemoStateEx(talker,179,1);
					myself::SetMemoStateEx(talker,179,1,( i0 + 1 ));
					myself::ShowPage(talker,"future_door_cont_q0179_04.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
					i0 = gg::GetMemoStateEx(talker,179,1);
					myself::SetMemoStateEx(talker,179,1,( i0 + 10 ));
					myself::ShowPage(talker,"future_door_cont_q0179_05.htm");
				}
			}
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
					i0 = gg::GetMemoStateEx(talker,179,1);
					myself::SetMemoStateEx(talker,179,1,( i0 + 100 ));
					myself::ShowPage(talker,"future_door_cont_q0179_06.htm");
				}
			}
			if( reply == 5 ) {
				if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 && myself::GetOneTimeQuestFlag(talker,179) == 0 ) {
					i0 = gg::GetMemoStateEx(talker,179,1);
					myself::SetMemoStateEx(talker,179,1,( i0 + 1000 ));
					myself::ShowPage(talker,"future_door_cont_q0179_07.htm");
				}
			}
			if( reply == 6 ) {
				if( myself::GetOneTimeQuestFlag(talker,179) == 1 ) {
					i0 = myself::InstantZone_GetId();
					gg::Castle_GateOpenCloseEx("future_door",0,i0);
					myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(17953,"","","","",""));
					gg::BroadcastOnScreenMsgStr(myself.sm,1500,2,0,0,0,0,1,10000,0,gg::MakeFString(17953,"","","","",""));
				} else if( gg::HaveMemo(talker,179) == 1 && gg::GetMemoState(talker,179) == 1 ) {
					if( gg::GetMemoStateEx(talker,179,1) == 1111 ) {
						gg::BroadcastOnScreenMsgStr(myself.sm,1500,2,0,0,0,0,1,10000,0,gg::MakeFString(17953,"","","","",""));
						myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(17953,"","","","",""));
						i0 = myself::InstantZone_GetId();
						gg::Castle_GateOpenCloseEx("future_door",0,i0);
						myself::SetMemoStateEx(talker,179,1,0);
					} else if( gg::GetMemoStateEx(talker,179,1) != 1111 ) {
						myself::ShowPage(talker,"future_door_cont_q0179_08.htm");
					}
				}
			}
		}
		super;
	}

}
