seba2632
06-20-2016, 04:27 PM
Hi there.
I've recently come back to XenoBot, trying to create myself a simple loot sorter.
Basically it should take all the blue/green djinn and rashid items and put them in Depot Box I, II and III.
However somewhy, it only takes the first module and sorts my blue djinn items. Idk if I did something wrong, or if it simply just isn't possible to do multiple modules like that?
Sorry for being a noob :cool:
Here's the script:
local blueitems = {7436, 3567, 3418, 3079}
local greenitems = {3432, 3429, 7428}
local rashiditems = {7414, 19358, 7426}
local MainBP = "Pirate Backpack"
local BlueBP = "Depot Box I"
local GreenBP = "Depot Box II"
local RashidBP = "Depot Box III"
Module.New("Sort Blue Djinn", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(blueitems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(BlueBP):Index())
break
end
end
end)
Module.New("Sort Green Djinn", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(greenitems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(GreenBP):Index())
break
end
end
end)
Module.New("Sort Rashid", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(rashiditems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(RashidBP):Index())
break
end
end
end)
I've recently come back to XenoBot, trying to create myself a simple loot sorter.
Basically it should take all the blue/green djinn and rashid items and put them in Depot Box I, II and III.
However somewhy, it only takes the first module and sorts my blue djinn items. Idk if I did something wrong, or if it simply just isn't possible to do multiple modules like that?
Sorry for being a noob :cool:
Here's the script:
local blueitems = {7436, 3567, 3418, 3079}
local greenitems = {3432, 3429, 7428}
local rashiditems = {7414, 19358, 7426}
local MainBP = "Pirate Backpack"
local BlueBP = "Depot Box I"
local GreenBP = "Depot Box II"
local RashidBP = "Depot Box III"
Module.New("Sort Blue Djinn", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(blueitems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(BlueBP):Index())
break
end
end
end)
Module.New("Sort Green Djinn", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(greenitems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(GreenBP):Index())
break
end
end
end)
Module.New("Sort Rashid", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(rashiditems, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(RashidBP):Index())
break
end
end
end)