class 1 trader_liesel : merchant
{
property:
	BuySellList SellList0 = {{"dye_s1c3_d";20};{"dye_s1d3_d";20};{"dye_c1s3_d";20};{"dye_c1d3_d";20};{"dye_d1s3_d";20};{"dye_d1c3_d";20};{"dye_i1m3_d";20};{"dye_i1w3_d";20};{"dye_m1i3_d";20};{"dye_m1w3_d";20};{"dye_w1i3_d";20};{"dye_w1m3_d";20};{"dye_s1c2_d";20};{"dye_s1d2_d";20};{"dye_c1s2_d";20};{"dye_c1d2_d";20};{"dye_d1s2_d";20};{"dye_d1c2_d";20};{"dye_i1m2_d";20};{"dye_i1w2_d";20};{"dye_m1i2_d";20};{"dye_m1w2_d";20};{"dye_w1i2_d";20};{"dye_w1m2_d";20};{"dye_s1c3_c";20};{"dye_s1d3_c";20};{"dye_c1s3_c";20};{"dye_c1c3_c";20};{"dye_d1s3_c";20};{"dye_d1c3_c";20};{"dye_i1m3_c";20};{"dye_i1w3_c";20};{"dye_m1i3_c";20};{"dye_m1w3_c";20};{"dye_w1i3_c";20};{"dye_w1m3_c";20};{"dye_s1c2_c";20};{"dye_s1d2_c";20};{"dye_c1s2_c";20};{"dye_c1c2_c";20};{"dye_d1s2_c";20};{"dye_d1c2_c";20};{"dye_i1m2_c";20};{"dye_i1w2_c";20};{"dye_m1i2_c";20};{"dye_m1w2_c";20};{"dye_w1i2_c";20};{"dye_w1m2_c";20};{"dye_s2c4_c";20};{"dye_s2d4_c";20};{"dye_c2s4_c";20};{"dye_c2c4_c";20};{"dye_d2s4_c";20};{"dye_d2c4_c";20};{"dye_i2m4_c";20};{"dye_i2w4_c";20};{"dye_m2i4_c";20};{"dye_m2w4_c";20};{"dye_w2i4_c";20};{"dye_w2m4_c";20};{"dye_s2c3_c";20};{"dye_s2d3_c";20};{"dye_c2s3_c";20};{"dye_c2c3_c";20};{"dye_d2s3_c";20};{"dye_d2c3_c";20};{"dye_i2m3_c";20};{"dye_i2w3_c";20};{"dye_m2i3_c";20};{"dye_m2w3_c";20};{"dye_w2i3_c";20};{"dye_w2m3_c";20};{"dye_s3c5_c";20};{"dye_s3d5_c";20};{"dye_c3s5_c";20};{"dye_c3c5_c";20};{"dye_d3s5_c";20};{"dye_d3c5_c";20};{"dye_i3m5_c";20};{"dye_i3w5_c";20};{"dye_m3i5_c";20};{"dye_m3w5_c";20};{"dye_w3i5_c";20};{"dye_w3m5_c";20};{"dye_s3c4_c";20};{"dye_s3d4_c";20};{"dye_c3s4_c";20};{"dye_c3c4_c";20};{"dye_d3s4_c";20};{"dye_d3c4_c";20};{"dye_i3m4_c";20};{"dye_i3w4_c";20};{"dye_m3i4_c";20};{"dye_m3w4_c";20};{"dye_w3i4_c";20};{"dye_w3m4_c";20};{"dye_s4c6_c";20};{"dye_s4d6_c";20};{"dye_c4s6_c";20};{"dye_c4c6_c";20};{"dye_d4s6_c";20};{"dye_d4c6_c";20};{"dye_i4m6_c";20};{"dye_i4w6_c";20};{"dye_m4i6_c";20};{"dye_m4w6_c";20};{"dye_w4i6_c";20};{"dye_w4m6_c";20};{"dye_s4c5_c";20};{"dye_s4d5_c";20};{"dye_c4s5_c";20};{"dye_c4c5_c";20};{"dye_d4s5_c";20};{"dye_d4c5_c";20};{"dye_i4m5_c";20};{"dye_i4w5_c";20};{"dye_m4i5_c";20};{"dye_m4w5_c";20};{"dye_w4i5_c";20};{"dye_w4m5_c";20}};
	BuySellList SellList1 = {{"soulshot_none";20};{"spiritshot_none";20};{"blessed_spiritshot_none";20};{"comp_bspiritshot_none";20};{"comp_spiritshot_none";20};{"comp_soulshot_none";20};{"adv_comp_bspiritshot_none";20};{"adv_comp_spiritshot_none";20};{"adv_comp_soulshot_none";20};{"wooden_arrow";20};{"bone_arrow";20};{"fine_steel_arrow";20};{"lesser_healing_potion";20};{"healing_potion";20};{"antidote";20};{"advanced_antidote";20};{"bandage";20};{"emergency_dressing";20};{"quick_step_potion";20};{"swift_attack_potion";20};{"potion_of_acumen2";20};{"scroll_of_awake";20};{"scroll_of_escape";20};{"scroll_of_resurrection";20};{"scroll_of_escape_to_agit";20};{"scroll_of_escape_to_castle";20};{"spirit_ore";20};{"soul_ore";20};{"energy_stone";20};{"key_of_thief";20};{"rope_of_magic_d";20};{"rope_of_magic_c";20};{"rope_of_magic_b";20};{"rope_of_magic_a";20};{"gemstone_d";20};{"gemstone_c";20};{"gemstone_b";20};{"bone_bolt";20};{"steel_bolt";20};{"scroll_recovery_ng";20};{"scroll_recovery_d";20};{"scroll_recovery_c";20};{"scroll_recovery_b";20};{"scroll_recovery_a";20};{"elixir_of_life_ng";20};{"elixir_of_life_d";20};{"elixir_of_life_c";20};{"elixir_of_cp_ng";20};{"elixir_of_cp_d";20};{"elixir_of_cp_c";20};{"elixir_of_cp_b";20};{"elixir_of_cp_a";20};{"summoning_crystal";20};{"mysterious_solvent";20};{"a_bottle_of_souls";20};{"dice_heart";20};{"dice_spade";20};{"dice_clover";20};{"dice_diamond";20}};

handler:
	EventHandler TALK_SELECTED(fhtml0,talker)
	{
		if( _from_choice == 0 )
		{
			if( talker.level >= 74 && myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself::AddChoice(0,"Whereabouts of the Archaeologist");
			}
			if( talker.level < 74 && myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 0 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 1;
				myself::AddChoice(1,"Whereabouts of the Archaeologist");
			}
			if( myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 1 )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 2;
				myself::AddChoice(2,"Whereabouts of the Archaeologist");
			}
			if( myself::HaveMemo(talker,14) == 1 && myself::GetOneTimeQuestFlag(talker,14) == 0 && myself::GetMemoState(talker,14) == ( ( 1 * 10 ) + 1 ) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 3;
				myself::AddChoice(3,"Whereabouts of the Archaeologist");
			}
			if( _choiceN > 1 )
			{
				myself::ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			switch(_code)
			{
				case 0:
				{
					if( _from_choice == 0 || ( talker.level >= 74 && myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 0 ) )
					{
						myself::SetCurrentQuestID(14);
						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::GetMemoCount(talker) < 26 )
						{
							myself::FHTML_SetFileName(fhtml0,"trader_liesel_q0014_0101.htm");
							myself::FHTML_SetInt(fhtml0,"quest_id",14);
							myself::ShowFHTML(talker,fhtml0);
						}
						else
						{
							myself::ShowPage(talker,"fullquest.htm");
						}
					}
					break;
				}
				case 1:
				{
					if( _from_choice == 0 || ( talker.level < 74 && myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 0 ) )
					{
						myself::SetCurrentQuestID(14);
						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_liesel_q0014_0103.htm");
					}
					break;
				}
				case 2:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,14) == 0 && myself::GetOneTimeQuestFlag(talker,14) == 1 ) )
					{
						myself::SetCurrentQuestID(14);
						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,"finishedquest.htm");
					}
					break;
				}
				case 3:
				{
					if( _from_choice == 0 || ( myself::HaveMemo(talker,14) == 1 && myself::GetOneTimeQuestFlag(talker,14) == 0 && myself::GetMemoState(talker,14) == ( ( 1 * 10 ) + 1 ) ) )
					{
						myself::SetCurrentQuestID(14);
						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_liesel_q0014_0105.htm");
					}
					break;
				}
			}
			return;
		}
		super;
	}

	EventHandler QUEST_ACCEPTED(quest_id,talker)
	{
		if( quest_id == 14 )
		{
			myself::SetCurrentQuestID(14);
			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::SetMemo(talker,14);
				myself::SetMemoState(talker,14,( ( 1 * 10 ) + 1 ));
				myself::AddLog(1,talker,14);
				myself::SetFlagJournal(talker,14,1);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
				myself::ShowPage(talker,"trader_liesel_q0014_0104.htm");
				myself::GiveItem1(talker,7253,1);
			}
			return;
		}
		super;
	}

}
