@LabelIndex 393022
@StringIndex 58417
class 0 master_tenain : kamael_coach {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 2 && gg::OwnItemCount(talker,9754) < 20 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 2 && gg::OwnItemCount(talker,9754) >= 20 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 6 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 8 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 9 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 10 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Certified Berserker (In Progress)");
			}
			if( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 11 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Certified Berserker (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,64) == 1 && gg::GetMemoState(talker,64) == 1 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 2 && gg::OwnItemCount(talker,9754) < 20 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_03.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 2 && gg::OwnItemCount(talker,9754) >= 20 ) ) {
						myself::SetCurrentQuestID(64);
						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::DeleteItem1(talker,9754,gg::OwnItemCount(talker,9754));
						myself::SetMemoState(talker,64,3);
						myself::ShowPage(talker,"master_tenain_q0064_04.htm");
						myself::SetFlagJournal(talker,64,4);
						myself::ShowQuestMark(talker,64);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 3 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_05.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_06.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 6 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_11.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 8 ) ) {
						myself::SetCurrentQuestID(64);
						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::SetMemoState(talker,64,9);
						myself::ShowPage(talker,"master_tenain_q0064_12.htm");
						myself::SetFlagJournal(talker,64,12);
						myself::ShowQuestMark(talker,64);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 9 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_13.htm");
					}
					break;
				}
				case 8: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 10 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_14.htm");
					}
					break;
				}
				case 9: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 11 ) ) {
						myself::SetCurrentQuestID(64);
						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,"master_tenain_q0064_16.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 64 ) {
			myself::SetCurrentQuestID(64);
			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 == 64 ) {
			if( reply == 1 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 1 ) {
				myself::SetMemoState(talker,64,2);
				myself::ShowPage(talker,"master_tenain_q0064_02.htm");
				myself::SetFlagJournal(talker,64,2);
				myself::ShowQuestMark(talker,64);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
			if( reply == 2 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) {
				myself::ShowPage(talker,"master_tenain_q0064_07.htm");
			}
			if( reply == 3 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) {
				myself::ShowPage(talker,"master_tenain_q0064_08.htm");
			}
			if( reply == 4 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) {
				myself::ShowPage(talker,"master_tenain_q0064_09.htm");
			}
			if( reply == 5 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 5 ) {
				myself::DeleteItem1(talker,9755,gg::OwnItemCount(talker,9755));
				myself::SetMemoState(talker,64,6);
				myself::ShowPage(talker,"master_tenain_q0064_10.htm");
				myself::SetFlagJournal(talker,64,8);
				myself::ShowQuestMark(talker,64);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
			if( reply == 6 && gg::HaveMemo(talker,64) == 1 && gg::GetMemoState(talker,64) == 10 ) {
				myself::GiveItem1(talker,9759,1);
				myself::DeleteItem1(talker,9758,gg::OwnItemCount(talker,9758));
				myself::SetMemoState(talker,64,11);
				myself::ShowPage(talker,"master_tenain_q0064_15.htm");
				myself::SetFlagJournal(talker,64,14);
				myself::ShowQuestMark(talker,64);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
		}
		super;
	}

}
