World
Properties
Section titled “Properties”Type: Bot
availableMonsters Getter
Section titled “availableMonsters ”A list of monsters in the cell.
Type: Monster[]
cellPads Getter
Section titled “cellPads ”A list of valid pads for the current cell.
Type: string[]
cells Getter
Section titled “cells ”A list of all cells in the map.
Type: string[]
itemTree Getter
Section titled “itemTree ”The list of all items in the world.
Type: ItemData[]
monsters Getter
Section titled “monsters ”A list of monsters in the map.
Type: MonsterData[]
name Getter
Section titled “name ”The name of the map.
Type: string
playerNames Getter
Section titled “playerNames ”A list of all player names in the map.
Type: string[]
players Getter
Section titled “players ”A list of all players in the map.
Type: Map<string, Avatar> | null
roomId Getter
Section titled “roomId ”The current room area id.
Type: number
roomNumber Getter
Section titled “roomNumber ”The room number of the map.
Type: number
Methods
Section titled “Methods”getMapItem
Section titled “getMapItem”Gets a item in the world.
| Parameter | Type | Description |
|---|---|---|
| itemId | number | The ID of the item. |
Returns: Promise<void>
Goto the specified player.
| Parameter | Type | Description |
|---|---|---|
| playerName | string | The name of the player to goto. |
Returns: void
isActionAvailable
Section titled “isActionAvailable”Whether the game action has cooled down.
| Parameter | Type | Description |
|---|---|---|
| gameAction | GameAction | The game action to check. |
Returns: boolean
isLoading
Section titled “isLoading”Whether the map is still being loaded.
Returns: boolean
isMonsterAvailable
Section titled “isMonsterAvailable”Whether a monster is available.
| Parameter | Type | Description |
|---|---|---|
| monsterResolvable | string | The name of the monster or in monMapID format. |
Returns: boolean
isPlayerInCell
Section titled “isPlayerInCell”Whether a player is in a given cell.
| Parameter | Type | Description |
|---|---|---|
| name | string | The player name to check. |
| cell | string | The cell to check. |
Returns: boolean
isPlayerInMap
Section titled “isPlayerInMap”Whether a player is in the map.
| Parameter | Type | Description |
|---|---|---|
| name | string | The player name to check. |
Returns: boolean
Joins a map.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| mapName | string | The name of the map to join. | ||
| cell | string | ✓ | "Enter" | The cell to jump to. |
| pad | string | ✓ | "Spawn" | The pad to jump to. |
Returns: Promise<void>
Jump to the specified cell and pad of the current map.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| cell | string | The cell to jump to. | ||
| pad | string | ✓ | "Spawn" | The pad to jump to. |
| ignoreCheck | boolean | ✓ | false | Whether to ignore the current cell check. |
Returns: Promise<void>
loadMapSwf
Section titled “loadMapSwf”Loads a particular swf of a map.
| Parameter | Type | Description |
|---|---|---|
| mapSwf | string | The swf to load. |
Returns: void
reload
Section titled “reload”Reloads the map.
Returns: void
setSpawnPoint
Section titled “setSpawnPoint”Sets the player’s spawnpoint.
| Parameter | Type | Optional | Default | Description |
|---|---|---|---|---|
| cell | string? | ✓ | ||
| pad | string? | ✓ |
Returns: void