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?
@Liger_XT5
not|
<<player|blah>>
won't actually work in the triggerers section, because I hadn't coded it to, yet. They were marked "(Recipient only, except for hasperm)" because the logistics of filtering triggerers was a bit weird compared to recipients, and I hadn't gotten any requests to do the other not| filters. But now I have!I probably could do it. As a stopgap (again, sorry), you might be able to use not|
<<hasperm|blah>>
to filter out the people you need to filterit might actually be more flexible to do that, if you for example switch up your management a bit in the futureVault support could be doable, too. Permissions standins are pretty old, and Vault looks like it's been around long enough to think it'll stay around for longer, too.
Having an odd issue with the "not|
<<xyz>>
" feature. I'm making a set of code for when someone joins or leaves the server, a console command is ran. Similar to setting up a welcome/leave message for when someone joins or leaves the server. In my case, as I stated I'm making a console command being run. To add onto this, certain groups are ignored, such as admins.As I'm running groupmanager, I have to have each group have it's on permission to use hasperm, as rtriggers does not detect groups in groupmanager.
May I suggest coding rtriggers to use Vault? Would help cut down a ton of code as Vault is used as a middle man for permission and economy plugins.
I've simplified as far down as a could go and I still trigger the onlogin and ondisconnect to run the command.
As I stated before, I attempted listing only the permission groups before staff, I still pull the trigger. I've checked the inheritance, I'm not inheriting the permission group perms I made for each group.
Double posting to say, I found my cause. I'm an idiot. Over looked a few NewsReports lines.
Ignore the following QUOTE section. I overlooked something very simple. I still had some old NewReports hiding in my config further down than I had looked. Commented them out and no errors what so ever.
What caused it? Going from a normal rtrigger stating something in chat to the user, to running a console command with no actual commands.
[qoute]
Found a small bug with rtriggers relating to tellraw.
It works beautifully with no issues when ran by the console, such as:
However, if it's in a timed list, such as:
Occasionally an error appears in the console.
http://pastebin.com/rzyARGiB
I have attempted running each /tellraw on their own via an rtrigger command, no errors.
When I first saw it, I was curious as to what line of my timed messages it was.
So I setup a randomlist with a command. After a run of the command, or a few times until you get no response, the console has an interesting error.
http://pastebin.com/6JhFbLaP
[/quote]
@Finelarme2
Got a reply from the author. Here is what you need:
"Needs InetAddressLocator.jar in serverfolderhere/lib. Sometimes it doesn't work. A lot of times, really."
http://javainetlocator.sourceforge.net/
Quoting from my post:
"I checked above and I recall somewhere stating a separate plugin needed for Twitter and IP/Country features, which is not stated now."
In other words, last I knew, the country variable required a separate plugin to work, which used to be stated in the information above. I'll see if I can contact the author and see what he suggests.
Please remember, rtirggers's variables do not on other plugins, just in rtriggers's rtriggers.properties (aka it's config). Adding in the code into the config will run that line of code when they log in. It may appear before or after other plugin's motd. If you want it after, just use the delay option with a 1 for the delay number.
Thanks a lot dude, but can't show the country, i did somehting bad ? No more code to add ? I don't understand.
@Finelarme2 @Author11
The trigger variables only work in rtriggers, not other plugins. If you want a MOTD that states their country, I suggest making an OnLogin line (or more depending on what you want). I'm not certain what you plan to use the variable for, but here is an example you can use in rtrigger's config:
This message will appear to 'everyone' when the player ('triggerer") joins. It will state the player's (triggerer's) name followed by their country.
I don't use the country or IP variables. I checked above and I recall somewhere stating a separate plugin needed for Twitter and IP/Country features, which is not stated now.
Thanks for this plugin. Seems very usefull. With a lot of possibility ect.
But how just add the country of the person ?
Trigger
<<triggerer-country>>
doesn't work on motd Essential..Option of adding something like this?
<<everyone>>
=<<player|<<param1>>
>>:oncommand|/loves|override:&cI love you!$ @&3-Your secret admirerI am curious if there will be an update for 1.7. I know a lot has changed not sure how much for rtriggers, but im sure a touch up of the code would be a good idea. Is there a dev build server somewhere that people can download dev / experimental versions?
this has since been fixed with spigot
with the latest spigot 1.7 builds that are out, im getting this upon loading spigot, not sure if related, and rtriggers seems to be working:
[14:19:59] [Server thread/WARN]: Dec 01, 2013 2:19:59 PM com.avaje.ebeaninternal.server.lib.sql.DataSourcePool initialise INFO: DataSourcePool [rTriggers] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
@Liger_XT5
yes I know how to do it that way, but actual tab completion would be nice.
@austindkelly
Open chat, start typing part of their name, hit your TabKey.
Hit Home Key. Start typing command.
Hit End Key. Finish command.
Enter.
Would it be possible to get tab completion on nicknames? I use rtriggers to setup new players but of course i have to type complex IGNs and that sometimes causes a typo.
@Author11
Same for me.
<sub>
<<everyone>>
=<<everyone>>
:onlogin|override:&e<<triggerer>>
&rhas&ajoined&r &7From<<triggerer-country>>
</sub>Although I described in this way, the name of a country was not displayed.
Is this description method a mistake?
Using factions is there a way that I can make this automatically make a created faction an enemy. or run a command from a offline player.
Add Sub commands?
@TheKaiPol Yes, example :
<<everyone>>
=<<command-triggerer>>
:onlogin,delay|10:listThe player execute command /list 10 seconds after login.