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
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