Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getSpot(to)
- if type(to) == 'number' or type(to) == 'string' then
- cont = Container(to)
- else
- cont = to
- end
- for i = 0 , cont:ItemCapacity()-1 do
- if (not Item.isContainer(cont:GetItemData(i).id)) then
- local slot = i
- return slot
- end
- end
- return 0
- end
- end
- -- {{bp,id,id,id},{otherbp,id,id,id}}
- local Sorter = {{SupplyBP,AvalancheID,SDID,ManaID}}
- sorter = Module.New("sorter", function(mod)
- for i = 1, #Sorter do
- local data = Sorter[i]
- local cont = Container(data[1])
- if cont:isOpen() then
- local ind = cont:Index()
- bp = Container.GetFirst()
- while bp:isOpen() do
- if bp:Index() ~= ind then
- for j = bp:ItemCount()-1, 0, -1 do
- local item = bp:GetItemData(j)
- if table.contains(data,item.id) then
- bp:MoveItemToContainer(j,ind,getSpot(ind),item.count)
- wait(400,700)
- end
- end
- end
- bp = bp:GetNext()
- end
- end
- end
- end,false)
- if Sorter and Sorter ~= {} then
- sorte
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement