@LabelIndex 396301
@StringIndex 59167
class 0 parme_131y : ai_parme {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,131) == 1 && gg::GetMemoState(talker,131) < 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Bird in a Cage (In Progress)");
			}
			if( gg::HaveMemo(talker,131) == 1 && gg::GetMemoState(talker,131) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Bird in a Cage (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,131) == 1 && gg::GetMemoState(talker,131) < 3 ) ) {
						myself::SetCurrentQuestID(131);
						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,"parme_131y_q0131_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,131) == 1 && gg::GetMemoState(talker,131) == 3 ) ) {
						myself::SetCurrentQuestID(131);
						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,"parme_131y_q0131_02.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 131 ) {
			myself::SetCurrentQuestID(131);
			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 == 131 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,131) == 1 && gg::GetMemoState(talker,131) == 3 ) {
					myself::ShowPage(talker,"parme_131y_q0131_03.htm");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,131) >= 1 && gg::GetMemoState(talker,131) == 3 ) {
					myself::ShowPage(talker,"parme_131y_q0131_04.htm");
					myself::GiveItem1(talker,9784,1);
					myself::SetMemoState(talker,131,4);
					myself::SetFlagJournal(talker,131,3);
					myself::ShowQuestMark(talker,131);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::InstantZone_Leave(talker);
				}
			}
		}
		super;
	}

}
