@LabelIndex 392178
@StringIndex 58272
class 0 master_gobie : kamael_coach {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) < 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && ( gg::GetMemoState(talker,63) == 4 || gg::GetMemoState(talker,63) == 5 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 6 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 7 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 8 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 11 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 12 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 13 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 14 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 15 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 16 && gg::OwnItemCount(talker,9771) < 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 16 && gg::OwnItemCount(talker,9771) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"Path of the Warder (In Progress)");
			}
			if( gg::HaveMemo(talker,63) == 0 && gg::OwnItemCount(talker,9772) > 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 13;
				myself::AddChoice(13,"Path of the Warder (Done)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) < 3 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 3 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_02.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && ( gg::GetMemoState(talker,63) == 4 || gg::GetMemoState(talker,63) == 5 ) ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_04.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 6 ) ) {
						myself::SetCurrentQuestID(63);
						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,9766,gg::OwnItemCount(talker,9766));
						myself::SetMemoState(talker,63,7);
						myself::ShowPage(talker,"master_gobie_q0063_05.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 7 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_06.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 8 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_09.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 11 ) ) {
						myself::SetCurrentQuestID(63);
						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,9768,gg::OwnItemCount(talker,9768));
						myself::SetMemoState(talker,63,12);
						myself::ShowPage(talker,"master_gobie_q0063_10.htm");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 12 ) ) {
						myself::SetCurrentQuestID(63);
						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::GiveItem1(talker,9769,1);
						myself::SetMemoState(talker,63,13);
						myself::ShowPage(talker,"master_gobie_q0063_11.htm");
					}
					break;
				}
				case 8: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 13 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_13.htm");
					}
					break;
				}
				case 9: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 14 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_14.htm");
					}
					break;
				}
				case 10: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 15 ) ) {
						myself::SetCurrentQuestID(63);
						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::GiveItem1(talker,9770,1);
						myself::SetMemoState(talker,63,16);
						myself::SetMemoStateEx(talker,63,1,0);
						myself::ShowPage(talker,"master_gobie_q0063_17.htm");
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						myself::SetFlagJournal(talker,63,11);
						myself::ShowQuestMark(talker,63);
					}
					break;
				}
				case 11: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 16 && gg::OwnItemCount(talker,9771) < 1 ) ) {
						myself::SetCurrentQuestID(63);
						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::SetMemoStateEx(talker,63,1,0);
						myself::ShowPage(talker,"master_gobie_q0063_19.htm");
					}
					break;
				}
				case 12: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 16 && gg::OwnItemCount(talker,9771) >= 1 ) ) {
						myself::SetCurrentQuestID(63);
						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,9772,1);
							myself::DeleteItem1(talker,9771,gg::OwnItemCount(talker,9771));
							myself::RemoveMemo(talker,63);
							myself::SoundEffect(talker,"ItemSound.quest_finish");
							myself::ShowPage(talker,"master_gobie_q0063_20.htm");
							gg::AddLog(2,talker,63);
							myself::SetOneTimeQuestFlag(talker,63,1);
							gg::AddPCSocial(gg::GetIndexFromCreature(talker),3);
							if( myself::GetOneTimeQuestFlag(talker,145) == 0 ) {
								myself::SetOneTimeQuestFlag(talker,145,1);
								if( talker.level >= 20 ) {
									myself::IncrementParam(talker,0,160267);
									myself::IncrementParam(talker,1,11023);
									myself::GiveItem1(talker,57,81900);
								} else if( talker.level >= 19 ) {
									myself::IncrementParam(talker,0,228064);
									myself::IncrementParam(talker,1,14372);
									myself::GiveItem1(talker,57,81900);
								} else {
									myself::IncrementParam(talker,0,295862);
									myself::IncrementParam(talker,1,17721);
									myself::GiveItem1(talker,57,81900);
								}
							}
						}
					}
					break;
				}
				case 13: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,63) == 0 && gg::OwnItemCount(talker,9772) > 0 ) ) {
						myself::SetCurrentQuestID(63);
						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_gobie_q0063_21.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 63 ) {
			myself::SetCurrentQuestID(63);
			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 == 63 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 3 ) {
					myself::GiveItem1(talker,9765,1);
					myself::DeleteItem1(talker,9764,gg::OwnItemCount(talker,9764));
					myself::SetMemoState(talker,63,4);
					myself::ShowPage(talker,"master_gobie_q0063_03.htm");
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::SetFlagJournal(talker,63,5);
					myself::ShowQuestMark(talker,63);
				}
			}
		}
		if( ask == 63 ) {
			myself::SetCurrentQuestID(63);
			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 == 63 ) {
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 7 ) {
					myself::ShowPage(talker,"master_gobie_q0063_07.htm");
				}
			}
			if( reply == 3 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 7 ) {
					myself::GiveItem1(talker,9767,1);
					myself::SetMemoState(talker,63,8);
					myself::ShowPage(talker,"master_gobie_q0063_08.htm");
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::SetFlagJournal(talker,63,7);
					myself::ShowQuestMark(talker,63);
				}
			}
		}
		if( ask == 63 ) {
			myself::SetCurrentQuestID(63);
			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 == 63 ) {
			if( reply == 4 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 12 ) {
					myself::GiveItem1(talker,9769,1);
					myself::SetMemoState(talker,63,13);
					myself::ShowPage(talker,"master_gobie_q0063_12.htm");
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::SetFlagJournal(talker,63,9);
					myself::ShowQuestMark(talker,63);
				}
			}
		}
		if( ask == 63 ) {
			myself::SetCurrentQuestID(63);
			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 == 63 ) {
			if( reply == 5 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 14 ) {
					myself::SetMemoState(talker,63,15);
					myself::ShowPage(talker,"master_gobie_q0063_15.htm");
				}
			}
			if( reply == 6 ) {
				if( gg::HaveMemo(talker,63) == 1 && gg::GetMemoState(talker,63) == 15 ) {
					myself::GiveItem1(talker,9770,1);
					myself::SetMemoState(talker,63,16);
					myself::ShowPage(talker,"master_gobie_q0063_16.htm");
					myself::SetMemoStateEx(talker,63,1,0);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
					myself::SetFlagJournal(talker,63,11);
					myself::ShowQuestMark(talker,63);
				}
			}
		}
		super;
	}

}
