class 1 brother_metheus : citizen
{
handler:
	EventHandler TALK_SELECTED(talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3173) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3174) && myself::OwnItemCount(talker,3175) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3174) == 0 && myself::OwnItemCount(talker,3175) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && ( myself::OwnItemCount(talker,3176) || myself::OwnItemCount(talker,3177) ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3183) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && ( myself::OwnItemCount(talker,3184) || myself::OwnItemCount(talker,3185) || myself::OwnItemCount(talker,3186) || myself::OwnItemCount(talker,3187) || myself::OwnItemCount(talker,3188) || myself::OwnItemCount(talker,3189) ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Testimony of Fate (Continue)");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			switch(_code)
			{
				case 0:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3173) ) )
					{
						myself::SetCurrentQuestID(219);
						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::ShowPage(talker,"brother_metheus_q0219_01.htm");
							myself::GiveItem1(talker,3174,1);
							myself::DeleteItem1(talker,3173,1);
							myself::SetFlagJournal(talker,219,2);
						}
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3174) && myself::OwnItemCount(talker,3175) == 0 ) )
					{
						myself::SetCurrentQuestID(219);
						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,"brother_metheus_q0219_02.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3174) == 0 && myself::OwnItemCount(talker,3175) ) )
					{
						myself::SetCurrentQuestID(219);
						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::ShowPage(talker,"brother_metheus_q0219_03.htm");
							myself::GiveItem1(talker,3176,1);
							myself::DeleteItem1(talker,3175,1);
							myself::SetFlagJournal(talker,219,4);
						}
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && ( myself::OwnItemCount(talker,3176) || myself::OwnItemCount(talker,3177) ) ) )
					{
						myself::SetCurrentQuestID(219);
						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,"brother_metheus_q0219_04.htm");
						myself::SetFlagJournal(talker,219,5);
					}
					break;
				}
				case 4:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3183) ) )
					{
						myself::SetCurrentQuestID(219);
						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::ShowPage(talker,"brother_metheus_q0219_05.htm");
							myself::GiveItem1(talker,3184,1);
							myself::DeleteItem1(talker,3183,1);
							myself::SetFlagJournal(talker,219,9);
						}
					}
					break;
				}
				case 5:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && ( myself::OwnItemCount(talker,3184) || myself::OwnItemCount(talker,3185) || myself::OwnItemCount(talker,3186) || myself::OwnItemCount(talker,3187) || myself::OwnItemCount(talker,3188) || myself::OwnItemCount(talker,3189) ) ) )
					{
						myself::SetCurrentQuestID(219);
						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,"brother_metheus_q0219_06.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

}
