PDA

View Full Version : Sorcerer Withdraw items from Inbox



Elder' Mariusz
06-13-2016, 06:32 PM
Hello guys, I found this script on forum (it's not mine)

local container = 'orange backpack' -- where deposit items

function withdraw()
local contfrom = Container.New('Your Inbox')
local contto = Container.New(container)
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
if contfrom:isOpen() and contto:isOpen() then
for slot, items in contfrom:iItems() do
while Self.Cap() - Item.GetWeight(items.id) >= 1 do
if not contto:isFull() then
contfrom:MoveItemToContainer(slot, contto:Index(), 19, 100)
wait(300, 1200)
break
else
for spot, item in contto:iItems() do
if item.id == Item.GetID(container) then
contto:UseItem(spot, true)
wait(500, 1600)
end
end
end
if Self.Cap() - Item.GetWeight(items.id) < 1 then
error('You need '..math.floor((Item.GetWeight(items.id)+1)-Self.Cap())..' capity to pickup item.')
break
end
end
end
end
end

function checking(label)
if label == 'mail' then
Self.CloseContainers()
wait(300, 700)
Self.OpenMainBackpack()
wait(500, 900)
Self.OpenLocker()
wait(300, 1200)
withdraw()
end
end
registerEventListener(WALKER_SELECTLABEL, 'checking')

and there is a problem, I had 7000 cap I left my char for 5 minutes to withdraw items, and he withdrawed 2 bp of items to 5500 cap and stopped in front of dp... can someone help me how to repair it? to withdrawing when cap above 150 ? ty

Trykon
06-13-2016, 06:40 PM
local container = 'backpack' --write your main bp's name
local InboxFull = true -- don't touch
local BpsCount = 6 -- amount of your stacked bps, these have to be stacked properly and without any items inside
local CurItems = 0 -- don't touch
function withdraw()
local cfrom = Container.New('Your Inbox')
local cto = Container.New(container)
while not cfrom:isOpen() do
cfrom = 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
if cfrom:isOpen() and cto:isOpen() then
while (cfrom:ItemCount() >= 0) do
local slot = 0
if(cfrom:ItemCount() == 0) then
InboxFull = false
break
else
InboxFull = true
end
local items = cfrom:GetItemData(slot)
if Self.Cap() - Item.GetWeight(items.id) < 1 then
error('You need '..math.floor((Item.GetWeight(items.id)+1)-Self.Cap())..' cap to pick this item.')
break
end
while Self.Cap() - Item.GetWeight(items.id) >= 1 do
if not cto:isFull() then
if (CurItems < (BpsCount * 19)) then
cfrom:MoveItemToContainer(slot, cto:Index(), 19, 100)
wait(300, 1200)
CurItems = CurItems + 1
break
else
BpFull = true
break
end
else
for spot, item in cto:iItems() do
if Item.isContainer(item.id) then
cto:UseItem(spot, true)
wait(500, 1600)
end
end
end
end
if (BpFull == true) then
error('Your bp is full.')
break
end
end
end
end
enjoy :)

Elder' Mariusz
06-14-2016, 07:19 AM
[QUOTE=Trykon;487332]

local container = 'backpack' --write your main bp's name
local InboxFull = true -- don't touch
local BpsCount = 6 -- amount of your stacked bps, these have to be stacked properly and without any items inside
local CurItems = 0 -- don't touch
function withdraw()
local cfrom = Container.New('Your Inbox')
local cto = Container.New(container)
while not cfrom:isOpen() do
cfrom = 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
if cfrom:isOpen() and cto:isOpen() then
while (cfrom:ItemCount() >= 0) do
local slot = 0
if(cfrom:ItemCount() == 0) then
InboxFull = false
break
else
InboxFull = true
end
local items = cfrom:GetItemData(slot)
if Self.Cap() - Item.GetWeight(items.id) < 1 then
error('You need '..math.floor((Item.GetWeight(items.id)+1)-Self.Cap())..' cap to pick this item.')
break
end
while Self.Cap() - Item.GetWeight(items.id) >= 1 do
if not cto:isFull() then
if (CurItems < (BpsCount * 19)) then
cfrom:MoveItemToContainer(slot, cto:Index(), 19, 100)
wait(300, 1200)
CurItems = CurItems + 1
break
else
BpFull = true
break
end
else
for spot, item in cto:iItems() do
if Item.isContainer(item.id) then
cto:UseItem(spot, true)
wait(500, 1600)
end
end
end
end
if (BpFull == true) then
error('Your bp is full.')
break
end
end
end
end
enjoy :)[/QUOTE

something is wrong bro cuz I can't run it in scripter