Auto-Walk & Pathfinding

The auto-walk system allows players to click on any reachable tile and have their character automatically walk there using automatic pathfinding. The server computes the optimal path, respecting walls, obstacles, and floor changes (stairs, ladders, holes).

How It Works

  • Click to walk — Click on any tile on the map. The server finds a path from your current position to the target tile.
  • Path computation — The server checks up to 500 tiles (200 when chasing a target) to find the shortest walkable path.
  • Step-by-step movement — The server moves your character one tile per step, respecting movement speed and step duration.
  • Automatic cancellation — If the path becomes blocked (e.g. another creature moves into the way), the path is cleared and movement stops.
  • Manual override — Pressing a movement key cancels auto-walk and resumes manual control.

Pathfinding Details

Pathfinding

  • 4-directional movement (no diagonal pathfinding; diagonal movement costs 3x normal step duration).
  • Paths are estimated efficiently, always preferring the shortest route first.
  • If the target tile is not walkable, the server searches for the nearest walkable tile in a 5-tile radius spiral.
  • Paths are limited to the same floor. Floor changes are handled separately.

Floor Changes

When stepping onto a tile with a floor change attribute (stairs, ladders, holes, ramps), the server automatically moves the player to the destination floor:

  • Down (holes, trapdoors) — Moves to z+1, with directional adjustments for adjacent stairs.
  • North/South/East/West (stairs) — Moves to z-1 with a 1-tile offset in the corresponding direction.
  • South Alt / East Alt (wide stairs) — Moves to z-1 with a 2-tile offset.
  • Bidirectional stairs — Walking onto a tile that has stairs below it will move you down to that floor.

Queued Actions

Auto-walk supports queued actions — the player can click on a useable object (chest, door, lever, item) and the server will:

  1. Compute a path to a tile adjacent to the target object.
  2. Walk the player there automatically.
  3. Execute the queued action (use item, open chest, pull lever) upon arrival.

If the path is blocked or too long, the queued action is cancelled and an error message is displayed.

Chase Mode

During combat, chase mode (toggleable via combat stance settings) allows your character to automatically follow a target creature when it moves out of attack range:

  • When chase mode is ON: If your target moves away, the server computes a path (limited to 200 tiles) and auto-walks toward it continuously.
  • When chase mode is OFF: Your character stands still when the target is out of range ("stand while fighting").
  • Chase mode re-paths continuously if the target continues moving.

Movement Speed

Step duration is calculated from the character's base speed and the ground tile's speed property:

  • Formula: step time scales with your character's speed and the ground's speed rating, rounded to a 50ms movement step.
  • Diagonal movement: 3× the normal step duration.
  • Default ground: normal terrain uses a standard speed rating when the tile has no speed property.

Protection Zone Restrictions

Players with an active skull (PvP combat) cannot auto-walk into protection zones. If a path would enter a PZ tile while the player is skull-locked, the path is immediately cleared and an error is displayed.

Live
Loading realm activity...