@LabelIndex 356028
@StringIndex 51002
class 0 saint_agnes : citizen {
handler:
	EventHandler TALK_SELECTED(fhtml0,talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Saga of the Cardinal (In Progress)");
			}
			if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) >= 2 && gg::GetMemoState(talker,85) <= 4 && gg::OwnItemCount(talker,7522) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Saga of the Cardinal (In Progress)");
			}
			if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) >= 2 && gg::GetMemoState(talker,85) <= 4 && gg::OwnItemCount(talker,7522) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Saga of the Cardinal (In Progress)");
			}
			if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Saga of the Cardinal (In Progress)");
			}
			if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Saga of the Hierophant (In Progress)");
			}
			if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) >= 2 && gg::GetMemoState(talker,86) <= 4 && gg::OwnItemCount(talker,7523) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Saga of the Hierophant (In Progress)");
			}
			if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) >= 2 && gg::GetMemoState(talker,86) <= 4 && gg::OwnItemCount(talker,7523) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Saga of the Hierophant (In Progress)");
			}
			if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Saga of the Hierophant (In Progress)");
			}
			if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Saga of Eva's Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) >= 2 && gg::GetMemoState(talker,87) <= 4 && gg::OwnItemCount(talker,7524) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Saga of Eva's Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) >= 2 && gg::GetMemoState(talker,87) <= 4 && gg::OwnItemCount(talker,7524) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"Saga of Eva's Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"Saga of Eva's Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) == 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"Saga of the Shillien Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) >= 2 && gg::GetMemoState(talker,98) <= 4 && gg::OwnItemCount(talker,7525) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 13;
				myself::AddChoice(13,"Saga of the Shillien Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) >= 2 && gg::GetMemoState(talker,98) <= 4 && gg::OwnItemCount(talker,7525) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 14;
				myself::AddChoice(14,"Saga of the Shillien Saint (In Progress)");
			}
			if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) == 5 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 15;
				myself::AddChoice(15,"Saga of the Shillien Saint (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,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) == 1 ) ) {
						myself::SetCurrentQuestID(85);
						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,"saint_agnes_q0085_0101.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) >= 2 && gg::GetMemoState(talker,85) <= 4 && gg::OwnItemCount(talker,7522) == 0 ) ) {
						myself::SetCurrentQuestID(85);
						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,"saint_agnes_q0085_0102.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) >= 2 && gg::GetMemoState(talker,85) <= 4 && gg::OwnItemCount(talker,7522) >= 1 ) ) {
						myself::SetCurrentQuestID(85);
						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,"saint_agnes_q0085_0103.htm");
					}
					break;
				}
				case 3: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) == 5 ) ) {
						myself::SetCurrentQuestID(85);
						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,"saint_agnes_q0085_0104.htm");
					}
					break;
				}
				case 4: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) == 1 ) ) {
						myself::SetCurrentQuestID(86);
						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,"saint_agnes_q0086_0101.htm");
					}
					break;
				}
				case 5: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) >= 2 && gg::GetMemoState(talker,86) <= 4 && gg::OwnItemCount(talker,7523) == 0 ) ) {
						myself::SetCurrentQuestID(86);
						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,"saint_agnes_q0086_0102.htm");
					}
					break;
				}
				case 6: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) >= 2 && gg::GetMemoState(talker,86) <= 4 && gg::OwnItemCount(talker,7523) >= 1 ) ) {
						myself::SetCurrentQuestID(86);
						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,"saint_agnes_q0086_0103.htm");
					}
					break;
				}
				case 7: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) == 5 ) ) {
						myself::SetCurrentQuestID(86);
						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,"saint_agnes_q0086_0104.htm");
					}
					break;
				}
				case 8: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) == 1 ) ) {
						myself::SetCurrentQuestID(87);
						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,"saint_agnes_q0087_0101.htm");
					}
					break;
				}
				case 9: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) >= 2 && gg::GetMemoState(talker,87) <= 4 && gg::OwnItemCount(talker,7524) == 0 ) ) {
						myself::SetCurrentQuestID(87);
						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,"saint_agnes_q0087_0102.htm");
					}
					break;
				}
				case 10: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) >= 2 && gg::GetMemoState(talker,87) <= 4 && gg::OwnItemCount(talker,7524) >= 1 ) ) {
						myself::SetCurrentQuestID(87);
						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,"saint_agnes_q0087_0103.htm");
					}
					break;
				}
				case 11: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) == 5 ) ) {
						myself::SetCurrentQuestID(87);
						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,"saint_agnes_q0087_0104.htm");
					}
					break;
				}
				case 12: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) == 1 ) ) {
						myself::SetCurrentQuestID(98);
						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,"saint_agnes_q0098_0101.htm");
					}
					break;
				}
				case 13: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) >= 2 && gg::GetMemoState(talker,98) <= 4 && gg::OwnItemCount(talker,7525) == 0 ) ) {
						myself::SetCurrentQuestID(98);
						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,"saint_agnes_q0098_0102.htm");
					}
					break;
				}
				case 14: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) >= 2 && gg::GetMemoState(talker,98) <= 4 && gg::OwnItemCount(talker,7525) >= 1 ) ) {
						myself::SetCurrentQuestID(98);
						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,"saint_agnes_q0098_0103.htm");
					}
					break;
				}
				case 15: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) == 5 ) ) {
						myself::SetCurrentQuestID(98);
						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,"saint_agnes_q0098_0104.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 85 ) {
			myself::SetCurrentQuestID(85);
			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 == 85 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) == 1 ) {
					myself::SetMemoState(talker,85,2);
					myself::ShowPage(talker,"saint_agnes_q0085_0105.htm");
					myself::SetFlagJournal(talker,85,2);
					myself::ShowQuestMark(talker,85);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,85) == 1 && talker.occupation == 16 && gg::GetMemoState(talker,85) >= 2 && gg::GetMemoState(talker,85) <= 4 && gg::OwnItemCount(talker,7522) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7283,1);
						myself::DeleteItem1(talker,7522,gg::OwnItemCount(talker,7522));
						myself::SetMemoState(talker,85,5);
						myself::ShowPage(talker,"saint_agnes_q0085_0106.htm");
						myself::SetFlagJournal(talker,85,5);
						myself::ShowQuestMark(talker,85);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
		}
		if( ask == 86 ) {
			myself::SetCurrentQuestID(86);
			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 == 86 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) == 1 ) {
					myself::SetMemoState(talker,86,2);
					myself::ShowPage(talker,"saint_agnes_q0086_0105.htm");
					myself::SetFlagJournal(talker,86,2);
					myself::ShowQuestMark(talker,86);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,86) == 1 && talker.occupation == 17 && gg::GetMemoState(talker,86) >= 2 && gg::GetMemoState(talker,86) <= 4 && gg::OwnItemCount(talker,7523) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7284,1);
						myself::DeleteItem1(talker,7523,gg::OwnItemCount(talker,7523));
						myself::SetMemoState(talker,86,5);
						myself::ShowPage(talker,"saint_agnes_q0086_0106.htm");
						myself::SetFlagJournal(talker,86,5);
						myself::ShowQuestMark(talker,86);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
		}
		if( ask == 87 ) {
			myself::SetCurrentQuestID(87);
			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 == 87 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) == 1 ) {
					myself::SetMemoState(talker,87,2);
					myself::ShowPage(talker,"saint_agnes_q0087_0105.htm");
					myself::SetFlagJournal(talker,87,2);
					myself::ShowQuestMark(talker,87);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,87) == 1 && talker.occupation == 30 && gg::GetMemoState(talker,87) >= 2 && gg::GetMemoState(talker,87) <= 4 && gg::OwnItemCount(talker,7524) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7285,1);
						myself::DeleteItem1(talker,7524,gg::OwnItemCount(talker,7524));
						myself::SetMemoState(talker,87,5);
						myself::ShowPage(talker,"saint_agnes_q0087_0106.htm");
						myself::SetFlagJournal(talker,87,5);
						myself::ShowQuestMark(talker,87);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
		}
		if( ask == 98 ) {
			myself::SetCurrentQuestID(98);
			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 == 98 ) {
			if( reply == 1 ) {
				if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) == 1 ) {
					myself::SetMemoState(talker,98,2);
					myself::ShowPage(talker,"saint_agnes_q0098_0105.htm");
					myself::SetFlagJournal(talker,98,2);
					myself::ShowQuestMark(talker,98);
					myself::SoundEffect(talker,"ItemSound.quest_middle");
				}
			}
			if( reply == 2 ) {
				if( gg::HaveMemo(talker,98) == 1 && talker.occupation == 43 && gg::GetMemoState(talker,98) >= 2 && gg::GetMemoState(talker,98) <= 4 && gg::OwnItemCount(talker,7525) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7296,1);
						myself::DeleteItem1(talker,7525,gg::OwnItemCount(talker,7525));
						myself::SetMemoState(talker,98,5);
						myself::ShowPage(talker,"saint_agnes_q0098_0106.htm");
						myself::SetFlagJournal(talker,98,5);
						myself::ShowQuestMark(talker,98);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
					}
				}
			}
		}
		super;
	}

}
