@LabelIndex 390713
@StringIndex 58010
class 0 subelder_casca : npc_elder {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,174) == 1 && gg::GetMemoState(talker,174) < 7 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Supply Check (In Progress)");
			}
			if( gg::HaveMemo(talker,174) == 1 && gg::GetMemoState(talker,174) == 7 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Supply Check (In Progress)");
			}
			if( gg::HaveMemo(talker,174) == 1 && gg::GetMemoState(talker,174) == 8 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Supply Check (In Progress)");
			}
			if( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 2 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Certified Soul Breaker (In Progress)");
			}
			if( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 3 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Certified Soul Breaker (In Progress)");
			}
			if( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 4 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Certified Soul Breaker (In Progress)");
			}
			if( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 14 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Certified Soul Breaker (In Progress)");
			}
			if( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 21 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Certified Soul Breaker (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,174) == 1 && gg::GetMemoState(talker,174) < 7 ) ) {
						myself::SetCurrentQuestID(174);
						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,"subelder_casca_q0174_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,174) == 1 && gg::GetMemoState(talker,174) == 7 ) ) {
						myself::SetCurrentQuestID(174);
						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,9795,1);
						myself::SetMemoState(talker,174,8);
						myself::ShowPage(talker,"subelder_casca_q0174_02.htm");
						myself::SoundEffect(talker,"itemsound.quest_middle");
						myself::SetFlagJournal(talker,174,8);
						myself::ShowQuestMark(talker,174);
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,174) == 1 && gg::GetMemoState(talker,174) == 8 ) ) {
						myself::SetCurrentQuestID(174);
						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,"subelder_casca_q0174_03.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 2 ) ) {
						myself::SetCurrentQuestID(65);
						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,"subelder_casca_q0065_01.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 3 ) ) {
						myself::SetCurrentQuestID(65);
						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,"subelder_casca_q0065_03.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 4 ) ) {
						myself::SetCurrentQuestID(65);
						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,"subelder_casca_q0065_05.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 14 ) ) {
						myself::SetCurrentQuestID(65);
						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,"subelder_casca_q0065_06.htm");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 21 ) ) {
						myself::SetCurrentQuestID(65);
						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,"subelder_casca_q0065_09.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 174 ) {
			myself::SetCurrentQuestID(174);
			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 == 174 ) {
		}
		if( ask == 65 ) {
			myself::SetCurrentQuestID(65);
			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 == 65 ) {
			if( reply == 1 && gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 2 ) {
				myself::SetMemoState(talker,65,3);
				myself::ShowPage(talker,"subelder_casca_q0065_02.htm");
				myself::SetFlagJournal(talker,65,3);
				myself::ShowQuestMark(talker,65);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
			if( reply == 2 && gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 3 ) {
				myself::SetMemoState(talker,65,4);
				myself::ShowPage(talker,"subelder_casca_q0065_04.htm");
				myself::SetFlagJournal(talker,65,4);
				myself::ShowQuestMark(talker,65);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
			if( reply == 3 && gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 14 ) {
				myself::ShowPage(talker,"subelder_casca_q0065_07.htm");
			}
			if( reply == 4 && gg::HaveMemo(talker,65) == 1 && myself::GetOneTimeQuestFlag(talker,65) == 0 && gg::GetMemoState(talker,65) == 14 ) {
				myself::SetMemoState(talker,65,21);
				myself::ShowPage(talker,"subelder_casca_q0065_08.htm");
				myself::SetFlagJournal(talker,65,14);
				myself::ShowQuestMark(talker,65);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
				myself::DeleteItem1(talker,9803,gg::OwnItemCount(talker,9803));
			}
		}
		super;
	}

}
