Docs · walls

walls

5 walls commands, generated from the engine's own registry — signatures, parameters and a worked example each. A does something command acts on the game; a needs x() one answers a confident wrong answer when its client hooks are missing.

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.

ParameterTypeWhat 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.

ParameterTypeWhat 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.

ParameterTypeWhat 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.

ParameterTypeWhat 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.

ParameterTypeWhat 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) }