function NPC_TradeSoulStones()
dlg_title(" ")
dlg_text("Did I tell you we, soulcrafters, posess the ancient power of creating the mighty Teardrop Stones? All you need to give me is 200 of the equivalent Lv150 Soulstones.")
for i = 810201, 810214, 1
do
if find_item(i) >= 200 then
local count = math.floor(find_item(i)/200)
dlg_menu("x"..tostring(count).." "..get_item_name_by_code(i+100), "NPC_TradeSoulStones_Trade("..i..","..count..")")
end
end
dlg_menu("Go back", "NPC_Jewelry_contact()")
dlg_menu("Close", "")
dlg_show()
end
function NPC_TradeSoulStones_Trade(id,count)
-- Remove the soulstones;
delete_item(get_item_handle(id), count*200)
insert_item(id+100, count, 0, 1, 2)
cprint("You've given x" ..tostring(count*200).. " "..get_item_name_by_code(id).." to the to the Soulcrafter and received x"..tostring(count).." "..get_item_name_by_code(id+100).." in return.")
end