@LabelIndex 298254
@StringIndex 40022
class 0 prefect_chakiris : fighter_coach {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( ( gg::HaveMemo(talker,337) == 1 && ( gg::GetMemoState(talker,337) == 21101 || gg::GetMemoState(talker,337) == 21000 || gg::GetMemoState(talker,337) == 21100 || gg::GetMemoState(talker,337) == 21001 || gg::GetMemoState(talker,337) == 20101 || gg::GetMemoState(talker,337) == 20100 || gg::GetMemoState(talker,337) == 20001 || gg::GetMemoState(talker,337) == 20000 ) ) && ( gg::OwnItemCount(talker,3855) == 0 || gg::OwnItemCount(talker,3856) == 0 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Audience with the Land Dragon  (In Progress)");
			}
			if( ( ( gg::HaveMemo(talker,337) == 1 && ( gg::GetMemoState(talker,337) == 21101 || gg::GetMemoState(talker,337) == 21100 || gg::GetMemoState(talker,337) == 21001 || gg::GetMemoState(talker,337) == 21000 || gg::GetMemoState(talker,337) == 20101 || gg::GetMemoState(talker,337) == 20100 || gg::GetMemoState(talker,337) == 20001 || gg::GetMemoState(talker,337) == 20000 ) ) && gg::OwnItemCount(talker,3855) == 1 ) && gg::OwnItemCount(talker,3856) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Audience with the Land Dragon  (In Progress)");
			}
			if( gg::HaveMemo(talker,337) == 1 && ( gg::GetMemoState(talker,337) == 21110 || gg::GetMemoState(talker,337) == 21011 || gg::GetMemoState(talker,337) == 21010 || gg::GetMemoState(talker,337) == 20111 || gg::GetMemoState(talker,337) == 20110 || gg::GetMemoState(talker,337) == 20011 || gg::GetMemoState(talker,337) == 20010 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Audience with the Land Dragon  (In Progress)");
			}
			if( gg::HaveMemo(talker,337) == 1 && gg::GetMemoState(talker,337) >= 30000 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Audience with the Land Dragon  (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,337) == 1 && ( gg::GetMemoState(talker,337) == 21101 || gg::GetMemoState(talker,337) == 21000 || gg::GetMemoState(talker,337) == 21100 || gg::GetMemoState(talker,337) == 21001 || gg::GetMemoState(talker,337) == 20101 || gg::GetMemoState(talker,337) == 20100 || gg::GetMemoState(talker,337) == 20001 || gg::GetMemoState(talker,337) == 20000 ) ) && ( gg::OwnItemCount(talker,3855) == 0 || gg::OwnItemCount(talker,3856) == 0 ) ) ) {
						myself::SetCurrentQuestID(337);
						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,"prefect_chakiris_q0337_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( ( ( gg::HaveMemo(talker,337) == 1 && ( gg::GetMemoState(talker,337) == 21101 || gg::GetMemoState(talker,337) == 21100 || gg::GetMemoState(talker,337) == 21001 || gg::GetMemoState(talker,337) == 21000 || gg::GetMemoState(talker,337) == 20101 || gg::GetMemoState(talker,337) == 20100 || gg::GetMemoState(talker,337) == 20001 || gg::GetMemoState(talker,337) == 20000 ) ) && gg::OwnItemCount(talker,3855) == 1 ) && gg::OwnItemCount(talker,3856) == 1 ) ) {
						myself::SetCurrentQuestID(337);
						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( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::GiveItem1(talker,3864,1);
							myself::DeleteItem1(talker,3855,gg::OwnItemCount(talker,3855));
							myself::DeleteItem1(talker,3856,gg::OwnItemCount(talker,3856));
							if( ( gg::GetMemoState(talker,337) + 10 ) == 21111 ) {
								myself::SetMemoState(talker,337,30000);
							} else {
								myself::SetMemoState(talker,337,( gg::GetMemoState(talker,337) + 10 ));
							}
							myself::ShowPage(talker,"prefect_chakiris_q0337_02.htm");
						}
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,337) == 1 && ( gg::GetMemoState(talker,337) == 21110 || gg::GetMemoState(talker,337) == 21011 || gg::GetMemoState(talker,337) == 21010 || gg::GetMemoState(talker,337) == 20111 || gg::GetMemoState(talker,337) == 20110 || gg::GetMemoState(talker,337) == 20011 || gg::GetMemoState(talker,337) == 20010 ) ) ) {
						myself::SetCurrentQuestID(337);
						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,"prefect_chakiris_q0337_03.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,337) == 1 && gg::GetMemoState(talker,337) >= 30000 ) ) {
						myself::SetCurrentQuestID(337);
						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,"prefect_chakiris_q0337_04.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 337 ) {
			myself::SetCurrentQuestID(337);
			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 == 337 ) {
		}
		super;
	}

}
