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,z walks to a square on the map.
  • label:name is a name tag on a line. The bot does nothing there; it only marks the spot.
  • gotolabel:name jumps 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

LabelPut itWhat it means
refillat the first step of the town part"from here the character goes shopping, to the depot and the bank"
huntat the first step of the hunting loop"from here the character hunts"
checkat the last step of the hunting loop"decide here: one more loop, or go to town"
leaveat 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 to hunt, otherwise it walks on into leave. With the OTClientV8 bot, a function:[[ ]] 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:

  1. Route A reaches its check and walks out through leave.
  2. Route A reaches refill, the meeting point. The cavebot stops there.
  3. 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 refill on 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

  1. Open the bot, then CaveBot, then the route.
  2. Click the step where the part starts.
  3. Click Add, pick label, and type its name: refill, hunt, check or leave.
  4. The label goes in above or below the step you picked; move it with the arrows so it sits right before that part.
  5. 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: Refill or refil is not refill. The names must be exactly these four, in lower case.
  • check inside 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 refill in a route that never goes to town: that is fine for a pure hunting route, but commands like "force refill" need it.