pathFinish
does something
pathFinish(name: string, end: string, last: tile)
Adds the last point and checks the whole path: at least two points, no point repeated, two different end names, no obstacle left dangling and no leg too long to click. A path that will not walk is a mistake in the script, so it is refused here, at load, rather than discovered by a bot that goes nowhere.
| Parameter | Type | What it does |
| namerequired |
string |
the path being declared |
| endrequired |
string |
what this end of it is called |
| lastrequired |
tile |
the last point |
Example
pathFinish("guild", "bank", tile(285, 570))
pathNearestEnd
returns string
pathNearestEnd(name: string) -> string
Which of the path's two ends you are nearer, by name. Always one of the two names given to pathStart and pathFinish, so there is no magic string to spell wrong. Measured in walking steps, which is how a floor answers itself: the game stacks floors 944 apart, so an end one level away can never be the nearer one and a script that crosses a ladder needs no y test of its own.
| Parameter | Type | What it does |
| namerequired |
string |
the path to ask about |
Example
print("starting from the", pathNearestEnd("guild"), "end")
pathObject
does something
pathObject(name: string, objectName: string, there: string, back: string, within: int)pathObject(name: string, objectId: int, there: string, back: string, within: int)
Declares that the next point is across an object that has to be clicked, and what to click for each direction. Sits between the two points it joins, and is looked for beside whichever of them you are standing on - so a ladder is written once and each floor finds its own, which is why there is no tile here and no floor test in your script. Both commands are required: "there" is what you click walking toward the end pathFinish names and "back" is what you click coming the other way, and a ladder that used one of them for both would climb the wrong way half the time. The walker never routes to the object - nothing stands on a ladder; clicking it is the travel.
| Parameter | Type | What it does |
| namerequired |
string |
the path being declared |
| objectNamerequired |
string |
the object's name, as the game spells it |
| thererequired |
string |
the option to click walking toward the end named by pathFinish |
| backrequired |
string |
the option to click walking the other way |
| objectIdrequired |
int |
the object id |
| withinoptional |
int |
how many tiles from the point either side of it the object may be, at most 10 |
Example
pathObject("guild", "Ladder", "Climb-up", "Climb-down")
pathObject("guild", 63, "Climb-up", "Climb-down")
pathOn
returns bool
pathOn(name: string) -> bool
Whether you are close enough to some point of this path for walkPath to get on with it - within 4 steps. False means walkPath will answer RECOVERING or LOST, so this is the question to ask before starting rather than the one to ask afterwards. Pure arithmetic over where you are standing: no routing, no hooks beyond the ones every script already needs.
| Parameter | Type | What it does |
| namerequired |
string |
the path to ask about |
Example
if not pathOn("guild") { stop }
pathReset
does something
pathReset(name: string)
Forgets how many times walkPath has tried to cross an obstacle and which leg it last clicked, so a script that was told STUCK can decide to try again. Not the position - there is none held, because walkPath works out where it is every pass.
| Parameter | Type | What it does |
| namerequired |
string |
the path to forget the tries on |
Example
pathReset("guild")
pathStart
does something
pathStart(name: string, end: string, first: tile)
Begins declaring a path, throwing away anything already declared under this name. The end name is one of the two words walkPath understands; pathFinish names the other. Points are declared in the order you walk them from here, so declaring a path twice does not end up with every point in it twice.
| Parameter | Type | What it does |
| namerequired |
string |
what to call this path |
| endrequired |
string |
what this end of it is called |
| firstrequired |
tile |
the first point |
Example
pathStart("guild", "mine", tile(274, 3397))
pathTile
does something
pathTile(name: string, next: tile)
Adds the next point. Consecutive points more than 10 apart with no obstacle declared between them are refused by pathFinish, because the minimap refuses a click that far out rather than clamping it - so a leg that long is a bot standing still clicking nothing, forever and silently.
| Parameter | Type | What it does |
| namerequired |
string |
the path being declared |
| nextrequired |
tile |
the next point along it |
Example
pathTile("guild", tile(274, 565))
pathWall
does something
pathWall(name: string, wallName: string, there: string, back: string, within: int)pathWall(name: string, wallId: int, there: string, back: string, within: int)
Declares that the next point is across a wall or door that has to be clicked, and what to click for each direction. Sits between the two points it joins, and is looked for beside whichever of them you are standing on - so a ladder is written once and each floor finds its own, which is why there is no tile here and no floor test in your script. Both commands are required: "there" is what you click walking toward the end pathFinish names and "back" is what you click coming the other way, and a ladder that used one of them for both would climb the wrong way half the time. The walker never routes to the wall or door - nothing stands on a ladder; clicking it is the travel.
| Parameter | Type | What it does |
| namerequired |
string |
the path being declared |
| wallNamerequired |
string |
the wall or door's name, as the game spells it |
| thererequired |
string |
the option to click walking toward the end named by pathFinish |
| backrequired |
string |
the option to click walking the other way |
| wallIdrequired |
int |
the wall or door id |
| withinoptional |
int |
how many tiles from the point either side of it the wall or door may be, at most 10 |
Example
pathWall("town", "Gate", "Open", "Open")
pathWall("town", 57, "Open", "Open", within: 5)
walkPath
does something
needs minimapAvailable()
returns string
walkPath(name: string, to: string) -> string
Walks one pass along a path toward one of its ends and says what it did: ARRIVED, WALKING, CROSSING, RECOVERING, BLOCKED, STUCK, LOST or STOPPED, which is the script being stopped mid-pass. It works out where it is from where you are standing, including which floor, so it needs no help after an interruption and no flag saying which way round you are. One decision and at most one click per call: a script loops by returning a delay - about 900 after WALKING and 1500 after CROSSING, which is a climb and an animation. ARRIVED, STUCK and LOST are the three it will not get past on its own.
| Parameter | Type | What it does |
| namerequired |
string |
the path to walk |
| torequired |
string |
which end to walk to, by the name pathStart or pathFinish gave it |
Example
let how = walkPath("guild", "bank")
if how == "ARRIVED" { become banking }
No command on this page matches that. The search box looks across every page.