PDA

View Full Version : Withdraw woi from inbox



Kreniarz
04-30-2016, 12:11 PM
Hi.
i need a script - withdraw item from inbox (wand of inferno) and put to the main backpack (blue backpack)

kreteno
05-05-2016, 01:21 PM
This is the script that I use, but it doesn't open backpacks autmoaticly, if anyone could add that in that would be awesome.



local itemSort = 6299 -- itemID or itemName to sort.
local backpackSortFrom = 'Your inbox' -- backpack ID or Name where item you want to sort is.
local backpackSortTo = 'Green backpack' -- backpack ID or Name where you want to sort item.
local dLay = 0 -- Delay beetwen sorting. make it 0 if you want just to sort your items, and make like 5000 if u use it while exp.

local itemSorter = function(sortItem, from, to)
local fromBp = Container.New(from)
local toBp = Container.New(to)
if type(sortItem) == 'number' then
for spot, item in (fromBp:iItems()) do
if item.id == sortItem then
fromBp:MoveItemToContainer(spot, toBp:Index())
end
end
elseif type(sortItem) == 'string' then
for spot, item in (fromBp:iItems()) do
if item.name == sortItem then
fromBp:MoveItemToContainer(spot, toBp:Index())
end
end
end
end
Module.New('Sorter', function(this)
itemSorter(itemSort, backpackSortFrom, backpackSortTo)
this:Delay(dLay)
end)

mrok89
11-07-2016, 08:23 PM
Is it possible to withdraw more than one item?