Bot
Properties
Section titled “Properties”The army API class instance.
Type: Army
The Auth API class instance.
Type: Auth
The Bank API class instance.
Type: Bank
combat
Section titled “combat”The Combat API class instance.
Type: Combat
The Drops API class instance.
Type: Drops
environment
Section titled “environment”The Environment API class instance.
Type: Environment
The Flash API class instance.
Type: Flash
The House API class instance.
Type: House
inventory
Section titled “inventory”The Inventory API class instance.
Type: Inventory
packets
Section titled “packets”The Packets API class instance.
Type: Packets
player
Section titled “player”The local Player API class instance.
Type: Player
quests
Section titled “quests”The Quests API class instance.
Type: Quests
scheduler
Section titled “scheduler”The Scheduler API class instance.
Type: Scheduler
settings
Section titled “settings”The Settings API class instance.
Type: Settings
The Shops API class instance.
Type: Shops
tempInventory
Section titled “tempInventory”The TempInventory API class instance.
Type: TempInventory
The World API class instance.
Type: World
Methods
Section titled “Methods”Pauses execution for a specified amount of time.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| ms | number | The number of milliseconds to wait. | ||
| signal | AbortSignal? | ✓ | An optional AbortSignal to abort the sleep. |
Returns: Promise<void>
waitUntil
Section titled “waitUntil”Pauses execution until a specified condition is met.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| condition | (__namedParameters: { signal: AbortSignal; abort: any }) => boolean | A function that returns a boolean indicating whether the condition is met. It receives an object with an AbortSignal and an abort function. | ||
| options | WaitUntilOptions | null | ✓ | {} | Optional settings for the waitUntil function. |
Returns: Promise<Result<never, string> | Result<undefined, never>>
getInstance static
Section titled “getInstance ”Gets the singleton instance of the Bot class.
Returns: Bot
Events
Section titled “Events”This event is emitted when the player goes AFK.
auraAdd
Section titled “auraAdd”auraRemove
Section titled “auraRemove”This event is emitted when the player logs in.
logout
Section titled “logout”This event is emitted when the player logs out.
mapChanged
Section titled “mapChanged”This event is emitted when the map has changed.
| Parameter | Type | Description |
|---|---|---|
| mapName | string | The name of the new map. |
monsterDeath
Section titled “monsterDeath”This event is emitted when a monster has died.
| Parameter | Type | Description |
|---|---|---|
| monMapId | number | The monster map id. |
monsterRespawn
Section titled “monsterRespawn”This event is emitted when a monster has respawned.
| Parameter | Type | Description |
|---|---|---|
| monster | Monster | The monster that has respawned. |
packetFromClient
Section titled “packetFromClient”| Parameter | Type | Description |
|---|---|---|
| packet | string | The packet dispatched from the client. |
packetFromServer
Section titled “packetFromServer”| Parameter | Type | Description |
|---|---|---|
| packet | string | The packet received from the server. |
OnExtensionResponse event.
| Parameter | Type | Description |
|---|---|---|
| packet | Record<string, unknown> |
playerDeath
Section titled “playerDeath”This event is emitted when a player dies.
| Parameter | Type | Description |
|---|---|---|
| playerName | string | The name of the player who died. |
playerJoin
Section titled “playerJoin”This event is emitted when a player joins the room.
| Parameter | Type | Description |
|---|---|---|
| playerName | string | The name of the player. |
playerLeave
Section titled “playerLeave”This event is emitted when a player leaves the room.
| Parameter | Type | Description |
|---|---|---|
| playerName | string | The name of the player. |