PDA

View Full Version : global depot



Relisek
12-17-2015, 10:40 PM
Hello

after when global depot came through so my script end up broke how can. Can i just use those boxes like a normal backpack ex.


_Containers_CrystalCoins = "depot box I"

Isn't working for me, might is suppose to be ID in there like


_Containers_CrystalCoins = itemid('xxx')

I really dunno. Can someone help?

shadowart
12-17-2015, 11:09 PM
That does not look like a xenobot script.

Relisek
12-17-2015, 11:16 PM
It is, it's just config section here is the main function to open bp's


function Open_Containers()
local tries = 10
while #Container.GetAll() > 0 do
for i = 0, 15 do
closeContainer(i)
end
end
while #Container.GetAll() < 5 or tries > 0 do
while #Container.GetAll() > 0 do
for i = 0, 15 do
end
end
Client.HideEquipment()
if Self.BrowseField(Coordinates.Counter.x, Coordinates.Counter.y, Coordinates.Counter.z) == 1 then
wait(500 + Self.Ping())
Containers.Counter = Container(_OpenTibia and _OpenTibia_Indexes[1] - 1 or 0)
Containers.Counter:Minimize()
wait(100)
Client.HideEquipment()
ProcessDebugMessage('Casino Debugger', 'Counter browse field opened')
if Self.BrowseField(Coordinates.Locker.x, Coordinates.Locker.y, Coordinates.Locker.z) == 1 then
wait(500 + Self.Ping())
Containers.Locker = Container(_OpenTibia and _OpenTibia_Indexes[2] - 1 or 1)
Containers.Locker:Minimize()
wait(100)
Client.HideEquipment()
ProcessDebugMessage('Casino Debugger', 'Locker browse field opened')
if table.contains(Locker_IDs, Containers.Locker:GetItemData(0).id) then
Containers.Locker:OpenChildren({Containers.Locker: GetItemData(0).id, false})
wait(500 + Self.Ping())
if Container(_OpenTibia and _OpenTibia_Indexes[3] - 1 or 2):UseItem(0, true) == 1 then
local index = 0
wait(500 + Self.Ping())
Containers.Depot = Container(_OpenTibia and _OpenTibia_Indexes[3] - 1 or 2)
Containers.Depot:Minimize()
wait(100 + Self.Ping())
if Accept_Items then
Client.HideEquipment()
if Count_Extended(Containers.Depot, {Item.GetID(_Containers_Items)}) > 0 then
for i = 0, Containers.Depot:ItemCount()-1 do
local item = Containers.Depot:GetItemData(i)
if item.id == Item.GetID(_Containers_Items) then
local opento = Container.GetFreeSlot()
while (Containers.Depot:UseItem(i) ~= 1) do wait(300 + Self.Ping()) end
wait(500 + Self.Ping())
Containers.Items = Container(opento)
Containers.Items:Minimize()
wait(100 + Self.Ping())
ProcessDebugMessage('Casino Debugger', 'Items container opened')
break
end
end
else
ProcessDebugMessage('Casino', 'Error. Items container not found: '.._Containers_Items)
return false
end
end
Client.HideEquipment()
index = 1
if Count_Extended(Containers.Depot, {Item.GetID(_Containers_CrystalCoins)}) > 0 then
for i = 0, Containers.Depot:ItemCount()-1 do
if index < 3 then
local item = Containers.Depot:GetItemData(i)
if item.id == Item.GetID(_Containers_CrystalCoins) then
local opento = Container.GetFreeSlot()
while (Containers.Depot:UseItem(i) ~= 1) do wait(300 + Self.Ping()) end
wait(500 + Self.Ping())
Containers.Crystal[index] = Container(opento)
Containers.Crystal[index]:Minimize()
wait(100 + Self.Ping())
index = index + 1
end
else
break
end
end
else
ProcessDebugMessage('Casino', 'Error. Crystal coins containers not found: '.._Containers_CrystalCoins)
return false
end
Client.HideEquipment()
ProcessDebugMessage('Casino Debugger', 'Crystal coins containers opened')
index = 1
if Count_Extended(Containers.Depot, {Item.GetID(_Containers_PlatinumCoins)}) > 0 then
for i = 0, Containers.Depot:ItemCount()-1 do
if index < 8 then
local item = Containers.Depot:GetItemData(i)
if item.id == Item.GetID(_Containers_PlatinumCoins) then
local opento = Container.GetFreeSlot()
while (Containers.Depot:UseItem(i) ~= 1) do wait(300 + Self.Ping()) end
wait(500 + Self.Ping())
Containers.Platinum[index] = Container(opento)
Containers.Platinum[index]:Minimize()
wait(100 + Self.Ping())
index = index + 1
end
else
break
end
end
else
ProcessDebugMessage('Casino', 'Error. Platinum coins container not found: '.._Containers_PlatinumCoins)
return false
end
wait(500 + Self.Ping())
Client.HideEquipment()
ProcessDebugMessage('Casino Debugger', 'Platinum coins containers opened')
ProcessDebugMessage('Casino', 'All containers were loaded successfully')
return true
end
end
end
end
tries = tries - 1
end
return false
end

and that it's just the config:


-- Basic Setup --
_Containers_CrystalCoins = "Depot Box I" -- Container for crystal coins
_Containers_PlatinumCoins = "Red Backpack" -- Container for platinum coins
_Containers_Items = "Beach Backpack" -- Container for items

Relisek
12-18-2015, 01:31 AM
noone can help me?

zameq
12-18-2015, 04:05 PM
Try that


elseif (labelName == "DP") then
Walker.Stop()
wait(1600,2400)
Self.DepositItems({ITEM ID, WHICH DEPOT count by 0>1>2>3...}, {11481, 0})
wait(800,1200)
if (Self.Stamina() < 960) then
Walker.Stop()
else
Walker.Start()
end

Relisek
12-19-2015, 01:34 AM
I think that couldnt be like that, cause the function is used in the others ones as far as i know, here is full code

http://wklej.org/id/1881715//

zameq
12-19-2015, 07:40 AM
Relisek don't use casino script as pattern. Depositing is very simple as i pasted you. Try it :)))

Relisek
12-19-2015, 04:51 PM
I doesn't want to deposit anything so what should i use function self.deposit? I just want to open backpacks which is inside depot box one for example. Or just how to make it to open depot box one, and i'm not mean here deposit function casue i know then it's full working.

blah88
12-19-2015, 05:16 PM
It will open first depot box. But how open backpack inside depot box.. I'd like to know how do it too...



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)
end
end