class 1 triskel : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,411) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Path to an Assassin");
			}
			if( myself::HaveMemo(talker,411) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Path to an Assassin (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) == 0 )
					{
						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::GetMemoCount(talker) < 26 )
						{
							if( myself::OwnItemCount(talker,1252) == 0 )
							{
								myself::FHTML_SetFileName(fhtml0,"triskel_q0411_01.htm");
								myself::FHTML_SetInt(fhtml0,"quest_id",411);
								myself::ShowFHTML(talker,fhtml0);
							}
							else
							{
								myself::ShowPage(talker,"triskel_q0411_04.htm");
							}
						}
						else
						{
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1:
				{
					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) == 1 && myself::OwnItemCount(talker,1252) == 0 )
						{
							if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
							{
								talker.quest_last_reward_time = myself::GetCurrentTick();
								myself::ShowPage(talker,"triskel_q0411_06.htm");
								myself::DeleteItem1(talker,1251,1);
								myself::GiveItem1(talker,1252,1);
								myself::IncrementParam(talker,0,3200);
								myself::IncrementParam(talker,1,3930);
								myself::RemoveMemo(talker,411);
								myself::AddLog(2,talker,411);
								myself::SoundEffect(talker,"ItemSound.quest_finish");
							}
						}
						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,"triskel_q0411_07.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,"triskel_q0411_08.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,"triskel_q0411_09.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 )
						{
							myself::ShowPage(talker,"triskel_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) == 1 )
						{
							myself::ShowPage(talker,"triskel_q0411_11.htm");
						}
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker)
	{
		if( quest_id == 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( talker.level >= 19 && talker.occupation == 31 && myself::OwnItemCount(talker,1252) == 0 )
			{
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
				{
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::SetMemo(talker,411);
					myself::AddLog(1,talker,411);
					myself::SoundEffect(talker,"ItemSound.quest_accept");
					myself::GiveItem1(talker,1245,1);
					myself::SetFlagJournal(talker,411,1);
					myself::ShowPage(talker,"triskel_q0411_05.htm");
				}
			}
			else if( talker.occupation != 31 )
			{
				if( talker.occupation == 35 )
				{
					myself::ShowPage(talker,"triskel_q0411_02a.htm");
				}
				else
				{
					myself::ShowPage(talker,"triskel_q0411_02.htm");
				}
			}
			else if( talker.level < 19 && talker.occupation == 31 )
			{
				myself::ShowPage(talker,"triskel_q0411_03.htm");
			}
			else if( talker.level >= 19 && talker.occupation == 31 && myself::OwnItemCount(talker,1252) == 1 )
			{
				myself::ShowPage(talker,"triskel_q0411_04.htm");
			}
			return;
		}
		super;
	}

}
