Class Travel
PathingAPI
with the Places named-location registry. Blocking variants poll a
NavigationHandle on the calling (worker) thread and confirm arrival — they
must NOT be called on the client thread (they sleep). navigateAsync(java.lang.String, privbot.movement.pathing.NavigationOptions) hands
back the handle for plugins that drive their own tick loop.-
Method Summary
Modifier and TypeMethodDescriptionexactStep(net.runelite.api.coords.WorldPoint destination, BooleanSupplier active, long timeoutMs) Dispatch once and prove the identical X/Y/plane; call poll on the worker and cancel on stop.exactStep(net.runelite.api.coords.WorldPoint destination, BooleanSupplier active, long timeoutMs, ActionTracker tracker) Share the caller's confirmation lifecycle; this creates no second proof or polling loop.go(Destination destination) Starts a job that gets the player intodestination: an optional teleport first (once, only when the player is more than 30 tiles away), then a pathed walk started asynchronously and polled every step.booleanDelegates toPlaces.isAt(String).navigateAsync(String place, NavigationOptions opts) Non-blocking: start navigation to a named place and return the handle.One immutable reachability grid per read scope, using the shared local pathfinder.session(net.runelite.api.coords.WorldPoint destination, NavigationOptions options, NavigationSession.Policy policy) Create a bounded journey; call step on your script worker and cancel on stop/reconnect.booleanBlocking: travel to a named place.booleanto(net.runelite.api.coords.WorldPoint pt) Blocking: travel to a raw world point (arrive radius 2).booleanto(net.runelite.api.coords.WorldPoint pt, NavigationOptions opts, long timeoutMs) Blocking: travel to a raw world point with caller-chosen options and timeout.booleanto(Places.Place p) Blocking: travel to a resolvedPlaces.Place.booleantoBank()Blocking: travel to the nearest configured bank (uses PathingAPI's bank routing).booleanwalkTo(net.runelite.api.coords.WorldPoint pt) Blocking: walk/path to a raw world point (arrive radius 2).
-
Method Details
-
exactStep
public ExactStepHandle exactStep(net.runelite.api.coords.WorldPoint destination, BooleanSupplier active, long timeoutMs) Dispatch once and prove the identical X/Y/plane; call poll on the worker and cancel on stop. -
exactStep
public ExactStepHandle exactStep(net.runelite.api.coords.WorldPoint destination, BooleanSupplier active, long timeoutMs, ActionTracker tracker) Share the caller's confirmation lifecycle; this creates no second proof or polling loop. -
reachability
One immutable reachability grid per read scope, using the shared local pathfinder. -
go
Starts a job that gets the player intodestination: an optional teleport first (once, only when the player is more than 30 tiles away), then a pathed walk started asynchronously and polled every step. Step it once per tick; a step waits at most 2400 ms.What it proves: DONE ("arrived") only when the player's tile is inside the destination (
Destination.contains(net.runelite.api.coords.WorldPoint)); the tile is the server tile on supported clients, the world location elsewhere. A teleport that lands anywhere else is not arrival: the walk continues from the landing. FAILED "no progress toward <name>" when the distance to the destination did not shrink for 20 steps; a route that failed or was cancelled is restarted once, then FAILED "route failed: <why>". After 300 steps without arriving (an off-plane or oscillating route never trips the stall count) it ends FAILED "took too long to reach <name>". UNSUPPORTED "navigation unavailable" when there is no path planner.Unreadable looks like: an unreadable player tile is never arrival and never lack of progress; the job stays RUNNING ("position unreadable") and fails after 5 such steps in a row. A finished job cancels its route.
Thread rule: call
Job.step(privbot.task.PrivTaskContext)from a node on the script worker; reads marshal themselves and waits usePrivTaskContext.sleepUntil(java.util.function.BooleanSupplier, int). The job is not thread-safe: step it from one thread.Job.cancel()is the exception: it may come from another thread (Stop) mid-step, ends the job FAILED "cancelled", and a route that step started after the cancel landed is cancelled before the step returns.- Parameters:
destination- where to go- Returns:
- a new job, RUNNING
-
to
Blocking: travel to a named place. Resolution order is owned byPlaces.resolve(java.lang.String). -
to
Blocking: travel to a resolvedPlaces.Place. -
walkTo
public boolean walkTo(net.runelite.api.coords.WorldPoint pt) Blocking: walk/path to a raw world point (arrive radius 2). -
to
public boolean to(net.runelite.api.coords.WorldPoint pt) Blocking: travel to a raw world point (arrive radius 2). -
toBank
public boolean toBank()Blocking: travel to the nearest configured bank (uses PathingAPI's bank routing). -
isAt
Delegates toPlaces.isAt(String).
-