The alias of the client.
Whether or not the client should automatically shoot at enemies.
Info about the account's characters.
The email address of the client.
The PacketIO instance associated with the client.
Info about the current map.
The tiles of the current map. These are stored in a 1d array, so to access the tile at x, y the index y * height + x should be used where height is the height of the map.
A queue of positions for the client to move towards. If the queue is not empty, the client will move towards the first item in it. The first item will be removed when the client has reached it.
The objectId of the client.
The password of the client.
The player data of the client.
The runtime in which this client is running.
The current position of the client.
A number between 0 and 1 which represents the percentage of health at which the client will escape to the Nexus. A value of 0.5 will be 50% of the max health.
A number between 0 and 1 which represents the percentage of health at which the client will escape to the Nexus. A value of 0.5 will be 50% of the max health.
Indicates whether or not the client's TCP socket is connected.
The current game id of this client.
A number between 0 and 1 which can be used to modify the speed of the client. A value of 1 will be 100% move speed for the client, a value of 0.5 will be 50% of the max speed. etc.
A number between 0 and 1 which can be used to modify the speed of the client. A value of 1 will be 100% move speed for the client, a value of 0.5 will be 50% of the max speed. etc.
The server the client is connected to.
Applies some damage and returns whether or not the client should return to the nexus.
The amount of damage to apply.
Whether or not the damage should be armor piercing.
Connects to gameId
on the current server
@param gameId The gameId to use upon connecting.
Checks whether or not the client should take damage from the tile they are currently standing on.
Connects to the Nexus.
Removes all event listeners and releases any resources held by the client. This should only be used when the client is no longer needed.
Finds a path from the client's current position to the to
point
and moves the client along the path.
The point to navigate towards.
Fixes the character cache after a dead character has been loaded.
Returns how long the client has been connected for, in milliseconds.
Sends a packet only if the client is currently connected.
The packet to send.
Switches the client connect to a proxied connection. Setting this to
undefined
will remove the current proxy if there is one.
The proxy to use.
Shoots a projectile at the specified angle.
The angle in radians to shoot towards.
Generated using TypeDoc
Creates a new instance of the client and begins the connection process to the specified server.