@LabelIndex 260265
@StringIndex 32934
class 0 trader_edroc : merchant {
property:
	BuySellList SellList0 = {{"tights_pants";30};{"tights_shirt";30};{"bone_breastplate";30};{"bone_gaiters";30};{"piece_bone_breastplate";30};{"bronze_breastplate";30};{"hard_leather_gaiters";30};{"piece_bone_gaiters";30};{"hard_leather_shirt";30};{"bronze_gaiters";30};{"puma_skin_gaiters";30};{"ring_breastplate";30};{"iron_plate_gaiters";30};{"puma_skin_shirt";30};{"lion_skin_gaiters";30};{"lion_skin_shirt";30};{"mithril_breastplate";30};{"mithril_gaiters";30};{"round_shield";30};{"bone_shield";30};{"bronze_shield";30};{"aspis";30};{"leather_gloves";30};{"bracer";30};{"excellence_leather_gloves";30};{"leather_gauntlet";30};{"low_boots";30};{"boots";30};{"leather_boots";30};{"blue_buckskin_boots";30};{"leather_helmet";30};{"hard_leather_helmet";30};{"bone_helmet";30};{"bronze_helmet";30};{"mithril_banded_gaiters";30};{"mithril_banded_mail";30};{"cotton_shirt";30};{"linen_shirt";30};{"striped_cotton_shirt";30};{"striped_linen_shirt";30}};
	BuySellList SellList1 = {{"hose_of_devotion";30};{"tunic_of_devotion";30};{"hose_of_magicpower";30};{"tunic_of_magicpower";30};{"cursed_hose";30};{"cursed_tunic";30};{"dark_hose";30};{"white_tunic";30};{"mage_s_hose";30};{"mage_s_tunic";30};{"hose_of_knowledge";30};{"tunic_of_knowledge";30};{"round_shield";30};{"bone_shield";30};{"bronze_shield";30};{"aspis";30};{"leather_gloves";30};{"bracer";30};{"excellence_leather_gloves";30};{"leather_gauntlet";30};{"low_boots";30};{"boots";30};{"leather_boots";30};{"blue_buckskin_boots";30};{"leather_helmet";30};{"hard_leather_helmet";30};{"bone_helmet";30};{"bronze_helmet";30};{"cotton_shirt";30};{"linen_shirt";30};{"striped_cotton_shirt";30};{"striped_linen_shirt";30}};
	BuySellList SellList4 = {{"12014";30};{"12008";30};{"12012";30};{"12015";30};{"12020";30};{"12021";30};{"12031";30};{"12041";30};{"12013";30};{"12025";30};{"12007";30};{"12016";30};{"12006";30};{"12029";30};{"12009";30};{"12028";30};{"12042";30};{"12043";30}};
	BuySellList SellList5 = {{"12011";30};{"12010";30};{"12017";30};{"12022";30};{"12019";30};{"12018";30};{"12048";30};{"12047";30};{"12013";30};{"12025";30};{"12007";30};{"12016";30};{"12006";30};{"12029";30};{"12009";30};{"12028";30}};

handler:
	EventHandler TALK_SELECTED(talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) >= 1 && gg::OwnItemCount(talker,2702) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Trial of the Scholar (In Progress)");
			}
			if( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) >= 1 && gg::OwnItemCount(talker,2704) >= 1 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Trial of the Scholar (In Progress)");
			}
			if( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) == 1 && ( gg::OwnItemCount(talker,2713) >= 1 || gg::OwnItemCount(talker,2705) >= 1 ) ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Trial of the Scholar (In Progress)");
			}
			if( _choiceN > 1 ) {
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 ) {
			switch(_code) {
				case 0: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) >= 1 && gg::OwnItemCount(talker,2702) >= 1 ) ) {
						myself::SetCurrentQuestID(214);
						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,"trader_edroc_q0214_01.htm");
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) >= 1 && gg::OwnItemCount(talker,2704) >= 1 ) ) {
						myself::SetCurrentQuestID(214);
						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,"trader_edroc_q0214_03.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,214) == 1 && gg::OwnItemCount(talker,2703) == 1 && ( gg::OwnItemCount(talker,2713) >= 1 || gg::OwnItemCount(talker,2705) >= 1 ) ) ) {
						myself::SetCurrentQuestID(214);
						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,"trader_edroc_q0214_04.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 214 ) {
			myself::SetCurrentQuestID(214);
			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 == 214 ) {
			if( reply == 1 ) {
				if( gg::OwnItemCount(talker,2702) >= 1 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::ShowPage(talker,"trader_edroc_q0214_02.htm");
						myself::SetFlagJournal(talker,214,24);
						myself::ShowQuestMark(talker,214);
						myself::SoundEffect(talker,"ItemSound.quest_middle");
						myself::DeleteItem1(talker,2702,1);
						myself::GiveItem1(talker,2704,1);
					}
				}
			}
		}
		super;
	}

}
