Docs · messages

messages

3 messages 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.

lastServerMessage returns string
lastServerMessage() -> string

The most recent line the server printed, or "" when nothing has arrived yet.

Example
wait until contains(lastServerMessage(), "Bank is now open") timeout 6000
serverMessageFrom returns string
serverMessageFrom() -> string

Who sent the most recent line: a player's name for a private message, otherwise "" for a system or public one.

Example
print(serverMessageFrom(), "said", lastServerMessage())
serverMessages returns list<string>
serverMessages() -> list<string>

The recent lines, oldest first. Scan these to catch a message a single lastServerMessage() check between passes could have missed.

Example
for line in serverMessages() { if line == "You have run out of arrows" { stop } }