This module is a wrapper for snipe.kit.room.modules.ActionModuleRoom providing limited functionality to call action scripts from within other action scripts and call game server scripts remotely.

It is available only on Snipe Kit server.

Constructor

Methods

custom (actionID:String, ?actionParams:Dynamic):Dynamic

Calls "room.custom" action script directly.

Will only work from inside of other room action scripts on the room given to the parent script.

Script usage example:

server.actions.custom('chest.pre');

Parameters:

actionID

User action ID. Must have "room.custom" trigger.

actionParams

(optional) User action parameters object.

Returns:

Action result object. Has to have "errorCode" string field.

include (actionID:String, ?actionParams:Dynamic):Dynamic

Calls "any.include" action script directly and returns results to caller script.

Script usage example:

server.actions.include('chest.pre');

Parameters:

actionID

Action ID. Must have "any.include" trigger.

actionParams

(optional) Action parameters object.

Returns:

Action result object. In case of error has a field "errorCode".

remote (userID:Int, actionID:String, ?actionParams:Dynamic):Void

Sends a notification to game server that this client is logged on to call "game.custom" action script. Client needs to be online in the current room server. TODO If the client is offline, the message is sent to the first game server and the client will be initialized from database and marked as offline.

Will only work from inside of other action scripts.

Script usage example:

server.actions.remote(userID, 'game.reward', { points: 10 });

Parameters:

userID

User ID.

actionID

User action ID. Must have "game.custom" trigger.

actionParams

Optional. User action parameters object. Can be null.