Questions that move nothing
Two kinds:
- Instant: answer at once, e.g.
client:is_moving(). - Asked of the server: take a
donefunction, called once on a later frame (usually within 0.1 s) asdone(ok, result, err). Ask once per decision, not every frame.
About the walk under way
| Question | Answer |
|---|---|
client:is_moving() | true while a walk is under way, or a trip (travel_to: ship, zeppelin, Skycutter, tram, lift), waits and riding included (since v1.35) |
client:get_state() | "idle", "navigating", "arrived" or "failed" |
client:get_state_detail() | The state in full, e.g. "navigating.recovering.strafing"; on a trip between its walks "navigating.travelling.<phase>" (since v1.35) |
client:get_progress() | { percent, waypoints_remaining, total_waypoints, current_index } |
client:get_route() | The route being walked (its points), or nil |
client:get_route_step() | Which point of the route it is walking to now (1 = the first) |
client:get_destination() | Where the current walk goes, or nil |
client:get_dismount_needed() | While a mounted walk waits at a get-off point: { at, why, first_misfit, get_off, waited_ms, destination }, else nil |
client:get_ride_from() | On foot after move_to(..., { mount = true }): { ride_from, why_not_before, ride, fits_from_here, rides, destination, ... } |
client:get_mount_here() | While the walk waits for you to mount: { at, why_not_before, ride, waited_ms, destination }, else nil |
client:get_water() | Swimming, breath, depth (below) |
client:is_server_available() | Is the route server answering |
client:get_data_build() | Which walking maps are in use (below) |
check_spots
Up to 64 places at once: for each, its floor, and whether and how far the character can walk there. Ask this
before sending a walk to a spot you are not sure of, so you never walk 100 yd only to hear unreachable.
client:check_spots(points, function(ok, results)
if not ok then return end -- no answer: fall back to your own guess
for i, r in ipairs(results) do -- same order as points
if r.reachable then
-- r.walk: the real walk in yards; r.floor: the ground's height there
else
-- skip points[i]. r.gave_up = true: the search stopped before it knew (far away)
end
end
end, { rings = rings }) -- optional| Field per point | Meaning |
|---|---|
floor | The ground's height at the point (the floor nearest its z), nil = no floor there |
floors | Every floor at that x, y that a walk joins to the character's (several in a building, or a mine under a hill) |
floors_cut_off | Floors there that no walk reaches (walking map on the ground under a city) |
reachable | true = the character can walk there |
walk | The real walk in yards (nil when not reachable) |
straight | The straight distance, to compare |
rings | Which of opts.rings the real walk passes through (indices) |
gave_up | The search stopped before it knew |
| Option | Meaning |
|---|---|
rings | { { x, y, z, r }, ... }, at most 64: areas you want to know the walk crosses (other mobs' reach) |
from | Where the walk starts (default: where the character stands) |
- No height? Send
z = 0. The answer'sflooris the ground there, and that is the height to givemove_to. - Pick by
walk, not by straight distance: a vein 20 yd away may be a 120 yd walk. - On the server all 64 take about 1 to 2 ms.
Example: Gathering nodes.
find_path
The route from one place to another, its points, without walking it: to draw it, to check where it goes before sending the character, or to plan your own stops along it. Nothing moves, and a walk under way goes on as it was. Since v1.29.
local client = _G.AXIOM_NAV.client
client:find_path(nil, { x = -8830.5, y = 470.2, z = 103.6 }, function(ok, r, err)
if not ok then
core.log("no route: " .. tostring(err)) -- no way there, the server busy, a place not in the world
return
end
core.log(("%d points, %.0f yd"):format(#r.points, r.distance))
for i, p in ipairs(r.points) do
-- p.x, p.y, p.z: vec3, first = the start, last = the end
end
end, { roads = true })from: where the route starts;nil= where the character stands.- The route is the one
move_towould walk now: the same room kept from walls, the player's Take roads and Jump fences settings, the character's side, mounted or not. - It never takes a drop off a height (a walk measures each one in the game's collision before taking it) and does not
bend round mobs (
avoid_mobsis a walk option only). - To walk it afterwards:
client:move_to(r["end"])(the walk asks for its own route), orclient:follow_path(r.points)to walk exactly these points. - The same question again within 10 minutes (start and end each within 8 yd of the first, the same options) is
answered from the plugin's memory on the next frame, and one already on its way is shared, not asked twice: the
server works a route across a continent for 10-25 s. A walk (
move_to) always asks its own fresh route. Since v1.34. - A route the server gave up on after 30 s (
errstartsHTTP 408: longer than one search reaches, e.g. Stranglethorn to Ironforge) is not asked again for 10 minutes to the same end from within 500 yd:erris thenHTTP 408 (too far: ...)at once. For such distances askfind_distance(withpoints = truewhen you need which zones the walk passes), which estimates past its reach. Other errors are never kept. Since v1.34.
| Field | Meaning |
|---|---|
points | The route's points in order (vec3), start to end, about 1 yd apart |
distance | Walking yards along it |
partial | true: the route stops short of the end (no way all the way); points go as near as a walk can get |
partial_reason | Why, when known: "end_off_floor" (no floor near the end) |
steep | "stops_at_steep_climb": it stops at the foot of a climb |
snapped, end | snapped = true: the end was not on the walking map and was moved to the nearest place a walk reaches near it; end is where the route ends |
portal | The pad that moves you on the way, { id, name, ... }, or nil |
jumps | How many fence jumps the route takes (Jump fences setting) |
server_ms, ms | The server's time, and the whole wait |
| Option | Meaning |
|---|---|
roads | true / false: take roads or not (default: the player's Take roads setting) |
side | "alliance" / "horde": whose towns count as road (default: the character's) |
filter_water | What a yard of water costs against a yard on foot (default: the player's setting, 1.8 since v1.30, was 1.5) |
swim | "surface": never dives, as the walk option |
allow_partial | false: no route at all rather than one that stops short (default true) |
snap | false: an end off the walking map fails instead of being moved |
- Give real heights. No height?
check_spotswithz = 0answers each place's floor first. - A long route is 100 to 500 KB and up to a few seconds across a continent: ask once per decision, not every frame.
To compare ways of travelling by length only,
find_distanceis much lighter.
find_distance
How far the walk is, without the route: for choosing between walking, a flight, a tram or a boat.
client:find_distance(from, to, function(ok, d)
if not ok then return end
if d.reached then
core.log(("walk: %.0f yd"):format(d.distance))
elseif d.cut then
core.log(("over %.0f yd (estimate)"):format(d.distance + d.left))
else
core.log("no way on foot") -- an island, another continent
end
end, { roads = true })| Field | Meaning |
|---|---|
distance | Walking yards (to stop) |
reached | The walk gets to to |
cut | Not reached because the walk is longer than one search reaches (about 12,000 yd). Add distance + left for an estimate |
stop, left | Where it got to, and the straight yards from there to to |
portal | The pad that moves you on the way (its id), if any |
start_moved, end_moved | How a place with no height was put on its floor |
cached | Answered from the server's memory |
- Measured the way
move_towould walk it (the player's roads setting unlessopts.roads/opts.sidesay otherwise). - About 200 bytes an answer: ask 10 to 30 at once. 8 go out at a time, the rest wait their turn.
- Answers are remembered on the server for 6 hours, for every player.
z = 0is fine: noget_heightfirst.
Which zones a walk passes: points = true
To count the yards a walk spends in each zone (is it safe for my level?), ask for the way's points with the
length. Don't ask find_path for that: a route across a continent takes the server 10 to 30 seconds and may not
come at all, while this takes about one second, is about 60 KB, and is remembered for every player. Since v1.35.
client:find_distance(from, to, function(ok, d)
if not ok or not d.points then return end
local yards = {}
for i = 2, #d.points do
local zone = my_zone_at(d.points[i]) -- your own zone lookup
yards[zone] = (yards[zone] or 0) + d.points[i - 1]:dist_to(d.points[i])
end
end, { points = true })| Field | Meaning |
|---|---|
points | The way's points (vec3) from the start to stop, every spacing yards. Through a portal: the walk to its pad, then from its landing |
spacing | Yards between the points: opts.spacing (default 10, 3 to 50), wider for a very long walk (4,000 points at most) |
The points follow the search's own line, the shortest one: close to the route a walk takes (a few yards apart on
most of it), but with no room kept from walls, steep ground or fires. Count with them; never walk them.
When cut is true they stop at stop, and the last left yards are a straight line.
Example: Travel choices.
Line of sight
client:has_line_of_sight(from, to, function(ok, r)
if ok and r.clear then core.log("in sight") end
end, { from_height = 2, to_height = 2 })r = { clear, hit_distance, hit }.- The game server's own rule for spells, through the game's collision files (buildings, rock, cave walls). Trees, barrels and crates do not count, as for spells. Doors are not in the files.
find_sight_spot
The nearest place the character can walk to that sees target:
client:find_sight_spot(target, function(ok, r)
-- r = { found, already, spot, walk, distance, found_by }
end, { range = 30, min_range = 8 })Or let it walk there: move_to_sight.
get_height
client:get_height({ x = 3976, y = 2163.9, z = 0 }, function(ok, r)
if ok then core.log("floor at " .. tostring(r.height)) end
end)check_spots with z = 0 answers the same, for 64 places at once.
get_water
What your plugin decides breath with. Instant.
{
swimming = true, -- nil: the game cannot tell
submerged = true, -- under the water (the breath bar running down)
breath_ms = 41000, -- the bar now
max_ms = 60000, -- the full bar
running = true, scale = -1,
surface_z = 12.4, -- the height last seen on the surface
depth = 18.2, -- yd under it
up_ms = 3100, -- straight up at swim speed, no margin: add your own
swim_speed = 4.7,
swimming_up_down = nil, -- "up" / "down" while swim_up / swim_down runs
}get_data_build
Which walking maps are in use, nil until the server first answered:
{ game = "classic_beta", product = "wow_classic_beta", data_build = "1.60.1.70338", made = "2026-10-10",
client_build = "1.60.1.70338", stale = false, known = true }stale = true: the game has patched since the maps were made. Routes may be off near what changed.