Docs · drops

drops

5 drops 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.

anyDrop returns bool
anyDrop(id: int, name: string, nameContains: string, within: int, area: area) -> bool

True when at least one drop matches. Stops at the first one, so it is cheaper than counting.

ParameterTypeWhat it does
idoptional int the item 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
Example
if anyDrop(name: "Bones", within: 4) { stop }
dropCount returns int
dropCount(id: int, name: string, nameContains: string, within: int, area: area) -> int

How many drops match every option given. With no options, how many there are.

ParameterTypeWhat it does
idoptional int the item 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
Example
if dropCount(id: 10, within: 6) > 0 { walkTo(tile(303, 553)) }
drops returns list<drop>
drops(id: int, name: string, nameContains: string, within: int, area: area) -> list<drop>

Every drop matching every option given, in whatever order the client holds them. With no options, all of them.

ParameterTypeWhat it does
idoptional int the item 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
Example
for loot in drops(within: 6) { walkTo(loot.tile) }
dropsByDistance returns list<drop>
dropsByDistance(id: int, name: string, nameContains: string, within: int, area: area) -> list<drop>

Every drop matching every option given, closest first.

ParameterTypeWhat it does
idoptional int the item 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
Example
for loot in dropsByDistance(name: "Bones", within: 12) { walkTo(loot.tile) }
nearestDrop returns drop?
nearestDrop(id: int, name: string, nameContains: string, within: int, area: area) -> drop?

The closest drop matching every option given, or none. Distance is straight-line from where you are standing, measured in the same reading the drop was read from.

ParameterTypeWhat it does
idoptional int the item 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
Example
let loot = nearestDrop(name: "Coins", within: 10)