Classes
Prompt
This class is for interacting with text prompts via the chat box. Prompt is accessible in the global scope via the variable prompt.
Example
ts
player.use(0x4021c7b1); // Runebook
const gump = Gump.findOrWait(0x59);
if (!gump) {
exit("Coudln't open runebook");
}
gump.reply(1);
prompt.waitUntilOpen(1000); // wait up to 1 second for a prompt to show up
prompt.reply('My Awesome runebook');Properties
exists
ts
exists: boolean;Checks if a prompt exists and is waiting for input
Example
ts
if (prompt.exists) {
prompt.reply('House Rune');
}Methods
reply()
ts
reply(value: string): voidReply to a currently waiting prompt, if one is open
Parameters
| Parameter | Type | Description |
|---|---|---|
value | string |
Example
ts
prompt.reply('House Rune');