class 1 trader_kunai : merchant_for_newbie
{
property:
	BuySellList SellList0 = {{"pants";15};{"shirt";15};{"leather_pants";15};{"leather_shirt";15};{"hard_leather_pants";15};{"wooden_gaiters";15};{"wooden_breastplate";15};{"tights_pants";15};{"tights_shirt";15};{"bone_breastplate";15};{"bone_gaiters";15};{"leather_shield";15};{"small_shield";15};{"buckler";15};{"round_shield";15};{"short_gloves";15};{"short_leather_gloves";15};{"gloves";15};{"leather_gloves";15};{"apprentice_s_shoes";15};{"cloth_shoes";15};{"leather_sandals";15};{"crude_leather_shoes";15};{"cotton_shoes";15};{"leather_shoes";15};{"low_boots";15};{"cloth_cap";15};{"leather_cap";15};{"wooden_helmet";15};{"leather_helmet";15};{"cotton_shirt";15};{"striped_cotton_shirt";15}};
	BuySellList SellList1 = {{"hose";15};{"tunic";15};{"cotton_hose";15};{"cotton_tunic";15};{"feriotic_hose";15};{"feriotic_tunic";15};{"leather_hose";15};{"leather_tunic";15};{"hose_of_devotion";15};{"tunic_of_devotion";15};{"leather_shield";15};{"small_shield";15};{"buckler";15};{"round_shield";15};{"short_gloves";15};{"short_leather_gloves";15};{"gloves";15};{"leather_gloves";15};{"apprentice_s_shoes";15};{"cloth_shoes";15};{"leather_sandals";15};{"crude_leather_shoes";15};{"cotton_shoes";15};{"leather_shoes";15};{"low_boots";15};{"cloth_cap";15};{"leather_cap";15};{"wooden_helmet";15};{"leather_helmet";15};{"cotton_shirt";15};{"striped_cotton_shirt";15}};

handler:
	EventHandler TALK_SELECTED(talker)
	{
		if( _from_choice == 0 )
		{
			if( myself::HaveMemo(talker,4) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Long Live the Paagrio Lord");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			if( _code == 0 )
			{
				if( _from_choice == 0 || myself::HaveMemo(talker,4) == 1 )
				{
					myself::SetCurrentQuestID(4);
					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,1545) < 1 )
					{
						if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
						{
							talker.quest_last_reward_time = myself::GetCurrentTick();
							myself::ShowPage(talker,"trader_kunai_q0004_01.htm");
							myself::GiveItem1(talker,1545,1);
							if( ( ( ( ( ( myself::OwnItemCount(talker,1541) + myself::OwnItemCount(talker,1542) ) + myself::OwnItemCount(talker,1543) ) + myself::OwnItemCount(talker,1544) ) + myself::OwnItemCount(talker,1545) ) + myself::OwnItemCount(talker,1546) ) >= 5 )
							{
								myself::SetFlagJournal(talker,4,2);
							}
							myself::SoundEffect(talker,"ItemSound.quest_itemget");
						}
					}
					else if( myself::OwnItemCount(talker,1545) >= 1 )
					{
						myself::ShowPage(talker,"trader_kunai_q0004_02.htm");
					}
				}
			}
			return;
		}
		super;
	}

}
