Log in

View Full Version : Inbox withdrawer, always withdraw 31 items no more no less :S



M4N93
05-18-2016, 05:48 PM
local contfrom = Container.New('Your Inbox')
while not contfrom:isOpen() do
contfrom = Container.New('Your Inbox')
local dp = Container.New('Locker')
for mailspot, touse in dp:iItems() do
if touse.id == 12902 then
dp:UseItem(mailspot, true)
wait(500, 1700)
end
end
end
local DestinationBp = Container.GetByName("Blue Backpack")
for spot = 0, contfrom:ItemCount() do
local item = contfrom:GetItemData(spot)
if(Self.Cap() - Item.GetWeight(item.id) <1) then
Walker.Start()
break
end
if(DestinationBp:ItemCount() == 20) then
DestinationBp:UseItem(DestinationBp:ItemCount()-1,true)
end
print("add")
--if not (contains(Item.GetName(item.id),BlueDjinn)) then
contfrom:MoveItemToContainer(spot,DestinationBp:In dex(),0)
--end
wait(500,550)
end

M4N93
05-18-2016, 05:49 PM
local contfrom = Container.New('Your Inbox')
while not contfrom:isOpen() do
contfrom = Container.New('Your Inbox')
local dp = Container.New('Locker')
for mailspot, touse in dp:iItems() do
if touse.id == 12902 then
dp:UseItem(mailspot, true)
wait(500, 1700)
end
end
end
local DestinationBp = Container.GetByName("Blue Backpack")
for spot = 0, contfrom:ItemCount() do
local item = contfrom:GetItemData(spot)
if(Self.Cap() - Item.GetWeight(item.id) <1) then
Walker.Start()
break
end
if(DestinationBp:ItemCount() == 20) then
DestinationBp:UseItem(DestinationBp:ItemCount()-1,true)
end
print("add")
--if not (contains(Item.GetName(item.id),BlueDjinn)) then
contfrom:MoveItemToContainer(spot,DestinationBp:In dex(),0)
--end
wait(500,550)
end

Someone know how to fix this? :S want to withdraw untill my cap is out :D got 8000oz to cap so whould be good with like 100cap left or so. Whould be awesome if someone chould fix it

M4N93
05-18-2016, 08:11 PM
Sry for spam :P

yompa93
05-19-2016, 12:13 PM
Look at the reply below.

yompa93
05-19-2016, 12:18 PM
EDIT: Here's a better version of it.



toBackpack = "backpack"

local contfrom = Container.New('Your Inbox')
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 == 12902 then
dp:UseItem(mailspot, true)
wait(500, 1700)
contfrom = Container.New('Your Inbox')
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