Log in

View Full Version : Item Sorter .Lua script



kamilqq
02-06-2016, 02:33 PM
Hello i'd like to share my script.
Its item sorter, it works smoothly.
Here you are. :)

--[[

Config

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

itemSorter

]]--
-- Don't change code below.
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)

wannabe
02-26-2016, 12:27 PM
What if I'm trying to sort multiple items? Like for example Potions and Runes?

retsamfrost
02-27-2016, 11:32 PM
thank you so much for this

it was the last piece i needed for my full afk script :)

kamilqq
02-29-2016, 01:20 AM
thank you so much for this

it was the last piece i needed for my full afk script :)

i though u are a scripter :D its about 5 minutes to write something like this :D

retsamfrost
03-03-2016, 07:01 PM
i though u are a scripter :D its about 5 minutes to write something like this :D

im not really a scripter i just know enough to make easy afk scripts :P

kamilqq
03-25-2016, 09:32 PM
What if I'm trying to sort multiple items? Like for example Potions and Runes?

Check my newest thread, just made what u need. Hope u will like it.