Files
Leviathan/GameServer/AziaMafiaScriptsBackup/Other/ETC_SoulstonesToTeardrops.lua
T
2026-06-01 12:46:52 +02:00

29 lines
924 B
Lua

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 <b>x" ..tostring(count*200).. " "..get_item_name_by_code(id).."</b> to the to the Soulcrafter and received <b>x"..tostring(count).." "..get_item_name_by_code(id+100).."</b> in return.")
end