Add generic call
function which uses the command interface
#77
Labels
request :: api
Requesting API functionality
Milestone
Perk config is very versatile, but it can be even more so.
Example
There could be an unused-by-default
call
function which is able to execture commands provided via perk's settings, for example:Overview
The command can be provided via the
command
setting and its arguments through consecutiveargN
settings. The function calledCustomCommand_Call
will parse and build a command that is run on the server, targeting the player who rolled this particular perk.%target%
will be replaced with the user ID of a player by RTD, to make sure addressing is unique and not name-dependent. Furthermore,%target%
can be specified in any argument, since it's up to the command to define which argument is the target.CustomCommand_Init
will verify whether the command is valid and is safe (see section below) to run while the config is parsed. This is helpful for debugging because you can see a message in the server logs whether you configured something incorrectly.Security
Running server commands in an unsolicited way is bad.
CustomCommand_Call
will always check flags of the provided command. Commands will the following flags should error out without being executed:The text was updated successfully, but these errors were encountered: