Updated with the tips in the post below
Code: Select all
function removeItems()
local items = {}
for c = 1, 4 do
local champion = party.party:getChampion(c)
if champion:getEnabled() then
for slot = ItemSlot.BackpackFirst, ItemSlot.BackpackLast do
local item = champion:getItem(slot)
if item then
table.insert(items, item)
champion:removeItem(item)
end
end
end
end
for _,item in pairs(items) do
chest_37.surface:addItem(item)
end
end
And replace chest_1 with the id of your chest