bubbleKnown() -> bool
Whether the balloon commands are answering from the client. Worth asking once at start: a balloon is a rarer event than a step, so an unbound hook here stays invisible far longer.
if not bubbleKnown() { stop }
20 game 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.
bubbleKnown() -> bool
Whether the balloon commands are answering from the client. Worth asking once at start: a balloon is a rarer event than a step, so an unbound hook here stays invisible far longer.
if not bubbleKnown() { stop }
fatigue() -> int
How tired you are, 0 to 100. At 100 you stop gaining experience.
if fatigue() > 95 { stop }
gameTick() -> int
How many frames the client has drawn since the bot attached. It advances once per drawn frame, so it measures the client's pace and not the server's.
let frame = gameTick()
inCombat() -> bool
True while you are fighting. Read from your stance rather than the combat timer, because the timer runs on for a while after a fight ends and anything gating on it keeps fighting a fight that is over.
if inCombat() { return 1200 }
isSleeping() -> bool
True while the sleep screen is up.
if isSleeping() { return 2000 }
menuIsOpen() -> bool
True while the right-click menu is showing. Not the npc dialogue - that is dialogueOpen().
if menuIsOpen() { return 200 }
mouseX() -> int
Where the client thinks the pointer is, across. In the client's own surface, not the window.
let x = mouseX()
mouseY() -> int
Where the client thinks the pointer is, down.
let y = mouseY()
movementKnown() -> bool
Whether moving() is answering from the client or giving up. False means the hooks are absent and moving() will say false for ever.
if not movementKnown() { stop }
moving() -> bool
True while you are walking. The client's own test, taken off the queued waypoints, so it separates 'has not set off' from 'has arrived' - which polling your position cannot.
if movementKnown() and not moving() { return 600 }
myBubbleAge() -> int
How many client ticks ago your balloon started, or -1 when there is none. The half to remember between passes: two polls that both see item 21 cannot tell one balloon from two, but an age that went backwards is certainly a new one.
let age = myBubbleAge()
myBubbleItem() -> int
The item id in the balloon over your own head, or -1 when there is no balloon. A hint that something worked, not a count: the client draws what the server sends and derives nothing, so one balloon is not reliably one successful action.
if myBubbleItem() == 373 { return 600 }
myBubbleJustStarted() -> bool
True only on the tick a balloon appeared. Exact rather than roughly new, so a pass slower than the client's tick will miss it - myBubbleAge going backwards is the reliable test and this is the convenient one.
if myBubbleJustStarted() { return 600 }
myBubbleTicks() -> int
How many more client ticks your balloon will be drawn for, or 0 when there is none. Worth watching rather than the item id: the countdown going back up is the only certain sign a second balloon started.
let left = myBubbleTicks()
myTile() -> tile
Where you are standing, in world coordinates.
let home = myTile()
prayerMask() -> int
Which prayers are on, as the bitmask the client stores. Handed over raw: turning it into named prayers needs the prayer composite, which is not mapped, and inventing an ordering here would be a guess that scripts then depend on.
if prayerMask() == 0 { return 600 }
regionBase() -> tile
The bottom-left corner of the loaded region, in world coordinates. Only of interest to a script doing its own coordinate arithmetic.
let base = regionBase()
showingBubble() -> bool
True while a balloon is up over your own head.
if showingBubble() { return 400 }
sleepFatigue() -> int
How much fatigue is left to sleep off, 0 to 100. Falls while you are asleep; 0 means you can wake up.
if isSleeping() and sleepFatigue() < 1 { return 600 }
stance() -> int
Your facing, as the client stores it, or -1 when it cannot be read. 8 and 9 are the two fighting stances.
if stance() == 8 { return 1200 }