PDA

View Full Version : Move item from Mail box to backpack problem;/



dekros
02-15-2016, 09:04 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

but add items to random bp or do nothink and print add;//

M4N93
05-18-2016, 05:17 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

but add items to random bp or do nothink and print add;//

YO! I used this and its awesome but it get stuck after withdrawing 31 items? :S always 31 items somehow. u know how to fix this? :P