Drop items multiple locations
#62
This allows you to specify multiple locations to drop items.
If your char is within "dropDistance" it will drop the items to that location.
If your char is within "dropDistance" it will drop the items to that location.
local itemToDrop = { 3031, 3372, 3377, 3358, 3357, 3359, 3362, 3558 }
local dropDistance = 3
local dPos = {
{ x = 889, y = 974, z = 6 },
{ x = 893, y = 970, z = 6 },
{ x = 897, y = 974, z = 6 },
}
dropTrash = macro(1000, "DropTrash", function(m)
local dropPos = nil
if dropTrash:isOn() then
local pos = player:getPosition()
for i = 1, #dPos do
if getDistanceBetween(player:getPosition(), dPos[i]) <= dropDistance then
dropPos = dPos[i]
break
end
end
if dropPos then
for _, container in pairs(g_game.getContainers()) do
for __, item in ipairs(container:getItems()) do
if table.find(itemToDrop, item:getId()) then
return g_game.move(item, dropPos, 1)
end
end
end
end
end
end)
- remove | + add
10 Oct 2021