User Tools

Site Tools


addons:events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
addons:events [2017/04/21 19:41]
atom0s
addons:events [2017/04/21 19:52]
atom0s
Line 165: Line 165:
     * or     * or
     * **string, number** - The modified message and mode to use instead of the current ones.     * **string, number** - The modified message and mode to use instead of the current ones.
 +
 +----
 +==== Event: outgoing_text =====
 +
 +Called when the game client is sending text to the server.\\
 +//(This gets called when a command, chat, etc. is not handled by the client and is being sent to the server.)//
 +
 +<code lua>
 +ashita.register_event('​outgoing_text',​ function(mode,​ message, modifiedmode,​ modifiedmessage,​ blocked)
 +    print('​Outgoing text event fired!'​);​
 +    return false;
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * **mode** - (number) The chat mode of the message. (Controls the color of the overall message.)
 +    * **message** - (string) The message being added to the chat log.
 +    * **modifiedmode** - (number) The modified mode, if another addon or plugin has modified it.
 +    * **modifiedmessage** - (string) The modified message, if another addon or plugin has modified it.
 +    * **blocked** - (bool) True if the message has been blocked by another addon or plugin, false otherwise.
 +
 +**Returns** \\
 +    * **bool** - True if the message should be blocked, false otherwise.
 +    * or
 +    * **number** - The modified message mode to use instead of the current one.
 +    * or
 +    * **string** - The modified message to use instead of the current one.
 +    * or
 +    * **string, number** - The modified message and mode to use instead of the current ones.
 +
 +----
 +==== Event: prerender ====
 +
 +Called when the client is about to start rendering. (Called just after D3D8 BeginScene.)
 +
 +<code lua>
 +ashita.register_event('​prerender',​ function()
 +    print('​Prerender event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
 +----
 +==== Event: render ====
 +
 +Called when the client has finished its rendering and other tools can now render. (Called during D3D8 EndScene.)
 +
 +<code lua>
 +ashita.register_event('​render',​ function()
 +    print('​Render event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
 +----
 +==== Event: timerpulse ====
 +
 +Called when the client is rendering the scene, used for Addons Lua timers library.\\
 +//(Addons should not register to this event themselves, it is used for the timers library.)//
 +
 +<code lua>
 +ashita.register_event('​timerpulse',​ function()
 +    print('​Timer pulse event fired!'​);​
 +end);
 +</​code>​
 +
 +**Parameters** \\
 +    * None
 +
 +**Returns** \\
 +    * None
 +
  
 ---- ----
addons/events.txt · Last modified: 2017/04/22 00:10 (external edit)