[DOC] Event Types

Status
Not open for further replies.
Event Name: TEXT MATCH

Description: Matches any text that comes through the console. This *IS* CaSe SenSiTivE!

Parameters:
CONTAINS:MatchText
STARTSWITH:MatchText
ENDSWITH:MatchText

Notes:

Works exactly like the PLAYER PUBLIC CHAT event, except that this event will look at ALL text coming in on the console, not just chat. You should only use this command if you know exactly what you are doing. For instance, it is possible to cause a loop by using the same text in the response, as the trigger, etc.

Short version, use it only if you know now. Do NOT use it to trap player chat, use the PLAYER PUBLIC CHAT event instead.
 
Last edited:
Event Name: Player New Connected

Description: Fires when a new player connects to the server. A player is considered new, if they match ALL of the following conditions:
Level: 1
Health: 100
Deaths: 0
Zombies: 0
Player Kills: 0
Score: 0​

Parameters:
none

Event Variables:
Player

Notes:
This event fires 60 seconds after the player joins the server. This is due to the length of time it takes for a player to actually be fully logged into the server, and the player data to be updated correctly.
 
Event Name: Player Connecting

Description: As soon as a player starts to connect to the server, this event fires. This is prior to any checks against EAC, etc.

Parameters:
none

Event Variables:
Player

Notes:
Not all player data may be filled out when the event fires. It depends on whether or not the player has ever connected to the server before and what data RAT might already have about the player.
 
Event Name: Player Connected

Description: After a player has fully connected to the server. Meaning they have passed all EAC checks and whatnot.

Parameters:
none

Event Variables:
Player

Notes:
The player may not be fully in the game at this point, meaning they could be staring at the loading screen still. Unfortunately there is no new event for me to trap once the player is actually in the game and able to move around. I've requested a notification of this from TFP, but we'll see if/when they add it.
 
Event Name: Player Public Chat

Description: A player has typed something in the public chat window

Parameters:
CONTAINS:MatchText
STARTSWITH:MatchText
ENDSWITH:MatchText
LEVEL:=,<,><level>

Event Variables:
Player

Notes:
You can have multiple parameters by separating them with two || (pipes).
** If you use the LEVEL command, it must be the last parameter.

Example: STARTSWITH:!rules

Player types the !level command
Player must be exactly level 10
Example: STARTSWITH:!level||LEVEL:=10

Player must be higher than level 10
Example: STARTSWITH:!level||LEVEL:>10

Player must be less than level 10
Example: STARTSWITH:!level||LEVEL:<10​

All parameters are considered as OR logic, meaning either one will be considering a match. There is currently no AND logic.

This is probably one of the most used events you can use. Because you can match commands from your players and then perform the script commands against that player, location, etc.
 
Last edited:
Event Name: Server Down

Description: RAT is unable to detect the server from either a telnet connection, or the server process itself.
Parameters:
<none>

Event Variables:
Common
 
Event Name: Server Failed Ping Check

Description: The server has not responded to ping checks. If you have enabled the Server Ping Check.
Parameters:
<none>

Event Variables:
Common
 
Status
Not open for further replies.