XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 6 of 6

Thread: Item Sorter .Lua script

  1. #1

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Item Sorter .Lua script

    Hello i'd like to share my script.
    Its item sorter, it works smoothly.
    Here you are.
    lua code:

    --[[

    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)


  2. #2

    Join Date
    Sep 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What if I'm trying to sort multiple items? Like for example Potions and Runes?

  3. #3
    retsamfrost's Avatar
    Join Date
    Jan 2014
    Location
    Netherlands
    Posts
    333
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    thank you so much for this

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





    Trades:
    Sold unregistered knight lvl 61 @asbez
    Bought RP 207 @ragnir

  4. #4

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by retsamfrost View Post
    thank you so much for this

    it was the last piece i needed for my full afk script
    i though u are a scripter its about 5 minutes to write something like this

  5. #5
    retsamfrost's Avatar
    Join Date
    Jan 2014
    Location
    Netherlands
    Posts
    333
    Mentioned
    34 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kamilqq View Post
    i though u are a scripter its about 5 minutes to write something like this
    im not really a scripter i just know enough to make easy afk scripts :P





    Trades:
    Sold unregistered knight lvl 61 @asbez
    Bought RP 207 @ragnir

  6. #6

    Join Date
    Jan 2014
    Posts
    183
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wannabe View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •