class 1 wyrm_suzet : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,420) == 1 && myself::GetMemoState(talker,420) == 6 && myself::OwnItemCount(talker,3821) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Little Wing (Continue)");
			}
			if( myself::HaveMemo(talker,420) == 1 && myself::GetMemoState(talker,420) == 7 && myself::OwnItemCount(talker,3829) < 20 && myself::OwnItemCount(talker,3828) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Little Wing (Continue)");
			}
			if( myself::HaveMemo(talker,420) == 1 && myself::OwnItemCount(talker,3829) >= 20 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Little Wing (Continue)");
			}
			if( myself::HaveMemo(talker,420) == 1 && myself::GetMemoState(talker,420) == 8 && myself::OwnItemCount(talker,3829) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Little Wing (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,420) == 1 && myself::GetMemoState(talker,420) == 6 && myself::OwnItemCount(talker,3821) == 1 ) )
					{
						myself::SetCurrentQuestID(420);
						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,"wyrm_suzet_q0420_02.htm");
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,420) == 1 && myself::GetMemoState(talker,420) == 7 && myself::OwnItemCount(talker,3829) < 20 && myself::OwnItemCount(talker,3828) == 1 ) )
					{
						myself::SetCurrentQuestID(420);
						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,"wyrm_suzet_q0420_05.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,420) == 1 && myself::OwnItemCount(talker,3829) >= 20 ) )
					{
						myself::SetCurrentQuestID(420);
						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::DeleteItem1(talker,3829,( myself::OwnItemCount(talker,3829) - 1 ));
							myself::DeleteItem1(talker,3828,myself::OwnItemCount(talker,3828));
							myself::SetMemoState(talker,420,8);
							myself::ShowPage(talker,"wyrm_suzet_q0420_06.htm");
							myself::SetJournal(talker,420,7);
						}
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,420) == 1 && myself::GetMemoState(talker,420) == 8 && myself::OwnItemCount(talker,3829) == 1 ) )
					{
						myself::SetCurrentQuestID(420);
						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,"wyrm_suzet_q0420_07.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker)
	{
		if( ask == 420 )
		{
			myself::SetCurrentQuestID(420);
			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 == 420 )
		{
			if( reply == 1 )
			{
				myself::ShowPage(talker,"wyrm_suzet_q0420_03.htm");
			}
			if( reply == 2 )
			{
				if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
				{
					talker.quest_last_reward_time = myself::GetCurrentTick();
					myself::GiveItem1(talker,3828,1);
					myself::DeleteItem1(talker,3821,myself::OwnItemCount(talker,3821));
					myself::SetMemoState(talker,420,7);
					myself::ShowPage(talker,"wyrm_suzet_q0420_04.htm");
					myself::SetJournal(talker,420,6);
				}
			}
		}
		super;
	}

}
