M2 Download Center
Download Here ( Internal )
quest clean_inventory begin
state start begin
when 9005.chat."Empty your inventory" begin
say_title(mob_name(npc.get_race()))
say("Inventory which you choose will be empty.")
say("Pay attention when you make your choice.")
say_reward("Choose the inventory which you want to empty.")
local s = select("Inventory - I","Inventory - II","Remove all items","Cancel")
if s == 1 then
say("Do you really want to empty Inventory I?")
if select("Yes","No") == 2 then
return
end
clean_inventory.empty(0,44)
elseif s == 2 then
say("Do you really want to empty Inventory II?")
if select("Yes","No") == 2 then
return
end
clean_inventory.empty(45,89)
elseif s == 3 then
say("Do you really want to remove all items except")
say("equipments?")
if select("Yes","No") == 2 then
return
end
clean_inventory.empty(0,89)
else
return
end
end
function empty(a,b)
for i=a, b do
item.select_cell(i)
item.remove()
end
end
end
end