Triggered commands can be used to execute one or several commands when a given event occurs in game on your server. Each type of triggered command has his own set of parameters.
Command type 'On player (dis)connection'
The command(s) will be executed whenever a player enters or leaves the server. The following parameters can be set for this command type:
- Command(s): enter in this field the command or the list of commands to be executed. If you need to execute several commands you must seperate them with a semicolon ';' (Example: say "Charity time";inventory.giveall "wood" "1000").
You can use the following beacons in your commands that will be substituted whith their corresponding value when the command will be executed:
- ${playerID}: the player's steamID (17 digits format)
- ${playerIP}: the player's IP
- ${playerName}: the player's name
- ${playerMsg}: the message sent by the player (only for On Chat)
- ${playerCount}: the number of online players
- ${maxPlayers}: the maximum number of players slots
- ${playerPing}: the player's ping (only for On Chat)
- ${playerQueued}: the number of players waiting to connect to the server
- ${playerJoining}: the number of players currently joining the server
- ${killer}: the name of the killer (only for On PVP kill and On PVE kill)
- ${killed}: the name of the killed player (only for On PVP kill and On PVE kill)
- ${killerID}: the killer's steamID (17 digits format) (only for On PVP kill and On PVE kill)
- ${killedID}: the killed player's steamID (17 digits format) (only for On PVP kill and On PVE kill)
- ${lastWipeDate}: the last map wipe date
- ${gameDateTime}: the current ingame date and time. This is accurate to within 30 seconds in real life.
By default the commands entered in this field must be rust commands but you can use the special keyword ::postwebhook to send a message to a discord webhook instead of sending a command to your rust server. The syntax is ::postwebhook:http://yourwebhookurl enter here the message to send
- Cooldown: means that the command can't be triggered more than once every X seconds. This is to avoid players spamming some commands.
- Execute only for player ID(s): the command will be executed only for players having their steamID in this list (17 digits steamIDs, use ';' between them if you want to add more than one steamID). Leave this field empty if you want to execute the command for any player.
- Execute except for player ID(s): the command will be executed only if the player doesn't have his steamID in this list (17 digits steamIDs, use ';' between them if you want to add more than one steamID). Leave this field empty if you don't want to filter out players.
Command type 'On chat'
The command(s) will be executed whenever a player writes in the chat. The following parameters can be set for this command type:
- Command(s): see above the meaning of this field in the 'On player (dis)connection' section.
- Cooldown: see above the meaning of this field in the 'On player (dis)connection' section.
- Execute only for player ID(s): see above the meaning of this field in the 'On player (dis)connection' section.
- Execute except for player ID(s): see above the meaning of this field in the 'On player (dis)connection' section.
- Chat/regexp is: the command will be executed if the chat matches the string in this field. If you know how regexp work you can use them and check the 'Is a regexp' checkbox (see below). This field is mandatory.
- Is a regexp: check that box to indicate that the field 'Chat/regexp is' contains a regular expression. You can use this website to test your regular expressions (stick with the default options).
Command type 'On airdrop/helicopter patrol/cargo ship/locked crate'
The command(s) will be executed whenever an airdrop, helicopter patrol, cargo ship, locked crate event occurs. The following parameters can be set for this command type:
- Command(s): see above the meaning of this field in the 'On player (dis)connection' section.
- Cooldown: see above the meaning of this field in the 'On player (dis)connection' section.
Command type 'On population change'
The command(s) will be executed whenever the number of players connected changes according to the configured 'Population threshold'. The following parameters can be set for this command type:
- Population threshold: defines a population threshold. If the number of players is inferior or equals to this threshold then the 'Command(s) under threshold' will be executed when the population changes. Otherwise the 'Command(s) over threshold' will be executed.
- Command(s) under threshold: enter in this field the command or the list of commands to be executed when the population is inferior or equals to the 'population threshold'.
- Command(s) over threshold: enter in this field the command or the list of commands to be executed when the population is strictly superior to the 'population threshold'.
Command type 'On PVP kill'
The command(s) will be executed whenever a player is killed by another player. The following parameters can be set for this command type:
- Cooldown: means that the command can't be triggered more than once every X seconds. This is to avoid players spamming some commands.
- Execute only for killer ID(s): the command will be executed only for killers having their steamID in this list (17 digits steamIDs, use ';' between them if you want to add more than one steamID). Leave this field empty if you want to execute the command for any killer.
- Execute except for killer ID(s): the command will be executed only if the killer doesn't have his steamID in this list (17 digits steamIDs, use ';' between them if you want to add more than one steamID). Leave this field empty if you don't want to filter out killers.
Command type 'On PVE kill'
The command(s) will be executed whenever a player is killed by the environment. The following parameters can be set for this command type:
- Cooldown: means that the command can't be triggered more than once every X seconds. This is to avoid players spamming some commands.