View Full Version : sort supplies
Hetcolt
02-04-2016, 06:56 PM
hello guys,
I'm using this script to sort my supplies and there is following porblem:
sometimes it sorts a backpack into the for example "rune backpack" and bot stopps,how can i fix it ?
local items = {3155}
local MainBP = "Backpack"
local PotionsBP = "Grey Backpack"
Module.New("Sort Supplies", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(items, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(PotionsBP):Index())
break
end
end
end)
gajonxd
02-04-2016, 07:59 PM
edit i add this to pastebin http://pastebin.com/tyHyKJ7K
fuck u must add one line :
local SuppliesBackpack = "zaoan chess box"
dean015
02-05-2016, 06:37 PM
edit i add this to pastebin http://pastebin.com/tyHyKJ7K
fuck u must add one line :
local SuppliesBackpack = "zaoan chess box"
i just added this to my script but its not moving supplies from mainbp (bp of holding) but its moving supplies from my stack bp
any idea why?
thanks
kamilqq
02-06-2016, 01:20 AM
i just added this to my script but its not moving supplies from mainbp (bp of holding) but its moving supplies from my stack bp
any idea why?
thanks
--[[
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)
Use my. Its friendly and easy to set up :) enjoy.
Unimatrixx
03-02-2016, 07:26 PM
Thanks for this. Have my entire script sorted, but had a huge quarrel with my containers ;p
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.