Skip to content

Avatar

Represents a player in the world.

Data about this player.

Type: AvatarData

Whether the entity is alive.

Type: boolean

The entity’s auras.

Type: Aura[]

The cell the entity is in.

Type: string

The entity’s current HP.

Type: number

The player’s level.

Type: number

The entity’s max HP.

Type: number

The player’s max mp.

Type: number

The player’s current mp.

Type: number

The pad the player is in.

Type: string

The entity’s state.

Type: EntityState

The player’s username.

Type: string

Retrieves an aura active on the entity.

ParameterTypeDescription
namestringThe aura name.

Returns: Aura | undefined

Whether the entity has the specified aura. If a value is provided, it will check if the aura has the specified value.

ParameterTypeOptionalDefaultDescription
namestringThe aura name.
valuenumber?The value to check.

Returns: boolean

Returns: boolean

Whether the entity’s hp is greater than a value.

ParameterTypeDescription
valuenumberThe value to compare the entity’s hp to.

Returns: boolean

Whether the entity’s hp is less than a value.

ParameterTypeDescription
valuenumberThe value to compare the entity’s hp to.

Returns: boolean

Whether the entity’s hp is greater than a percentage value.

ParameterTypeDescription
valuenumberThe percentage value to compare the entity’s hp to.

Returns: boolean

Whether the entity’s hp is less than a percentage value.

ParameterTypeDescription
valuenumberThe percentage value to compare the entity’s hp to.

Returns: boolean

Whether the entity is idle.

Returns: boolean

Whether the entity is in the specified cell.

ParameterTypeDescription
cellstringThe cell to check.

Returns: boolean

Whether the entity is in combat.

Returns: boolean

Whether the entity is a monster.

Returns: this is Monster

Whether the entity is a player.

Returns: this is Avatar