Cavebot
CaveBot
Waypoint navigation, supply management, hunting route automation.
Quick Start
- Open Cave tab → Show Editor
- Stand at start → Add Goto
- Walk to next → Add Goto again
- Save as
Dragon_Darashia - Toggle CaveBot ON → press Start (
Ctrl+Z)
Waypoint Types
Movement
| Type | Syntax | Description |
|---|---|---|
goto |
32000,32000,7 or 32000,32000,7,3 |
Walk to position (optional precision) |
label |
label:hunt |
Named position marker |
gotolabel |
gotolabel:hunt |
Jump to label |
Conditional
| Type | Syntax | Description |
|---|---|---|
checkSupplies |
3160,50,refill |
If item < 50, goto label |
checkCapacity |
200,depot |
If cap < 200oz, goto label |
posCheck |
— | Check floor/position, branch |
Town
| Type | Syntax | Description |
|---|---|---|
depositor |
— | Deposit all loot |
buy |
3160,200,Eremo |
Buy from NPC |
sell |
— | Sell to NPC |
bank |
— | Bank operations |
Tools
| Type | Description |
|---|---|
rope |
Use rope at position |
shovel |
Use shovel at position |
machete |
Use machete at position |
door |
Open door at position |
Special
| Type | Syntax | Description |
|---|---|---|
lure |
lure Dragon 1 |
Pull creatures before moving |
standLure |
— | Wait for creatures to come |
action |
action() function() ... end |
Custom Lua code |
travel |
— | Boats, carpets, teleports |
imbuing |
— | Apply imbuements (OTCR only) |
tasker |
— | Task NPC interaction |
withdraw |
— | Withdraw from depot/inbox |
Walking Engine v4.0
Floor-Change Prevention
Validates every tile. Stops before stairs/ladders/ramps.
Field Handling
- Try pathfinding without
ignoreFields - If fails, retry with
ignoreFields = true - Use keyboard stepping to cross field tiles
Enable "Ignore fields" in config.
Chunked Walking
- Paths split into 25-tile max chunks
- autoWalk for paths ≥3 tiles with ≤55% direction changes
- Keyboard stepping for ≤2 tiles
Step Pipelining
2-step lookahead for smooth animation. Disabled when:
- Direction change >90°
- Floor-change tile within 2 steps
canWalkDirectionfails for lookahead
PathCursor Preservation
Cursor preserved across ticks for same waypoint. Only resets when destination changes.
Stuck Detection
3 consecutive goto failures → RECOVERING state. Progressive escalation: ignoreCreatures → ignoreFields → blocker attack.
Pathfinding Strategy
- Strict (respects PZ, walls)
- Allow non-pathable
- Ignore creatures
- Allow unseen (distance ≤30)
- Ignore fields (distance ≤30)
Attempts 4–5 skipped for distances >30 tiles.
Waypoint Advancement
| Result | Meaning | Behavior |
|---|---|---|
true |
Success | Advance to next |
false |
Failure | Stay, trigger stuck detection (goto) |
"retry" |
In progress | Stay, increment retry counter |
Recovery
NORMAL → RECOVERING → (found reachable WP) → NORMAL
→ (no candidates) → idle, retry every 1s
→ (5min timeout) → clear blacklists
Path-Validated Scan
- Collect all WPs within 1.5x
gotoMaxDistance - Validate top 5 with
PathStrategy.findPath() - Always validate 3 closest by distance
Adaptive Blacklists
TTL = 15s * 2^(fail_count - 1), capped at 120s
recordSuccess() clears all blacklists. 5-minute safety valve clears everything.
Supply Management
label:hunt
... hunting ...
checkSupplies:3160,50,refill
checkCapacity:200,depot
gotolabel:hunt
label:refill
goto NPC
buy:3160,200,NPC_Name
gotolabel:hunt
label:depot
goto depot
depositor
bank
gotolabel:refill
Configuration
| Setting | Default |
|---|---|
| Use Delay | 400ms |
| Walk Delay | 100ms |
| Ping Compensation | 0ms |
| Auto Use Tools | ON |
| Ignore Fields | ON |
50+ pre-built configs in cavebot_configs/.
Troubleshooting
Stops moving: Enabled? Started (Ctrl+Z)? Pull System pausing? ASM active? Coordinates reachable? Door blocking? Fields?
Stuck at door: Enable Auto Open Doors, add door waypoint, verify door item IDs.
Wrong floor after teleport: Add waypoint on each floor.
