PDA

View Full Version : Move Item Main BP to LootBP



juca.marlow
05-01-2020, 05:25 PM
local itensLoot = {7386,7407,10389,811,7421,7412,8074,812,7407,3428, 7451,7404,3079,20062}
local MainBP = "deepling backpack"
local OtherBP = "orange Backpack"

Module.New("Sort Supplies", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(itensLoot, item.id)) then

bp1:MoveItemToContainer(spot, Container.New(OtherBP):Index())
break
end
end
end)



He is transferring the item to Slot 1, but there are other BPs, he throws the item into the Bp (which is in slot 1) until it is full and does not transfer anymore

shirispa
05-06-2020, 11:02 AM
Nice thanks

Byggemand Bob
05-08-2020, 11:53 AM
What if you would want it to move items from Depot slot 1 to a backpack?