rTriggers
MotD, Tips, Obituaries, Macros, Customization Trigger messages on login, disconnect, timers, commands, death and more.
Personalize messages with tag replacements.
Features
- Trigger messages or commands on login, disconnect, timers, or even player death and command uses.
- Decide exactly who can set off a message, and who gets it. Name players individually or by group (via Permissions).
- Line breaks on words, colour continuations (thanks to modified vMinecraft code!)
- Personalized, fill-in-the-blanks style messages (insert the triggerer or recipient's name/IP/whatever here.)
Messages format
Example properties file is in the section 4.0. rTriggers will make a properties file at plugins/rTriggers/rTriggers.properties, where plugins is in your server's folder.
The properties file consists of a list of your messages. Each message is formatted like this:
triggerers=recipients:options:message
The triggerers tell rTriggers which groups or psuedogroups can set this message off. Recipients are the ones who actually see the message when a triggerer sets it off. Options tell when and in what manner a triggerer can set off a message (like when logging in, dying, or using a certain command). The message is the actual thing that gets sent.
One can specify multiple things in the triggerers, recipients, and options fields by using commas (no spaces). What each field does is described in a section below.
Legend
If it has <<>> around it, you need to include those! bold: The name of the option/group/whatever italics: An optional part of the tag. You can leave this out (leave out any | in front of it, too). underlined: You replace this with something (like a number, or a group name). Necessary, unless it's italics.
Triggerers and Recipients
Triggerers tell rTriggers who can set this message off. Recipients tell who sees this message whenever a triggerer sets it off. Leaving the recipients field blank will default the recipient to just the triggerer. groupname: Members in this group will trigger the message (or receive it, if they're in the recipients field).
<<everyone>>
: Everyone!<<hasperm|permissionnode>>
: People with the stated permission trigger/receive this message.<<player|playername>>
: Replace playername with the name of the player you want to be a triggerer (or a recipient).<<command-triggerer>>
and <<command-recipient>: Makes the player use the message as if it were a command.<<command-console>>
: Makes the server console use the message as if it were a command.<<say-triggerer>>
and<<say-triggerer>>
: Makes the player say the message.<<timer|interval>>
: (Triggerer only) Will repeat this message (replace 'interval' with how often you want to repeat the message in seconds). Use with lists to make tips!<<t|minutes>>
: This message will repeat every hour at this minute (<<t|30>>
happens at 1:30, 2:30, etc.)<<server>>
: (Recipient only)Message is sent to the server.<<triggerer>>
: (Recipient only) The person who triggered the message.<<twitter>>
: (Recipient only) Sends the message to Twitter (ServerEvents required!!!)<<near-triggerer|dist>>
: (Recipient only) Everyone inside a dist x dist square around the triggerer gets the message. Replace 'distance' with the active area of this.- not|groupname and not|
<<player|playername>>
and not|<<triggerer>>
and not|<<hasperm|permission>>
: (Recipient only, except for hasperm) Works like the versions without 'not|' in front of them, except it makes sure that the message WON'T get sent to that person/those persons. <<craftirc|tagname>>
: (Recipient only) Replace 'tagname' with the name of the tag you want CraftIRC to send the message to.
Options
Options tell rTriggers when the message should trigger, and how. Leaving this blank is the same as using the onlogin option.
- onlogin|override - Triggers when a triggerer logs in. Override will replace the default message with a blank line.
- ondisconnect|override - Triggers when a triggerer logs out. Override will replace the original disconnect message with a blank line.
- oncommand|commandname|override|number - Triggers when a triggerer uses the specified command. Override doesn't let the command move to other plugins (removes the 'unknown command!' prompts). The number specifies the number of required arguments.
- onconsole works like the oncommand event, except you can't override these. :( Not yet, anyway.
- onload|pluginname - Whenever the plugin called pluginname is loaded by CraftBukkit. Use with
<<customtrigger>>
as the triggerer. - onkick - Triggers when a triggerer gets booted from the server.
- ondeath|natural|deathcause - Triggers when a triggerer dies. If deathcause is specified, will only trigger on that manner of death. Possible death causes are: "contact", "entity_attack", "fall", "fire", "fire_tick", "lava", "drowning", "block_explosion", "entity_explosion", "suffocation", "custom", "lightning", and "something." If the natural option is used, then it will not trigger if the player died by playerkilling, or from a mob.
- ondeath|playerkill - Triggers when a triggerer is killed by a fellow player.
- delay|seconds - Makes the message wait a few seconds after being triggered before happening
- limit|seconds|pertrigger - Keeps a message from triggering faster than specified. If pertrigger is specified, then this limit is done on a per-player basis, rather than being for everyone.
Messages and Replacement Tags
This is what you want rTriggers to say or do. You can customize it with replacement tags, which rTriggers will find and replace with the appropriate information. Here's a list of replacement tags:
<<triggerer>>
- The name of person who triggered the message (by logging in, getting kicked, etc).<<recipient>>
- The name of the person who the message is being sent to (may be the same as triggerer in many cases).<<recipient-displayname>>
and<<triggerer-displayname>>
- The display name (as opposed to the raw name).<<player-list>>
- A list of all the players online.<<color>>
- Replaced with §. Follow up with a hexadecimal number to get a color! (0-9 or A-F)<<triggerer-balance>>
and<<recipient-balance>>
- The player's iConomy balance.<<death-cause>>
- (ondeath only!) The cause of death.<<killer>>
- (ondeath only!) The killer (player name, creature name, etc.)<<kick-reason>>
- (onkick only!) The reason given for kicking the player. oncommand only!<<param#>>
- Replace the # with parameter number, like<<param1>>
, etc. It's replaced by what the player puts into the command.<<param#+>>
and<<param#->>
- is replaced by all the parameters up to and including that number/starting with and following that number.<<params>>
- Is replaced by all the parameters put into the command<<list|listname|rand>>
- Will be replaced by an item in the list called "listname." If rand is specified, it will give a random one from the list. If not, it will go down the list sequentially. IP Address/Location related:<<triggerer-ip>>
and<<recipient-ip>>
- The player's IP Address.<<triggerer-locale>>
and<<recipient-locale>>
- The player's location.<<triggerer-country>>
and<<recipient-country>>
- The player's country.<<time>>
,<<hour>>
, and<<minute>>
: These do what you probably think they do.<<everyone>>
and<<hasperm|permission>>
the message will be repeated once for each player online/with that permission, with this tag replacement- You can use them multiple times in a message, and use different ones in a message.
- If you use the same tag multiple times, it will only trigger once for each player that it applies to. That is, making someone execute "/tell
<<everyone>>
Hello there,<<everyone>>
!" will only make them say hello to everyone by their name. It won't make them list off every player to every player. - If you use different ones, it'll go through every valid combination that satisfies those tags.
List Format
These go in the same file as the messages.
<<list|Bob>>=This text goes in the 'Bob' list. <<list|Bob>>=This is also in the 'Bob' list. <<list|haha>>=This is in a separate list called 'haha'
You replace "listname" with whatever name you want. You can use replacement tags here, if you like.
If you use either the replacement tag <<list|listname|rand>>
or <<list|listname>>
will be replaced by an item in the list called "listname." If 'rand' is specified, this item will be randomly selected from the list. If not, it will just pick the 'next' item on the list. Order is determined by the order you put it in the file.
Example
################# # MOTD Example: # Basic MotD for humans group humans=::§b Hey <<triggerer>>!@ Type /rules for a list of rules. # News that shows when players log in. # Also shows up when players type /news. # Use $ to continue on the next line, and @ to insert a linebreak. <<everyone>>=:onlogin,oncommand|/news|override:<<color>>b Here's our latest events:$ @Nothing at all, really! # Tells anyone in the 'humans' or 'gods' group who's online when they log in. humans,gods=::<<player-list>> #Displays rules when people use the /rules command <<everyone>>=<<triggerer>>:oncommand|/rules|override:1) Don't break things.$ @2) Have fun.$ @3) RESPECT MAH AUTHORATAH! # Announces the login and disconnect of anyone in the 'gods' group to the server gods=<<everyone>>:onlogin,ondisconnect:<<recipient>> pay heed, and hail <<triggerer>>, your god! #################### # Tips/Timer Example # This one does it sequentially <<timer|300>>=<<everyone>>::<<list|TipList>> # This version will pick a random tip <<timer|300>>=<<everyone>>::<<list|Burn|rand>> # Here are your tips <<list|TipList>>=This tip comes first. <<list|TipList>>=You see this tip 5 minutes (300 seconds) later. <<list|TipList>>=This one comes 5 minutes after the one above! # This timer makes the server use the backup command every 10 minutes! <<timer|600>>=<<command-console>>::backup ############## # Commands/Aliases example # Will announce whenever someone /tps to someone. <<everyone>>=<<everyone>>:oncommand|/tp:<<triggerer>> tp'd to <<param1>>! # Map multiple commands to one! # /suitup <target> # Gives the target player a full suit of iron armor and then teleports you to the target. gods=<<command-triggerer>>:oncommand|/suitup:give <<param1>> ironchestplate 1$ @give <<param1>> ironpants 1$ @give <<param1>> ironboots 1$ @give <<param1>> ironhelmet 1$ @tp <<param1>> ############## #Death Related stuff # Will announce the weakness of a god when he or she dies. god=<<everyone>>:ondeath:Even a god like <<triggerer>> can die... # Will randomly select something in the list "Burn" whenever someone burns to death. <<everyone>>=<<everyone>>:ondeath|fire:<<list|Burn|rand>> <<list|Burn>>=Let it burn! Just like <<triggerer>>. <<list|Burn>>=Would you like your <<triggerer>> medium or well done?
This code used to work for me in past rtriggers but seems to have broke... not sure what version broke it:
me=
<<player|<<param1>>
>>,<<command-recipient>>
:oncommand|/urun|override:<<param2+>>
me=<<player|<<param1>>
>>,<<say-recipient>>
:oncommand|/usay|override:<<param2+>>
The command works when I replace
<<param1>>
with a playername.. basically it looks like it no longer accepts <<>> within <<>> options?I am looking for some help with an rTriggers script.
The goal is to have rTriggers act like a lottery every hour:
/give [randomOnlinePlayer] [blockid] 1
Where [randomOnlinePlayer] is any player currently logged into the game.
Where [blockid] is a defined block like a sponge
These commands would be setup in a list with a timmer something like this:
<<timer|3600>>
=<<everyone>>
::<<list|Lottery|rand>>
<<list|Lottery>>
=<<command-console>>
:$@give [randomOnlinePlayer] bone 1$
@broadcast [sameRandomOnlinePlayer] Just won the Lottery and recieved 1 bone!
<<list|Lottery>>
=<<command-console>>
:$@give [randomOnlinePlayer] feather 1$
@broadcast [sameRandomOnlinePlayer] Just won the Lottery and recieved 1 feather!
<<list|Lottery>>
=<<command-console>>
:$@give [randomOnlinePlayer] bed 1$
@broadcast [sameRandomOnlinePlayer] Just won the Lottery and recieved 1 bed!
The trouble I am having is injecting a random online player.
Can someone please help me?!?!
This already has a ton of features, but i woud really like to see a
<<time|0-23|0-59>>
trigger, if its possible. :Pbest. Plugin. ever.
I want to limit a player from using a command, /repair, from being used more then once per 60 seconds. I tried using the |limit|seconds|pertrigger option but I had no luck. can someone make an example one to help me out please?
Thanks,
AhellHound
I am using this plugin mainly for a countdown on command purpose. I am using the timer so when i say a command it repeats a message every 5 seconds. It works fine, but it doesn't stop. Is there anyway to stop a trigger on command?
@Reilaos
Hi, i did a full server restart and all is working well. I'm used to just reloading, sorry about the confusion! Thanks so much for patching it.
Theres no need to paste my entire properties file now, but, I did notice one last hiccup. My login messages currently say:
<<everyone>>
=<<triggerer>>
:onlogin,delay|2:&bWelcome to &3VillageCraft&b, &6<<triggerer-displayname>>
&b!<<everyone>>
=<<triggerer>>
:onlogin,delay|5:&bFor server help and information, type: &3/help<<everyone>>
=<<triggerer>>
:onlogin,delay|15:&2 NEWS:$ ...The first message displays soon after you sign in, and then there is a clear empty space, and then after a few seconds the second message comes as expected. The minor hiccup is that empty space. No biggie though, just aesthetically looks a bit odd. Let me know if there's something I'm doing wrong or if thats just the way it's gotta be.
Thanks again, appreciate your work.
@Ako17
Hrm; works for me when I just copy-paste what you just posted. Downloaded straight from the dev.bukkit to make sure I didn't upload the wrong one, too. Can you pastebin your entire properties file?
@Reilaos
Recently I wrote this code to find why login messages weren't working properly:
<<everyone>>
=<<triggerer>>
:onlogin|override,delay|2:LogTest1<<everyone>>
=<<triggerer>>
:onlogin,delay|2:LogTest2<<everyone>>
=<<triggerer>>
:onlogin|override:LogTest3<<everyone>>
=<<triggerer>>
:onlogin:LogTest4I told you that 3 and 4 work, so that the delay was seemingly the problem. You said "Found the problem, fixed it. Uploading issue now. Thanks for the details!"
So I want to update you. Now, with the same code still intact, and with rTriggers 2.5.4, none of those 4 test messages show up when I log in. On another note, now when others log in, the server now announces to all that they have logged in with the default message "[name] joined the game", which was mysteriously not showing up before (the fact that THIS message is back is a good thing I think). That none of my login test messages show up now is some weird behaviour, and sure doesn't seem fixed yet :(
@TeamBuckIt
Nvm, i got it. Just gave that group the permissions to execute it, then protect so they cant do that command in worldguard area's, works great :D this plugin is so beast, exactly what i needed! Thanks :D
Plz can someone help me to make a maco?
@Liger_XT5
I think I've fixed this. I'm not sure how WorldGuard does its command filtering, so that might be harder to fix up. :s
The recent update broke the timers. Using the example above:
<<timer|300>>
=<<everyone>>
::<<list|TipList>>
shows<<list|TipList>>
Every 5 mins. No other messages in the lists.@Reilaos thanks alot, it works now, but now i have the problem that that player does NOT have acces to the command i want to execute. But i dont want to give them permissions to do it whenever they want... help plz :P
@Reilaos
They use one command to bring up a list of chat color schemes to choose from.
The choose which one they want by typing in the command next to the example.
I think we're getting mixed up on two subjects at the moment.
The only commands that players shouldn't have access to are commands blocked through worldguard regions.
Example: I have a mob arena. Warps, tp, home, and spawn is blocked. But, if someone were to use a command such as /mcden, which in rtriggers is set to run /warp mcden, they can use that warp. I've added /mcden to the list of unusable commands in that region, yet they are still able to use the commands. It's as if rtriggers has a much higher priority over worldguard's blacklist.
@Ako17
A while ago, I stopped integrating that; rTriggers instead checks to see if you have JavaInetLocator (found here) located in your server's lib/ folder (I think it was the lib folder?). You put the .jar in there (titled exactly InetAddressLocator.jar).
That, and it sometimes just doesn't work; it was incredibly hit-or-miss on if it could figure out where you were from, and it made rTriggers.jar like, 4-6 times larger than it would be without it, so I figured I'd have it as an optional thing.
@Reilaos
Thank you!! Appreciate it, and glad I could help. Love this plugin by the way, keep rockin!
PS: A long time ago I tried the triggerer-country command for login messages, but it didn't seem to work. I was just wondering how I make that work, or if it does perhaps work now? (I haven't tested it yet, my apologies if it does indeed work now).
@Liger_XT5
So they use a macro to see a list of macros, and use that macro to use a command they shouldn't be able to?
@Ako17
Found the problem, fixed it. Uploading issue now. Thanks for the details!
@TeamBuckIt You want
<<command-recipient>>
instead of<<command-console>>
, methinks. The former makes recipient perform a command. The latter makes the server console use the message like a command.@PatricB I think you want something like:
<<everyone>>
=<<command-console>>
:oncommand|/gm|override,delay|60:commandgoeshereYou'll want to update to 2.5.3, because I fix delays in that version.
@Reilaos
I wrote some test code to see what the problem was:
<<everyone>>
=<<triggerer>>
:onlogin|override,delay|2:LogTest1<<everyone>>
=<<triggerer>>
:onlogin,delay|2:LogTest2<<everyone>>
=<<triggerer>>
:onlogin|override:LogTest3<<everyone>>
=<<triggerer>>
:onlogin:LogTest4LogTest 3 and 4 showed up, 1 and 2 did not. So the delay is breaking it. I need the delay though. But that should help you if you were to try and fix it.
Hey guys, i have a lil problem, hope you guys can help me. Okay, so here is what i want.
There is a group President, if someone dies from that group, a command should execute a command for the people in the group Vice-President.
I've tried making
<<console-command>>
and VicePresident both a recipient, but that doesnt work :/ can someone help me? here is my latest attempt:President=VicePresident,
<<command-console>>
:ondeath:pex user<<recipient>>
group set President