@LabelIndex 278455
@StringIndex 36197
class 0 trader_jakaron : merchant_for_newbie {
property:
	BuySellList SellList0 = {{"small_sword";15};{"club";15};{"bone_dagger";15};{"short_bow";15};{"broad_sword";15};{"heavy_chisel";15};{"knife";15};{"doomed_dagger";15};{"bow";15};{"mace";15};{"sickle";15};{"brandish";15};{"gladius";15};{"orcish_sword";15};{"handmade_sword";15};{"dwarven_mace";15};{"dirk";15};{"hunting_bow";15};{"long_sword";15};{"throw_knife";15};{"bow_of_forest";15};{"short_spear";15};{"zweihander";15};{"spike_glove";15};{"iron_glove";15};{"fox_s_nail";15};{"cestus";15}};
	BuySellList SellList1 = {{"apprentice_s_rod";15};{"buffalo_horn";15};{"willow_staff";15};{"apprentice_s_spellbook";15};{"cedar_staff";15};{"apprentice_s_staff";15};{"relic_of_saints";15};{"cotton_shirt";15};{"striped_cotton_shirt";15}};

handler:
	EventHandler TALK_SELECTED(talker) {
		if( _from_choice == 0 ) {
			if( gg::HaveMemo(talker,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3393) >= 1 && gg::OwnItemCount(talker,3406) == 0 && gg::OwnItemCount(talker,3405) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Test of the Lord (In Progress)");
			}
			if( gg::HaveMemo(talker,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3393) >= 1 && gg::OwnItemCount(talker,3405) >= 1 && gg::OwnItemCount(talker,3406) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Test of the Lord (In Progress)");
			}
			if( gg::HaveMemo(talker,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3406) >= 1 && gg::OwnItemCount(talker,3393) == 0 ) {
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Test of the Lord (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,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3393) >= 1 && gg::OwnItemCount(talker,3406) == 0 && gg::OwnItemCount(talker,3405) == 0 ) ) {
						myself::SetCurrentQuestID(232);
						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( gg::OwnItemCount(talker,57) >= 1000 ) {
							myself::ShowPage(talker,"trader_jakaron_q0232_01.htm");
						} else {
							myself::ShowPage(talker,"trader_jakaron_q0232_03.htm");
						}
					}
					break;
				}
				case 1: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3393) >= 1 && gg::OwnItemCount(talker,3405) >= 1 && gg::OwnItemCount(talker,3406) == 0 ) ) {
						myself::SetCurrentQuestID(232);
						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_jakaron_q0232_04.htm");
					}
					break;
				}
				case 2: {
					if( _from_choice == 0 || ( gg::HaveMemo(talker,232) == 1 && gg::OwnItemCount(talker,3391) >= 1 && gg::OwnItemCount(talker,3406) >= 1 && gg::OwnItemCount(talker,3393) == 0 ) ) {
						myself::SetCurrentQuestID(232);
						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_jakaron_q0232_05.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler MENU_SELECTED(ask,reply,talker) {
		if( ask == 232 ) {
			myself::SetCurrentQuestID(232);
			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 == 232 ) {
			if( reply == 1 ) {
				if( gg::OwnItemCount(talker,57) >= 1000 ) {
					if( ( myself::GetCurrentTick() - talker.quest_last_reward_time ) > 1 ) {
						talker.quest_last_reward_time = myself::GetCurrentTick();
						myself::ShowPage(talker,"trader_jakaron_q0232_02.htm");
						myself::GiveItem1(talker,3405,1);
						myself::DeleteItem1(talker,57,1000);
					}
				} else {
					myself::ShowPage(talker,"trader_jakaron_q0232_03a.htm");
				}
			}
		}
		super;
	}

}
