Project Sylvanas docs axiombot.net Discord

Walk options

The third argument of move_to is a table of options for that one walk. Leave one out and the player's own setting from the AXIOM_NAV menu decides. Give it and yours wins.

client:move_to(town, on_done, { roads = true, avoid_mobs = true })
client:move_to(crate, on_done, { avoid_mobs = true, avoid_ring = 11 })
client:move_to(town, on_done, { roads = false })   -- straight there, even if the player keeps to roads
OptionValuesWhat it does
roadstrue, a number above 1, falseKeep to roads, trails and the character's own side's towns. A number keeps to them harder (default 4: an off-road yard counts as 4 road yards)
side"alliance", "horde"Which towns count as road. Left out, AXIOM NAV works it out
avoid_mobstrue / falseBend round the aggro range of red mobs
avoid_ringyards, a table by NPC id, or a functionYour own aggro range instead of the built-in one
avoid_zonesa list of { x, y, z, radius, cost }Places the route keeps out of: each yard inside costs cost (1 to 1000) times more. Add keep_away = true to a zone and its cost fades from cost at the middle to nothing at the edge, so a route that has to cross it keeps as far from the middle as the ground allows (an enemy town on the only way through)
jump_fencestrue / falseJump low fences and low ore rocks instead of going round them
jump_heightspercent, or falseMay walk off a ledge or roof if the fall costs at most this share of health
drop_mode"needed", "shortcut"When a jump down is taken
drop_pick"fastest", "least_hp"Which jump down, when several fit
swim"bottom", "surface"For a place under water: swim down to it (default) or stop on the surface above
filter_water0.1 to 1000What a yard of water costs against a yard on foot. Higher keeps to land
mounttrue, false, or { height, width }Plan the walk for a mount
mount_wait_msmillisecondsHow long to wait at a get-on point (default 10000)
dismount_wait_msmillisecondsHow long to wait at a get-off point (default 20000)
portal_wait_msmillisecondsHow long to wait on a pad that moves you (default 6000)
no_directtrueNever walk this one straight with close-range direct steering

Roads

client:move_to(far_target, on_done, { roads = true })    -- travel by road
-- ... close to the goal:
client:move_to(far_target, on_done, { roads = false })   -- leave the road for the last stretch
  • roads = true: an off-road yard costs 4 road yards. roads = 8 keeps to roads harder.
  • side: the character's own side's towns count as road, the other side's as open ground. Left out, the plugin works it out from the character's race.
  • Where no road leads (open desert, Un'Goro), the route is as it would be without roads.
  • Switching roads for the same place changes over without stopping, where the two routes meet.
  • client:get_road_share() answers the share (0 to 1) of the last route on roads, trails or towns.

Avoid mobs

avoid_mobs = true bends the route round the aggro rings of red mobs and keeps the rest of it as it was.

  • Which mobs: hostile (red), alive, not already in a fight, not critters, not players, within 120 yd (the nearest 40). Yellow mobs never attack first and are left alone.
  • The ring: 20 yd at the same level, 1 yd more or less per level of difference (5 to 45 yd), plus 2 yd.
  • Only the stretch through a ring bends. With no room to bend (a camp filling a valley), the ordinary route.
  • A walk that ends inside a ring (walking to that mob) is never bent away from it.
  • While walking, a mob whose ring comes onto the next 100 yd (a patrol) gets a new route without stopping.
  • client:get_mob_stats() answers { routes, bent, no_way, last }.

Your own ring size: avoid_ring

Blizzard's live realms notice you from about 11 yd at the same level, where the built-in 20 yd sends a walk the long way round a camp. Give your own:

-- one size for every mob
client:move_to(crate, on_done, { avoid_mobs = true, avoid_ring = 11 })

-- by NPC id (unit:get_npc_id()), with a default
client:move_to(crate, on_done, { avoid_mobs = true, avoid_ring = { [6866] = 11, [38] = 12, default = 11 } })

-- a function: yards, or nil for the built-in rule
client:move_to(crate, on_done, { avoid_mobs = true, avoid_ring = function(unit, info)
    -- info = { npc_id, name, level, player_level, distance, rule }
    return my_measured_range[info.npc_id] or (info.rule - 9)
end })
  • The function is called for each red mob at every route request and every half second while walking: keep it cheap. An error in it counts as nil.
  • 0, false or less: that mob gets no ring. More than 58: 58 is used.

Jumps and drops

Jump fences

client:move_to(target, on_done, { jump_fences = true })

The server offers a jump only where a straight run across a thin strip saves 2 yd or more. The plugin measures each one in game first (something low, up to 1.8 yd, clear air above). Anything else is walked round. Low ore rocks (a Copper Vein on flat ground or downhill) are jumped too; taller ones (Tin, Iron) are walked round. A walk to a vein still ends beside it, within reach to mine.

Since v1.35 the same option also takes jump shortcuts: a jump over a rail down onto lower ground (up to 2 yd lower), up onto a higher floor across a gap, or across a wider gap, where it saves at least 5 yd. The server works each one out at the speed the character really runs (on foot or mounted) and only offers it when the whole jump is proven clear and lands on solid ground with room to spare; the plugin presses jump at the exact spot while running. They count in the same stats below. No speed measured yet (just loaded) means no shortcuts until there is one.

client:get_jump_stats() answers { offered, jumped, refused, failed, remembered }.

Jump off heights

client:move_to(target, on_done, { jump_heights = 30, drop_mode = "shortcut", drop_pick = "least_hp" })
OptionMeaning
jump_heights = 30A fall may cost at most 30% of maximum health, and must leave the character 10%
drop_mode = "needed"Only when walking round is much longer (more than twice, or 100 yd more). The default
drop_mode = "shortcut"Whenever it saves 3 yd
drop_pick = "fastest"The drop saving the most within the health limit. The default
drop_pick = "least_hp"The drop costing the least health

The arc down is traced with the game's collision before the edge, and health is checked again in the last 4 yd. Faster than 30 yd/s (GM speed) no drop is taken. client:get_drop_stats() answers { offered, taken, refused, failed, last_loss, remembered }.

Water

OptionWhat it does
swim = "bottom" (default)A place under water: swim the straight slant down to it. Inside a sunken ship or an underwater cave, the route goes in through the opening
swim = "surface"Never dives: stops on the surface above
filter_water = nA yard of water costs n yards on foot (player's setting, default 1.8 since v1.30, was 1.5). 10 keeps to the shore, 1 swims whenever it is shorter

The walk never surfaces for air. Your plugin decides that with client:get_water() and client:swim_up(). See Under water.

Mounts

AXIOM NAV never mounts or dismounts. It tells you where, and waits.

Mounted: where to get off

While the character is mounted, every route is planned for the mount. Spots a mount cannot be at:

whyMeaning
indoorsA building room the game counts as indoors
lowA roof lower than the rider (3.0 yd)
narrowWalls closer than the mount's width (1.6 yd)
no_mounts_areaWoW Forever: an area with no ground mounts (Timbermaw Hold, Zephras Isle's caves)

A way round that fits is taken if it is at most 1.5 times the foot route + 20 yd. Otherwise the walk stops 2 yd before the first spot that does not fit and fires dismount_needed. Once on foot it goes on by itself. Still mounted after 20 s: the walk fails with needs_dismount.

On foot: where to get on

Pass mount = true when your plugin will mount. The walk stops where the mount can be ridden from (the first stretch of at least 40 yd it fits all along), fires mount_here, and rides on once you mount. Still on foot after 10 s: it walks on on foot, never fails for it.

client:on("mount_here", function(d) cast_my_mount() end, self)
client:on("dismount_needed", function(d) core.input.dismount() end, self)
client:move_to(zeppelin, on_done, { mount = true })
OptionMeaning
mount = falsePlan as on foot, even while mounted
mount = { height = 3.5, width = 2 }Your mount's own size in yards

Full example: Mounted travel.

Pads that move you

Some places are reached only by one of the game's pads: Stormwind's mage trainers under the Wizard's Sanctum (the pad on its tower top), Darnassus and Rut'theran. A move_to there walks onto the pad, waits for the game to move the character, and walks on, all in one walk. Not moved within 6 s (portal_wait_ms): portal_no_jump.

Close-range direct steering

A player setting, off by default and shown to developers only while it is tested. A move_to to a place within 10 yd with nothing in the way is walked straight at once, with no route from the server. Pass no_direct = true when your own data says the straight line is wrong (it crosses a door, or another mob's range).

Private server speed fix

A player setting, off by default. A character faster than a riding mount (GM speed) aims further ahead and stops to turn at sharper corners. At the game's own speeds nothing changes.