PDA

View Full Version : withdraw items



Heishen
08-07-2020, 04:15 PM
znalazlem cos takiego ale nie dziala do konca automatycznie nie otwiera mi depotu 1 moglby ktos pomoc?

local toBackpack = "yellow backpack" -- name of backpack
local contfrom = Container.New('Depot Chest')
Self.OpenMainBackpack(true)
while not contfrom:isOpen() do
locker = Container.New("Locker")
if not locker:isOpen() then -- opens locker
Self.OpenLocker()
wait(800, 1000)
end
local dp = Container.New('Locker')
for mailspot, touse in dp:iItems() do
if touse.id == 3502 then
dp:UseItem(mailspot, true)
wait(500, 1700)
contfrom = Container.New('Depot Box I')
end
end
end
while contfrom:isOpen() do
local DestinationBp = Container.GetByName(toBackpack)
local item = contfrom:GetItemData(0)
if not (Self.Cap() - Item.GetWeight(item.id)*item.count < 1) and contfrom:ItemCount() > 0 then
if DestinationBp:ItemCount() == DestinationBp:ItemCapacity() then
DestinationBp:UseItem(DestinationBp:ItemCount()-1,true)
else
contfrom:MoveItemToContainer(0,DestinationBp:Index (),DestinationBp:ItemCount())
wait(500,550)
end
else
Empty = true
end
if Empty then break end
end