Hello,
I know that new depots are like backpacks and can be accessed by any depot... Anyway I need access a backpack inside a depot box, because I send a backpack with items to another character to be sold(green djin, blue djin, rafzan, yasir)
Code:
local IDDepot = 22797
Self.CloseContainers()
local Depot = Self.OpenDepot()
for i = 0, Depot:ItemCount()-1 do
if (Depot:GetItemData(i).id == IDDepot) then
Depot:UseItem(i, true)
--local dpBox = Container.New('depot box I') return 17 item
--local dpBox = Container.New(IDDepot) return 0
--local dpBox = Container.GetLast() return 17 item
--local dpBox = Container:Index() return nil
--local dpBox = Container:ItemCount() return 17 item
--Container:ItemCount() return 17 item
--local dpBox = Container:OpenChildren('depot box I')return nil
--local dpBox = Container.GetByName('depot box I') return 0
--local dpBox = Container.GetByName(IDDepot) return 0
print(dpBox:ItemCount())
break;
end
end
That's the small script that I have been using to test... It opens depot chest wich has 17 items(depot box) then open depot box I(wich has only one item a brocade backpack).
In my test it just shows me 17 items that means depot box or nil or return 0.
Anyway, someone would have any suggestions for how to loop inside the depot box?