Route labels
Four labels let the dashboard and your rules steer the cavebot routes you already have. This guide assumes nothing: if you have never opened a route file, start at the top.
What a route is
A cavebot route is a list of steps the bot walks through, from top to bottom, over and over:
goto:x,y,zwalks to a square on the map.label:nameis a name tag on a line. The bot does nothing there; it only marks the spot.gotolabel:namejumps to a label.function:[[ ... ]]runs a small piece of Lua.
The OTClientV8 bot and vBot both keep routes like this, in the bot's cavebot_configs folder, one .cfg file per route.
The four labels
| Label | Put it | What it means |
|---|---|---|
refill | at the first step of the town part | "from here the character goes shopping, to the depot and the bank" |
hunt | at the first step of the hunting loop | "from here the character hunts" |
check | at the last step of the hunting loop | "decide here: one more loop, or go to town" |
leave | at the first step of the way back to town | "from here the character walks out of the hunt" |
Most routes already have these parts, only with other names. You only add the four name tags.
A whole route, before and after
Before, a typical route:
goto:32369,32241,7 <- town, depot
goto:32370,32220,7 <- the way to the hunt
goto:33191,31798,7 <- first step of the hunt
goto:33200,31805,7
goto:33195,31790,7 <- last step of the hunt
goto:33194,31794,7 <- the way back
After, with the four labels:
label:refill
goto:32369,32241,7
goto:32370,32220,7
label:hunt
goto:33191,31798,7
goto:33200,31805,7
goto:33195,31790,7
label:check
supplycheck:hunt,33195,31790,7
label:leave
goto:33194,31794,7
gotolabel:refill
supplycheck:hunt,...is vBot's own check: with enough supplies it jumps back tohunt, otherwise it walks on intoleave. With the OTClientV8 bot, afunction:[[ ]]step does the same job. Keep whatever your route already uses there.- The last line sends the character back to
refill, so the whole route repeats.
Switching routes: one meeting point
The dashboard and your rules change a route only at refill. There the cavebot stops, the new route loads, and the new route starts from its own refill. So every route you want to switch between must start refill on the same square: the same depot, in the same town.
How a switch goes, from route A to route B:
- Route A reaches its
checkand walks out throughleave. - Route A reaches
refill, the meeting point. The cavebot stops there. - Route B loads and starts at its own
refill, which is the square where the character already stands.
Two hunts from the same town, both starting at the same depot square:
[afk] hunt north [afk] hunt south
label:refill label:refill
goto:32369,32241,7 goto:32369,32241,7 <- the same depot square
goto:32370,32220,7 goto:32380,32260,7
label:hunt label:hunt
... ...
- Routes from different towns cannot switch between each other. The character would start route B far from its first step. Keep one group of routes per town.
- Put
refillon a safe square, in a protection zone next to the depot. The character waits there while the route changes.
Add a label in the bot
- Open the bot, then CaveBot, then the route.
- Click the step where the part starts.
- Click Add, pick label, and type its name:
refill,hunt,checkorleave. - The label goes in above or below the step you picked; move it with the arrows so it sits right before that part.
- Save the route.
Check your work
Open the Routes page. Every route your client reports shows its labels. Ready means all four are there; missing lists what is not.
Common mistakes
- A typo:
Refillorrefilis notrefill. The names must be exactly these four, in lower case. checkinside the loop: put it at the end, after the last hunting step, not in the middle.- Two routes with the same name: the Routes page shows both; rename one so commands pick the right one.
- No
refillin a route that never goes to town: that is fine for a pure hunting route, but commands like "force refill" need it.