Hello.
Use posz() function to check your Z position and enable your cavebot to go upstairs or use useitem(1234, X, Y, Z)
## USING CAVEBOT ##
1. Create a Ladder wpt with name/label: "GO_LADDER" (without quotes).
2. Create an Action wpt after that ladder wpt with code:
setsettings('Cavebot/Enabled', false) -- disable cavebot
3. Create a Persistent with code below:
local Z = 6 -- If Z pos is different than this then enable cavebot.
if posz() ~= Z then
gotolabel('GO_LADDER') -- make cavebot go to this wpt when enabled.
setsettings('Cavebot/Enabled', true) -- enable cavebot.
end
## USING PERSISTENT ONLY ##
local LADDER = { ID = 1234, X = 12345, Y = 12345, Z = 7 }
if posz() == LADDER.Z then
reachlocation(LADDER.X, LADDER.Y, LADDER.Z)
wait(400)
useitem(LADDER.ID, LADDER.X, LADDER.Y, LADDER.Z)
wait(800, 1200)
end