Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- label:deposit
- delay:5000
- function:[[
- --deposit
- function moveItem(item, destination)
- return g_game.move(item, destination:getSlotPosition(destination:getItemsCount()), item:getCount())
- end
- local moveFromBp = "magiczny plecak" -- nazwa bp, w ktorym masz itemy
- local moveToBp = "locker" -- nazwa depo
- local itemsIdToMove = {6548} -- ID przedmiotów, które mają być przenoszone do depot {1010,1010,0101,1010,1111}
- local moveTo = nil
- for i, container in pairs(getContainers()) do
- if container:getName() == moveToBp and container:getItemsCount() < container:getCapacity() then
- moveTo = container
- end
- end
- if moveTo then
- for i, container in pairs(getContainers()) do
- if container:getName() == moveFromBp then
- for j, item in pairs(container:getItems()) do
- if table.contains(itemsIdToMove, item:getId()) then
- moveItem(item, moveTo)
- return "retry"
- end
- end
- end
- end
- end
- return true
- ]]
- delay:1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement