@LabelIndex 377272
@StringIndex 55420
class 0 kasandra : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,241) == 1 && gg::OwnItemCount(talker,7599) >= 1 && gg::GetMemoState(talker,241) == ( ( 13 * 10 ) + 1 ) && talker.subjob_id != 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Path of the Noblesse, Precious Soul - 1 (In Progress)");
			}
			if( talker.subjob_id == 0 && gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 13 * 10 ) + 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Path of the Noblesse, Precious Soul - 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 14 * 10 ) + 1 ) && talker.subjob_id != 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Path of the Noblesse, Precious Soul - 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 14 * 10 ) + 1 ) && talker.subjob_id == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Path of the Noblesse, Precious Soul - 1 (In Progress)");
			}
			if( gg::HaveMemo(talker,242) == 1 && talker.subjob_id == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Path of the Noblesse, Precious Soul - 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) == 1 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Path of the Noblesse, Precious Soul - 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) >= 2 && gg::GetMemoState(talker,242) < 11 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Path of the Noblesse, Precious Soul - 2 (In Progress)");
			}
			if( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) >= 11 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Path of the Noblesse, Precious Soul - 2 (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,241) == 1 && gg::OwnItemCount(talker,7599) >= 1 && gg::GetMemoState(talker,241) == ( ( 13 * 10 ) + 1 ) && talker.subjob_id != 0 ) ) {
						myself::SetCurrentQuestID(241);
						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::SetHTMLCookie(talker,241,13);
						myself::ShowPage(talker,"kasandra_q0241_1301.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( talker.subjob_id == 0 && gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 13 * 10 ) + 1 ) ) ) {
						myself::SetCurrentQuestID(241);
						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,"quest_not_subclass001.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 14 * 10 ) + 1 ) && talker.subjob_id != 0 ) ) {
						myself::SetCurrentQuestID(241);
						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,"kasandra_q0241_1403.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,241) == 1 && gg::GetMemoState(talker,241) == ( ( 14 * 10 ) + 1 ) && talker.subjob_id == 0 ) ) {
						myself::SetCurrentQuestID(241);
						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,"quest_not_subclass001.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,242) == 1 && talker.subjob_id == 0 ) ) {
						myself::SetCurrentQuestID(242);
						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,"quest_not_subclass001.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) == 1 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) ) {
						myself::SetCurrentQuestID(242);
						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,"kasandra_q0242_01.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) >= 2 && gg::GetMemoState(talker,242) < 11 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) ) {
						myself::SetCurrentQuestID(242);
						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,"kasandra_q0242_06.htm");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,242) == 1 && talker.subjob_id != 0 && gg::GetMemoState(talker,242) >= 11 && myself::GetOneTimeQuestFlag(talker,242) == 0 ) ) {
						myself::SetCurrentQuestID(242);
						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,7678,1);
						myself::IncrementParam(talker,0,455764);
						myself::RemoveMemo(talker,242);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::SetOneTimeQuestFlag(talker,242,1);
						myself::ShowPage(talker,"kasandra_q0242_07.htm");
						gg::AddLog(2,talker,242);
						gg::AddPCSocial(gg::GetIndexFromCreature(talker),3);
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,i0,quest_id,reply,talker) {
		if( ask == 241 ) {
			myself::SetCurrentQuestID(241);
			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 == 241 ) {
			i0 = myself::GetHTMLCookie(talker,241,( 14 - 1 ));
			if( i0 != -1 ) {
				if( reply == 1 && gg::HaveMemo(talker,241) == 1 && talker.subjob_id != 0 ) {
					if( gg::OwnItemCount(talker,7599) >= 1 ) {
						if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::DeleteItem1(talker,7599,1);
							myself::ShowPage(talker,"kasandra_q0241_1401.htm");
							myself::SetMemoState(talker,241,( ( 14 * 10 ) + 1 ));
							myself::SetFlagJournal(talker,241,17);
							myself::ShowQuestMark(talker,241);
							myself::SoundEffect(talker,"ItemSound.quest_middle");
						}
					} else {
						myself::ShowPage(talker,"kasandra_q0241_1402.htm");
					}
				}
			}
		}
		if( ask == 242 ) {
			myself::SetCurrentQuestID(242);
			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 == 242 ) {
			if( reply == 1 && gg::HaveMemo(talker,242) == 1 ) {
				myself::ShowPage(talker,"kasandra_q0242_02.htm");
			}
			if( reply == 2 && gg::HaveMemo(talker,242) == 1 ) {
				myself::ShowPage(talker,"kasandra_q0242_03.htm");
			}
			if( reply == 3 && gg::HaveMemo(talker,242) == 1 ) {
				myself::ShowPage(talker,"kasandra_q0242_04.htm");
			}
			if( reply == 4 && gg::HaveMemo(talker,242) == 1 ) {
				myself::SetMemoState(talker,242,2);
				myself::ShowPage(talker,"kasandra_q0242_05.htm");
				myself::SetFlagJournal(talker,242,2);
				myself::ShowQuestMark(talker,242);
				myself::SoundEffect(talker,"ItemSound.quest_middle");
			}
		}
		super;
	}

}
