class 1 leikar : citizen
{
handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,33) == 1 && myself::GetOneTimeQuestFlag(talker,33) == 0 && myself::GetMemoState(talker,33) == ( ( 1 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Make a Pair of Dress Shoes (Continue)");
			}
			if( myself::HaveMemo(talker,33) == 1 && myself::GetOneTimeQuestFlag(talker,33) == 0 && myself::GetMemoState(talker,33) == ( ( 2 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Make a Pair of Dress Shoes (Continue)");
			}
			if( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 1 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Please Make Me Formal Wear! (Continue)");
			}
			if( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 2 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Please Make Me Formal Wear! (Continue)");
			}
			if( myself::HaveMemo(talker,37) == 1 && myself::OwnItemCount(talker,7159) >= 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 5 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 4;
				myself::AddChoice(4,"Please Make Me Formal Wear! (Continue)");
			}
			if( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 6 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 5;
				myself::AddChoice(5,"Please Make Me Formal Wear! (Continue)");
			}
			if( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 7 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 6;
				myself::AddChoice(6,"Please Make Me Formal Wear! (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,33) == 1 && myself::GetOneTimeQuestFlag(talker,33) == 0 && myself::GetMemoState(talker,33) == ( ( 1 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(33);
						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::SetHTMLCookie(talker,33,1);
						myself::ShowPage(talker,"leikar_q0033_0101.htm");
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,33) == 1 && myself::GetOneTimeQuestFlag(talker,33) == 0 && myself::GetMemoState(talker,33) == ( ( 2 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(33);
						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,"leikar_q0033_0202.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 1 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(37);
						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::SetHTMLCookie(talker,37,1);
						myself::ShowPage(talker,"leikar_q0037_0101.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 2 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(37);
						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,"leikar_q0037_0202.htm");
					}
					break;
				}
				case 4:
				{
					if( _from_choice == 0 || ( ( ( myself::HaveMemo(talker,37) == 1 && ( ( 1 == 1 && myself::OwnItemCount(talker,7159) >= 1 ) || 1 == 0 ) ) && myself::GetOneTimeQuestFlag(talker,37) == 0 ) && myself::GetMemoState(talker,37) == ( ( 5 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(37);
						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::SetHTMLCookie(talker,37,5);
						myself::ShowPage(talker,"leikar_q0037_0501.htm");
					}
					break;
				}
				case 5:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 6 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(37);
						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( ( ( ( 1 == 1 && myself::OwnItemCount(talker,7076) >= 1 ) || 1 == 0 ) && ( ( 1 == 1 && myself::OwnItemCount(talker,7077) >= 1 ) || 1 == 0 ) ) && ( ( 1 == 1 && myself::OwnItemCount(talker,7078) >= 1 ) || 1 == 0 ) )
						{
							myself::SetHTMLCookie(talker,37,6);
							myself::ShowPage(talker,"leikar_q0037_0603.htm");
						}
						else
						{
							myself::ShowPage(talker,"leikar_q0037_0604.htm");
						}
					}
					break;
				}
				case 6:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 && myself::GetMemoState(talker,37) == ( ( 7 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(37);
						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( ( ( ( 1 == 1 && myself::OwnItemCount(talker,7113) >= 1 ) || 1 == 0 ) && ( ( 0 == 1 && myself::OwnItemCount(talker,0) >= 0 ) || 0 == 0 ) ) && ( ( 0 == 1 && myself::OwnItemCount(talker,0) >= 0 ) || 0 == 0 ) )
						{
							myself::SetHTMLCookie(talker,37,7);
							myself::ShowPage(talker,"leikar_q0037_0703.htm");
						}
						else
						{
							myself::ShowPage(talker,"leikar_q0037_0704.htm");
						}
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,i0,i1,quest_id,reply,talker)
	{
		if( ask == 33 )
		{
			myself::SetCurrentQuestID(33);
			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 == 33 )
		{
			i0 = myself::GetHTMLCookie(talker,33,( 2 - 1 ));
			if( i0 != -1 )
			{
				if( reply == 1 && myself::HaveMemo(talker,33) == 1 && myself::GetOneTimeQuestFlag(talker,33) == 0 )
				{
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
					{
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::ShowPage(talker,"leikar_q0033_0201.htm");
						myself::SetMemoState(talker,33,( ( 2 * 10 ) + 1 ));
						myself::SetFlagJournal(talker,33,2);
					}
				}
			}
		}
		if( ask == 37 )
		{
			myself::SetCurrentQuestID(37);
			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 == 37 )
		{
			i0 = myself::GetHTMLCookie(talker,37,( 2 - 1 ));
			if( i0 != -1 )
			{
				if( reply == 1 && myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 )
				{
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
					{
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::GiveItem1(talker,7164,1);
						myself::ShowPage(talker,"leikar_q0037_0201.htm");
						myself::SetMemoState(talker,37,( ( 2 * 10 ) + 1 ));
						myself::SetFlagJournal(talker,37,2);
					}
				}
			}
		}
		if( ask == 37 )
		{
			i0 = myself::GetHTMLCookie(talker,37,( 6 - 1 ));
			if( i0 != -1 )
			{
				if( reply == 1 && myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 )
				{
					if( myself::OwnItemCount(talker,7159) >= 1 )
					{
						if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
						{
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::DeleteItem1(talker,7159,1);
							myself::ShowPage(talker,"leikar_q0037_0601.htm");
							myself::SetMemoState(talker,37,( ( 6 * 10 ) + 1 ));
							myself::SetFlagJournal(talker,37,6);
						}
					}
					else
					{
						myself::ShowPage(talker,"leikar_q0037_0602.htm");
					}
				}
			}
		}
		if( ask == 37 )
		{
			i0 = myself::GetHTMLCookie(talker,37,( 7 - 1 ));
			if( i0 != -1 )
			{
				if( reply == 1 && myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 )
				{
					if( ( ( ( 1 == 1 && myself::OwnItemCount(talker,7076) >= 1 ) || 1 == 0 ) && ( ( 1 == 1 && myself::OwnItemCount(talker,7077) >= 1 ) || 1 == 0 ) ) && ( ( 1 == 1 && myself::OwnItemCount(talker,7078) >= 1 ) || 1 == 0 ) )
					{
						if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
						{
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::DeleteItem1(talker,7076,1);
							myself::DeleteItem1(talker,7077,1);
							myself::DeleteItem1(talker,7078,1);
							myself::ShowPage(talker,"leikar_q0037_0701.htm");
							myself::SetMemoState(talker,37,( ( 7 * 10 ) + 1 ));
							myself::SetFlagJournal(talker,37,7);
						}
					}
					else
					{
						myself::ShowPage(talker,"leikar_q0037_0702.htm");
					}
				}
			}
		}
		if( ask == 37 && myself::GetOneTimeQuestFlag(talker,37) == 0 )
		{
			i0 = myself::GetHTMLCookie(talker,37,( 8 - 1 ));
			if( i0 != -1 )
			{
				if( reply == 3 && myself::HaveMemo(talker,37) == 1 && myself::GetOneTimeQuestFlag(talker,37) == 0 )
				{
					if( myself::OwnItemCount(talker,7113) >= 1 && myself::OwnItemCount(talker,7164) >= 1 )
					{
						if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
						{
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::DeleteItem1(talker,7113,myself::OwnItemCount(talker,7113));
							myself::DeleteItem1(talker,7164,myself::OwnItemCount(talker,7164));
							myself::GiveItem1(talker,6408,1);
						}
						myself::AddLog(2,talker,37);
						myself::RemoveMemo(talker,37);
						myself::SetOneTimeQuestFlag(talker,37,1);
						myself::SoundEffect(talker,"ItemSound.quest_finish");
						myself::ShowPage(talker,"leikar_q0037_0801.htm");
					}
					else
					{
						myself::ShowPage(talker,"leikar_q0037_0802.htm");
					}
				}
			}
		}
		if( ask == 37 && reply == 10 && myself::GetOneTimeQuestFlag(talker,37) == 1 )
		{
			myself::Say(myself::MakeFString(14000,talker.name,"","","",""));
		}
		super;
	}

}
