[DOC] Event Variables

Trekkan

JFF Administrator
Staff member
Each event has a set of variables associated with them. Generally speaking, each event would have a set of player variables, etc. An event like the AirDrop, of course wouldn't. Below is a list of all of the current variables available to you. Eventually this list will be cleaned up and displayed per event, etc. But for now, this is what ya get. =)

Common
{servername}
{ratversion}
{datetime}
{date}
{time}
{airdropcoords}
{airdrop_coords}
{player_online_count}

{0} - All arguments passed in on a command
{n} - Argument number of the passed in arguments to the command, space delimited

Player Data
{player_id}
{player_name} (Use {{player_name}} to wrap the player name in double quotes)
{player_country}
{player_pos}
{player_rot}
{player_remote}
{player_health}
{player_deaths}
{player_zombies}
{player_playerkills}
{player_score}
{player_level}
{player_steamid}
{player_ip}
{player_ping}
{player_status}
{player_lastseen}
{player_chat}

Kick Event
{kicker_name}
{kicker_reason}

Ban Event
{ban_by_name}
{ban_name}
{ban_duration}
{ban_timespan}
{ban_reason}

Seen Event
{seen_name}
{seen_time}

Teleport Event

{tele_dest_name}
{tele_dest_loc}
{tele_dest_max}
{tele_dest_time}

Game Time

{gametime_full}
{gametime_day}
{gametime_hour}
{gametime_minute}

Other

{airdrop_coords}
{bloodmoon_days}
{random_number}
 
Last edited:

Ian Lee

New Member
I created an event using {bloodmoon_days} and it does not appear to work. The event I created is as below:

Bloodmoon is {bloodmoon_days} days away.
However, the value for {bloodmoon_days} always appears blank when the message appears.

Ex.
Server: Bloodmoon is days away.

Am I doing something wrong?

Thanks!
Ian
 

Trekkan

JFF Administrator
Staff member
I created an event using {bloodmoon_days} and it does not appear to work. The event I created is as below:

Bloodmoon is {bloodmoon_days} days away.
However, the value for {bloodmoon_days} always appears blank when the message appears.

Ex.
Server: Bloodmoon is days away.

Am I doing something wrong?

Thanks!
Ian
Try using this as the script: .BLOODMOON:PUBLIC:The next bloodmoon is in {bloodmoon_next} days!||The next bloodmoon is tonight!

I changed the signature of that function a while back and it might be that you still have the old one. Sorry about that!
 

Ian Lee

New Member
Try using this as the script: .BLOODMOON:PUBLIC:The next bloodmoon is in {bloodmoon_next} days!||The next bloodmoon is tonight!

I changed the signature of that function a while back and it might be that you still have the old one. Sorry about that!
I tried that and all I got chatted was the literal copy of that instead of the expected translated text. I'm using v0.1.12.8 which it says is the latest. Is there something I need to turn on to make the scripts work?

On a similar note, I'd like to request a button in the messages panel to allow sending a message on demand instead of waiting for the timer. That would make testing easier and might have other uses.

Thanks!
Ian
 

Trekkan

JFF Administrator
Staff member
I tried that and all I got chatted was the literal copy of that instead of the expected translated text. I'm using v0.1.12.8 which it says is the latest. Is there something I need to turn on to make the scripts work?

On a similar note, I'd like to request a button in the messages panel to allow sending a message on demand instead of waiting for the timer. That would make testing easier and might have other uses.

Thanks!
Ian
There are technically three versions of RAT available at the moment. Resources | Just For Fun Gaming Community

I'd recommend the experimental version as it has a lot of fixes in it, ones that probably fix the issues you're having.

As for the suggestion, I'll try and remember it, but please post it in the feature request forum as well. =)
 

Ian Lee

New Member
I've installed the experimental version and I got the same behavior. However, I've fixed the issue. It seems that {bloodmoon_days} is no longer valid but the {bloodmoon_next} that you showed does work. I couldn't get the script to work at all. It just output the script to the chat. This is what I entered as the message:

.BLOODMOON:PUBLIC:The next bloodmoon is in {bloodmoon_next} days!||The next bloodmoon is tonight!
On a similar note... Is there a way to do math in message? For example, I'd like to create a message that announces when the trader has restocked. I suppose a {traderrestock_next} would accomplish this if there was such a thing but perhaps a more flexible option would be to be able to do something like:

Trader's will restock in [{bloodmoon_next} + 1] days!​

If this is already possible let me know. Otherwise, I'll add it to the feature requests.

Thanks!
Ian
 

Trekkan

JFF Administrator
Staff member
I'll have to look into the bloodmoon script closer, it should work (and does work for some, so not sure what the problem here is). Assuming you still have the problem? Not 100% sure its fixed or not. =)

As to the math, there currently isn't a way to do MATH in the script, so a feature request would be good.
 

Chris90210

New Member
JFF Supporter
Moin wie mache Ich ein Event wo mehrere Horden ausgelöst werden per chat command ? Aktuelle Version. Gruß Chris
 

badplayer

Active Member
JFF Member
JFF Supporter
7D2D RAT Supporter
You would use the bc-spawn command.

Look at the /hunt command to get an idea of what it should look like.
 

Chris90210

New Member
JFF Supporter
Danke erstmal. Hunt funktioniert und was muss ich jetzt eingeben das dort Zombies spawnen ? wenn ich die Zahlen ändere kommen immer Hirsche .
 

badplayer

Active Member
JFF Member
JFF Supporter
7D2D RAT Supporter
In the F1 console, type se and that's all the entities you can spawn.
You can also just do bc-spawn horde instead of bc-spawn
 
Top