anyWall
returns bool
anyWall(id: int, name: string, nameContains: string, within: int, area: area, command: string) -> bool
True when at least one wall matches. Stops at the first one, so it is cheaper than counting.
| Parameter | Type | What it does |
| idoptional |
int |
the wall id from the cache, not the server index |
| nameoptional |
string |
the whole name, ignoring case |
| nameContainsoptional |
string |
part of the name, ignoring case |
| withinoptional |
int |
how many tiles away at most, straight line |
| areaoptional |
area |
must be standing inside this area |
| commandoptional |
string |
offers this right-click option, such as "Chop down" |
Example
if anyWall(command: "Open", within: 3) { stop }
nearestWall
returns wall?
nearestWall(id: int, name: string, nameContains: string, within: int, area: area, command: string) -> wall?
The closest wall matching every option given, or none. Distance is straight-line from where you are standing, measured in the same reading the wall was read from.
| Parameter | Type | What it does |
| idoptional |
int |
the wall id from the cache, not the server index |
| nameoptional |
string |
the whole name, ignoring case |
| nameContainsoptional |
string |
part of the name, ignoring case |
| withinoptional |
int |
how many tiles away at most, straight line |
| areaoptional |
area |
must be standing inside this area |
| commandoptional |
string |
offers this right-click option, such as "Chop down" |
Example
let door = nearestWall(name: "Door", within: 5)
wallCount
returns int
wallCount(id: int, name: string, nameContains: string, within: int, area: area, command: string) -> int
How many walls match every option given. With no options, how many there are.
| Parameter | Type | What it does |
| idoptional |
int |
the wall id from the cache, not the server index |
| nameoptional |
string |
the whole name, ignoring case |
| nameContainsoptional |
string |
part of the name, ignoring case |
| withinoptional |
int |
how many tiles away at most, straight line |
| areaoptional |
area |
must be standing inside this area |
| commandoptional |
string |
offers this right-click option, such as "Chop down" |
Example
if wallCount(name: "Door", within: 5) == 0 { walkTo(tile(216, 448)) }
walls
returns list<wall>
walls(id: int, name: string, nameContains: string, within: int, area: area, command: string) -> list<wall>
Every wall matching every option given, in whatever order the client holds them. With no options, all of them.
| Parameter | Type | What it does |
| idoptional |
int |
the wall id from the cache, not the server index |
| nameoptional |
string |
the whole name, ignoring case |
| nameContainsoptional |
string |
part of the name, ignoring case |
| withinoptional |
int |
how many tiles away at most, straight line |
| areaoptional |
area |
must be standing inside this area |
| commandoptional |
string |
offers this right-click option, such as "Chop down" |
Example
for door in walls(name: "Door", within: 5) { approach(door) }
wallsByDistance
returns list<wall>
wallsByDistance(id: int, name: string, nameContains: string, within: int, area: area, command: string) -> list<wall>
Every wall matching every option given, closest first.
| Parameter | Type | What it does |
| idoptional |
int |
the wall id from the cache, not the server index |
| nameoptional |
string |
the whole name, ignoring case |
| nameContainsoptional |
string |
part of the name, ignoring case |
| withinoptional |
int |
how many tiles away at most, straight line |
| areaoptional |
area |
must be standing inside this area |
| commandoptional |
string |
offers this right-click option, such as "Chop down" |
Example
for door in wallsByDistance(command: "Open", within: 8) { approach(door) }
No command on this page matches that. The search box looks across every page.