/navpath¶
Two different scripts both claim this name
navpathfollow.lua and navpathtarget.lua are separate, mutually
exclusive scripts that each call eq2.register_command("navpath", ...).
Only the first one started actually owns /navpath — clockwork's
registry refuses (returns false from) the second registration, but
neither script checks that return value, so the second one still
prints its own "ready" banner even though its handler will never fire.
Which of the two is running determines the syntax below; if /navpath
doesn't respond the way you expect, check /lua list for which script is
actually resident rather than assuming the command is broken.
Run only one of the two at a time.
Syntax¶
# navpathfollow.lua
/navpath follow <Leader> [dist]
/navpath stop
/navpath status
# navpathtarget.lua
/navpath
/navpath target
/navpath stop
/navpath status
Description¶
Navmesh-driven pathing over lib.navpath / the Detour navmesh, registered by
either of two standalone scripts under one command name: navpathfollow.lua
walks toward a named leader actor, navpathtarget.lua walks to your current
Target. Both fall back to a direct (non-mesh) move-to when no navmesh is
loaded for the zone or pathing fails.
Unlike the other commands in this section, /navpath is not a peer-relay
receiver — each client resolves its own leader (by name, off mq.TLO.Spawn)
or its own Target locally, and nothing about it is designed to be driven by
eq2.peer.cmd().
navpathfollow.lua¶
/lua run navpathfollow
| Subcommand | What |
|---|---|
follow <Leader> [dist] |
Follow <Leader> by name. Holds at dist metres (default 5.0, resume margin 1.5m) and replans when the leader drifts more than 5m past the last planned point. |
stop |
Cancel and clear the active route. |
status |
Print who's being followed, hold distance, and the underlying route state. |
Loads the navmesh for the current zone on follow; if none is available it
prints a warning and moves directly toward the leader's raw position instead.
Replans on a 200ms tick.
navpathtarget.lua¶
/lua run navpathtarget
| Subcommand | What |
|---|---|
(bare) / target |
Plan and walk a navmesh path to your currently selected Target. Refuses if nothing is targeted or the target has no position. |
stop |
Cancel the active route. |
status |
Print the underlying route state. |
Falls back to a direct move-to if no navmesh is loaded for the zone, or if
pathing to the target fails. Considered arrived once eq2.waypoints.status()
reports the route no longer active.
Examples¶
/lua run navpathfollow
/navpath follow Grimtusk 8
/navpath status
/navpath stop
/lua run navpathtarget
/navpath
/navpath stop
See also¶
lib.navpath— the path solver both scripts wrap.eq2.navmesh.*— the underlying Detour bindings./navmap— top-down mesh visualisation, built on the same library.