class 1 falsepriest_agripel : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 7 && myself::OwnItemCount(talker,7140) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 8 && myself::OwnItemCount(talker,7140) >= 1 && ( myself::GetMemoStateEx(talker,21,1) == 2 || myself::GetMemoStateEx(talker,21,1) == 4 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 8 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 9 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) == 6 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 9 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) != 6 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 10 && myself::OwnItemCount(talker,7140) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Hidden Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 2 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 3 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 6 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 20 && myself::OwnItemCount(talker,7158) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 21 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 22 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 11;
				myself::AddChoice(11,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 23 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 12;
				myself::AddChoice(12,"Hiding Behind the Truth (Continue)");
			}
			if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 24 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 13;
				myself::AddChoice(13,"Hiding Behind the Truth (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,21) == 1 && myself::GetMemoState(talker,21) == 7 && myself::OwnItemCount(talker,7140) >= 1 ) )
					{
						myself::SetCurrentQuestID(21);
						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::SetMemoState(talker,21,( myself::GetMemoState(talker,21) + 1 ));
						myself::SetMemoStateEx(talker,21,1,( myself::GetMemoStateEx(talker,21,1) + 1 ));
						myself::ShowPage(talker,"falsepriest_agripel_q0021_01.htm");
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 8 && myself::OwnItemCount(talker,7140) >= 1 && ( myself::GetMemoStateEx(talker,21,1) == 2 || myself::GetMemoStateEx(talker,21,1) == 4 ) ) )
					{
						myself::SetCurrentQuestID(21);
						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::SetMemoState(talker,21,( myself::GetMemoState(talker,21) + 1 ));
						myself::SetMemoStateEx(talker,21,1,( myself::GetMemoStateEx(talker,21,1) + 1 ));
						myself::ShowPage(talker,"falsepriest_agripel_q0021_02.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 8 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) == 1 ) )
					{
						myself::SetCurrentQuestID(21);
						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,"falsepriest_agripel_q0021_01.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 9 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) == 6 ) )
					{
						myself::SetCurrentQuestID(21);
						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::SetMemoState(talker,21,10);
						myself::ShowPage(talker,"falsepriest_agripel_q0021_03.htm");
						myself::SetFlagJournal(talker,21,7);
					}
					break;
				}
				case 4:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 9 && myself::OwnItemCount(talker,7140) >= 1 && myself::GetMemoStateEx(talker,21,1) != 6 ) )
					{
						myself::SetCurrentQuestID(21);
						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,"falsepriest_agripel_q0021_02.htm");
					}
					break;
				}
				case 5:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,21) == 1 && myself::GetMemoState(talker,21) == 10 && myself::OwnItemCount(talker,7140) >= 1 ) )
					{
						myself::SetCurrentQuestID(21);
						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,"falsepriest_agripel_q0021_03.htm");
					}
					break;
				}
				case 6:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 2 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_01.htm");
					}
					break;
				}
				case 7:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 3 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_03.htm");
					}
					break;
				}
				case 8:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 6 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_08a.htm");
					}
					break;
				}
				case 9:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 20 && myself::OwnItemCount(talker,7158) >= 1 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_09.htm");
					}
					break;
				}
				case 10:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 21 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_10a.htm");
					}
					break;
				}
				case 11:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 22 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_15.htm");
					}
					break;
				}
				case 12:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 23 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_18.htm");
					}
					break;
				}
				case 13:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 24 ) )
					{
						myself::SetCurrentQuestID(25);
						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,"falsepriest_agripel_q0025_19.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker)
	{
		if( ask == 25 )
		{
			myself::SetCurrentQuestID(25);
			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 == 25 )
		{
			if( reply == 4 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 2 )
				{
					myself::DeleteItem1(talker,7156,myself::OwnItemCount(talker,7156));
					myself::SetMemoState(talker,25,3);
					myself::ShowPage(talker,"falsepriest_agripel_q0025_02.htm");
				}
			}
			if( reply == 5 )
			{
				myself::ShowPage(talker,"falsepriest_agripel_q0025_07.htm");
			}
			if( reply == 6 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 3 )
				{
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
					{
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7157,1);
						myself::SetMemoState(talker,25,6);
						myself::ShowPage(talker,"falsepriest_agripel_q0025_08.htm");
						myself::SetFlagJournal(talker,25,5);
					}
				}
			}
		}
		if( ask == 25 )
		{
			myself::SetCurrentQuestID(25);
			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 == 25 )
		{
			if( reply == 25 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 20 && myself::OwnItemCount(talker,7158) >= 1 )
				{
					myself::DeleteItem1(talker,7158,myself::OwnItemCount(talker,7158));
					myself::SetMemoState(talker,25,21);
					myself::ShowPage(talker,"falsepriest_agripel_q0025_10.htm");
				}
			}
			if( reply == 20 )
			{
				myself::ShowPage(talker,"falsepriest_agripel_q0025_12.htm");
			}
			if( reply == 21 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 21 )
				{
					myself::SetMemoState(talker,25,22);
					myself::ShowPage(talker,"falsepriest_agripel_q0025_13.htm");
				}
			}
			if( reply == 22 )
			{
				myself::ShowPage(talker,"falsepriest_agripel_q0025_14.htm");
			}
			if( reply == 23 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 22 )
				{
					myself::SetMemoState(talker,25,23);
					myself::ShowPage(talker,"falsepriest_agripel_q0025_16.htm");
					myself::SetFlagJournal(talker,25,17);
				}
			}
			if( reply == 24 )
			{
				if( myself::HaveMemo(talker,25) == 1 && myself::GetMemoState(talker,25) == 22 )
				{
					myself::SetMemoState(talker,25,24);
					myself::ShowPage(talker,"falsepriest_agripel_q0025_17.htm");
					myself::SetFlagJournal(talker,25,18);
				}
			}
		}
		super;
	}

}
