Game
Game interface exposed to scripting environments as global game
. A new game instance is created for each script to make event / hud cleanup easier in the case that a script doesn't clean up after itself.
Fields:
AccountName string
The name of the account this client is connected as
ActionQueue ActionQueue
Action Queue
Actions ClientActions
Client actions
Capabilities Capabilities
The capabilities of this game client
Character Character
Information about the currently logged in character. Only valid while logged in, specifically when game.State == ClientState.Entering_Game
CharacterId number
The weenie id of the currently logged in character. 0 if not logged in.
Characters CharacterIdentity[]
A list of characters available on the character select screen. This includes characters pending deletion.
MaxAllowedCharacters number
Maximum number of characters allowed to be created per account on this server.
Messages MessageHandler
Access to ac network message events
ServerName string
The name of the server this client is connected to
State ClientState
The current state of the client. Use this to check if you are logged in, at character select screen, etc.
World World
Information about the world around you. Only valid while logged in, specifically when game.State == ClientState.Entering_Game
Events:
OnRender2D EventArgs
Fired every frame, during 2D rendering
OnRender3D EventArgs
Fired every frame, during 3D rendering
OnScriptEnd EventArgs
Fired when the script tied to this game instance is stopped.
OnStateChanged StateChangedEventArgs
Fired when client state changes. See ClientState for a list of valid states.
OnWindowMessage WindowMessageEventArgs
Fired for every window message. You can optionally eat them to prevent them from hitting imgui / game client.
Methods:
GetPropertyKeys() : string[]
Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts
ToString() : string
Returns a string that represents the current object.