class 1 arkenia : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,411) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Path to an Assassin (Continue)");
			}
			if( myself::HaveMemo(talker,412) == 1 && myself::OwnItemCount(talker,1256) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Path to a Dark Wizard (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3191) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3192) && ( myself::OwnItemCount(talker,3198) < 1 || myself::OwnItemCount(talker,3201) < 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3192) && myself::OwnItemCount(talker,3198) >= 1 && myself::OwnItemCount(talker,3201) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3202) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Testimony of Fate (Continue)");
			}
			if( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3146) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Testimony of Life (Continue)");
			}
			if( ( myself::HaveMemo(talker,218) == 1 && ( myself::OwnItemCount(talker,3152) >= 1 || myself::OwnItemCount(talker,3153) >= 1 ) ) && myself::OwnItemCount(talker,3144) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 7;
				myself::AddChoice(7,"Testimony of Life (Continue)");
			}
			if( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3154) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 8;
				myself::AddChoice(8,"Testimony of Life (Continue)");
			}
			if( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3155) >= 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 9;
				myself::AddChoice(9,"Testimony of Life (Continue)");
			}
			if( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3146) == 0 && myself::OwnItemCount(talker,3151) == 0 && myself::OwnItemCount(talker,3154) == 0 && myself::OwnItemCount(talker,3155) == 0 && myself::OwnItemCount(talker,3144) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 10;
				myself::AddChoice(10,"Testimony of Life (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,411) == 1 )
					{
						myself::SetCurrentQuestID(411);
						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::OwnItemCount(talker,1246) == 0 && myself::OwnItemCount(talker,1247) == 0 && myself::OwnItemCount(talker,1250) == 0 && myself::OwnItemCount(talker,1251) == 0 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 1 )
						{
							myself::ShowPage(talker,"arkenia_q0411_01.htm");
						}
						else if( myself::OwnItemCount(talker,1246) == 1 && myself::OwnItemCount(talker,1247) == 0 && myself::OwnItemCount(talker,1250) == 0 && myself::OwnItemCount(talker,1251) == 0 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 0 )
						{
							myself::ShowPage(talker,"arkenia_q0411_07.htm");
						}
						else if( myself::OwnItemCount(talker,1246) == 0 && myself::OwnItemCount(talker,1247) == 0 && myself::OwnItemCount(talker,1250) == 1 && myself::OwnItemCount(talker,1251) == 0 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 0 )
						{
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
							{
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::ShowPage(talker,"arkenia_q0411_08.htm");
								myself::GiveItem1(talker,1251,1);
								myself::DeleteItem1(talker,1250,1);
								myself::SetFlagJournal(talker,411,7);
							}
						}
						else if( myself::OwnItemCount(talker,1246) == 0 && myself::OwnItemCount(talker,1247) == 0 && myself::OwnItemCount(talker,1250) == 0 && myself::OwnItemCount(talker,1251) == 1 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 0 )
						{
							myself::ShowPage(talker,"arkenia_q0411_09.htm");
						}
						else if( myself::OwnItemCount(talker,1246) == 0 && myself::OwnItemCount(talker,1247) == 1 && myself::OwnItemCount(talker,1250) == 0 && myself::OwnItemCount(talker,1251) == 0 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 0 )
						{
							myself::ShowPage(talker,"arkenia_q0411_10.htm");
						}
						else if( myself::OwnItemCount(talker,1246) == 0 && myself::OwnItemCount(talker,1247) == 0 && myself::OwnItemCount(talker,1250) == 0 && myself::OwnItemCount(talker,1251) == 0 && myself::OwnItemCount(talker,1252) == 0 && myself::OwnItemCount(talker,1245) == 0 )
						{
							myself::ShowPage(talker,"arkenia_q0411_11.htm");
						}
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,412) == 1 && myself::OwnItemCount(talker,1256) == 0 ) )
					{
						myself::SetCurrentQuestID(412);
						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();
							if( myself::OwnItemCount(talker,1279) == 0 && myself::OwnItemCount(talker,1260) == 0 )
							{
								myself::ShowPage(talker,"arkenia_q0412_01.htm");
								myself::GiveItem1(talker,1279,1);
							}
							else if( myself::OwnItemCount(talker,1279) && myself::OwnItemCount(talker,1260) < 3 )
							{
								myself::ShowPage(talker,"arkenia_q0412_02.htm");
							}
							else if( myself::OwnItemCount(talker,1279) && myself::OwnItemCount(talker,1260) >= 3 )
							{
								myself::ShowPage(talker,"arkenia_q0412_03.htm");
								myself::GiveItem1(talker,1256,1);
								myself::DeleteItem1(talker,1260,3);
								myself::DeleteItem1(talker,1279,1);
							}
						}
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3191) ) )
					{
						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,"arkenia_q0219_01.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3192) && ( myself::OwnItemCount(talker,3198) < 1 || myself::OwnItemCount(talker,3201) < 1 ) ) )
					{
						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,"arkenia_q0219_03.htm");
					}
					break;
				}
				case 4:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3192) && myself::OwnItemCount(talker,3198) >= 1 && myself::OwnItemCount(talker,3201) >= 1 ) )
					{
						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,"arkenia_q0219_04.htm");
					}
					break;
				}
				case 5:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,219) == 1 && myself::OwnItemCount(talker,3190) && myself::OwnItemCount(talker,3202) ) )
					{
						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,"arkenia_q0219_06.htm");
					}
					break;
				}
				case 6:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3146) >= 1 ) )
					{
						myself::SetCurrentQuestID(218);
						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,"arkenia_q0218_01.htm");
					}
					break;
				}
				case 7:
				{
					if( _from_choice == 0 || ( ( myself::HaveMemo(talker,218) == 1 && ( myself::OwnItemCount(talker,3152) >= 1 || myself::OwnItemCount(talker,3153) >= 1 ) ) && myself::OwnItemCount(talker,3144) == 1 ) )
					{
						myself::SetCurrentQuestID(218);
						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,"arkenia_q0218_05.htm");
					}
					break;
				}
				case 8:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3154) >= 1 ) )
					{
						myself::SetCurrentQuestID(218);
						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,"arkenia_q0218_06.htm");
							myself::DeleteItem1(talker,3151,myself::OwnItemCount(talker,3151));
							myself::DeleteItem1(talker,3154,1);
							myself::GiveItem1(talker,3155,1);
							myself::SetFlagJournal(talker,218,12);
						}
					}
					break;
				}
				case 9:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3144) >= 1 && myself::OwnItemCount(talker,3155) >= 1 ) )
					{
						myself::SetCurrentQuestID(218);
						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,"arkenia_q0218_07.htm");
					}
					break;
				}
				case 10:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,218) == 1 && myself::OwnItemCount(talker,3146) == 0 && myself::OwnItemCount(talker,3151) == 0 && myself::OwnItemCount(talker,3154) == 0 && myself::OwnItemCount(talker,3155) == 0 && myself::OwnItemCount(talker,3144) == 1 ) )
					{
						myself::SetCurrentQuestID(218);
						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,"arkenia_q0218_08.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker)
	{
		if( ask == 411 )
		{
			myself::SetCurrentQuestID(411);
			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 == 411 )
		{
			if( reply == 1 && myself::OwnItemCount(talker,1245) > 0 )
			{
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
				{
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::ShowPage(talker,"arkenia_q0411_05.htm");
					myself::GiveItem1(talker,1246,1);
					myself::DeleteItem1(talker,1245,1);
					myself::SetFlagJournal(talker,411,2);
				}
			}
		}
		if( ask == 219 )
		{
			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( ask == 219 )
		{
			if( reply == 1 && myself::OwnItemCount(talker,3191) > 0 )
			{
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
				{
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::ShowPage(talker,"arkenia_q0219_02.htm");
					myself::GiveItem1(talker,3192,1);
					myself::DeleteItem1(talker,3191,1);
					myself::SetFlagJournal(talker,219,17);
				}
			}
			else if( reply == 2 && myself::OwnItemCount(talker,3192) && myself::OwnItemCount(talker,3198) >= 1 && myself::OwnItemCount(talker,3201) >= 1 )
			{
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
				{
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::ShowPage(talker,"arkenia_q0219_05.htm");
					myself::GiveItem1(talker,3202,1);
					myself::DeleteItem1(talker,3192,1);
					myself::DeleteItem1(talker,3198,1);
					myself::DeleteItem1(talker,3201,1);
					myself::SetFlagJournal(talker,219,18);
				}
			}
		}
		if( ask == 218 )
		{
			myself::SetCurrentQuestID(218);
			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 == 218 )
		{
			if( reply == 1 )
			{
				myself::ShowPage(talker,"arkenia_q0218_02.htm");
			}
			if( reply == 2 )
			{
				myself::ShowPage(talker,"arkenia_q0218_03.htm");
			}
			if( reply == 3 )
			{
				if( myself::OwnItemCount(talker,3146) >= 1 )
				{
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
					{
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::ShowPage(talker,"arkenia_q0218_04.htm");
						myself::DeleteItem1(talker,3146,1);
						myself::GiveItem1(talker,3151,1);
						myself::GiveItem1(talker,3152,1);
						myself::SetFlagJournal(talker,218,8);
					}
				}
			}
		}
		super;
	}

}
