Webwalk

Group
player
Methods
10
Fields
None

Getting one

player:webwalk()

Methods

MethodReturnsDescription
start(WorldPoint, RouteOptions?)()Walk to a tile. Returns at once; the walk goes on by itself. The same tile again keeps the route under way, another replaces it. A tile not…
startTiles({ WorldPoint }, RouteOptions?)()Walk to whichever of several tiles is cheapest. The first route picks one. Raises for none, or more than 256.
startObject(WorldPoint, number, RouteOptions?)()Walk to a specific object, such as one staircase or ladder among several. The path server picks that object and routes through it.
startNearestBank(RouteOptions?)()Walk to the nearest bank. The first route picks one.
startDock(number, { stayAboard: boolean? }?, RouteOptions?)()Travel to a Sailing dock with the boat: walk to a dock where one of the player's boats is moored, board it, sail to the dock, and disembark…
startSea(WorldPoint, SeaOptions?, RouteOptions?)()Travel to open sea with the boat: walk to a dock where one of the player's boats is moored, board it, and sail to tile, ending aboard wit…
isWalking()booleanWhether a started walk is still under way.
status()WebwalkStatusWhere a started walk stands, without advancing it: "idle" when there has been none since the last stop(), else how it is going or how i…
snapshot()WebwalkSnapshotThe current route and the position in it. Read-only: this does not advance anything.
stop()()End the walk where the player stands; it clicks nothing more, its route is forgotten, and gear swapped for a step stays on. A walk stopped…

Returned by

MethodReturnsDescription
PlayerDomain.webwalkWebwalkThis plugin's webwalk: long-distance pathing across the world. There is one per plugin, and every call answers it. Raises where no plugin's…

Method details

start

start: (Webwalk, WorldPoint, RouteOptions?) -> ()

Walk to a tile. Returns at once; the walk goes on by itself. The same tile again keeps the route under way, another replaces it. A tile nothing can stand on ends beside it, and one nothing reaches ends on the nearest tile that can be reached when that tile is within 10 tiles of it on its plane; farther, the walk fails "NO_ROUTE".

destination
Where to end up.
config
This walk's route settings in place of the webwalker's; nil for the webwalker's. Its planned inventory is PathQuery's alone: a walk routes with the items held.

startTiles

startTiles: (Webwalk, { WorldPoint }, RouteOptions?) -> ()

Walk to whichever of several tiles is cheapest. The first route picks one. Raises for none, or more than 256.

destinations
Candidate tiles.
config
As start's.

startObject

startObject: (Webwalk, WorldPoint, number, RouteOptions?) -> ()

Walk to a specific object, such as one staircase or ladder among several. The path server picks that object and routes through it.

tile
The object's tile.
id
The object's id.
config
As start's.

startDock

startDock: (Webwalk, number, { stayAboard: boolean? }?, RouteOptions?) -> ()

Travel to a Sailing dock with the boat: walk to a dock where one of the player's boats is moored, board it, sail to the dock, and disembark there unless stayAboard. Started aboard, the boat the player is on sails. Ends "NO_BOAT" at once when the player has no boat. Raises for an id outside 0 to 60.

dockId
The dock's id (Dock.id, player:sailing():docks()), 0 to 60.
options
{ stayAboard = true } to end at the dock's berth, aboard; nil to end ashore on its landing.
config
As start's.

startSea

startSea: (Webwalk, WorldPoint, SeaOptions?, RouteOptions?) -> ()

Travel to open sea with the boat: walk to a dock where one of the player's boats is moored, board it, and sail to tile, ending aboard with the boat within within tiles of it (a charting spot, a fishing spot), halted, the player at the helm. Started aboard, the boat the player is on sails. Never ends "closest": a spot no route reaches ends "BOAT_UNREACHABLE" (no sea route fits the boat, no sea tile near tile, or the boat halted outside reach of it four times), "NO_BOAT" (no usable boat; at once when the player has none) or "NO_ROUTE". Raises for a within outside 0 to 64.

tile
The sea tile (its plane is ignored: the sea is plane 0).
options
{ within = n }: how near tile the boat may stop, 0 to 64; nil for 2.
config
As start's.

isWalking

isWalking: (Webwalk) -> boolean

Whether a started walk is still under way.

status

status: (Webwalk) -> WebwalkStatus

Where a started walk stands, without advancing it: "idle" when there has been none since the last stop(), else how it is going or how it ended.

stop

stop: (Webwalk) -> ()

End the walk where the player stands; it clicks nothing more, its route is forgotten, and gear swapped for a step stays on. A walk stopped while it sails the boat brings it to rest: the sails are un-set at once where they can be, and again over the next ticks till the boat reads stopped (your voyage's isSailing is true meanwhile). A voyage started does not stop the boat: it takes it over under way.