CustomRTD
Custom RTD
This plugin was designed for personal use after I could not find a Roll the dice plugin that satisfied my requirements. The point of this plugin is to flexibly fill the niche of a simple RTD plugin for anyone who could not find one before. This plugin allows users to generate a random number up to a defined max, and display that number to those in a definable radius.
Installation
Installation is very simple with this plugin, but the steps are below
1. Download the latest version of CustomRTD.jar
2. Drag the CustomRTD.jar file into the plugins folder of your bukkit server
3. Boot your server up and allow the config file to generate
4. Edit the config file to your liking and reload the plugins.
Updating
Updating from previous version shouldn't be too much of a hassle but there may be some issues that are encountered
1. When new config nodes are added, you may need to generate a new config or add them manually.
Commands
Below is the list of commands available in the newest version.
/roll
Description: Generates a random number from 1 to the Max defined in the config and sends it to everyone in the configurable radius.
/roll (number)
Description: Generates a random number from 1 to the number passed in the command and sends it to everyone in the configurable radius.
Config File Nodes
Below is a list of all the nodes in the config file in the newest version.
MaxRoll
Description: Sets the max number that a user can roll when using the /roll command.
Radius
Description: Sets the range that another people will see a player's roll. (set to 0 to do a broadcast)
RollLimit
Description: Max number a user can choose with /roll (number) without having the CustomRTD.Unlimited permission node
Cooldown
Description: Time, in seconds, between users being allowed to roll unless they have the CustomRTD.NoCooldown permission node
NoPermissionsMessage
Description: Message sent to the user when certain commands are used without proper permissions
RollMessage
Description: Message sent to all users within the defined radius, displaying the results of a /roll
CooldownMessage
Description: Message sent to users who attempt to /roll before defined cooldown has expired
UseSelfReference
Description: Node that determines whether or not the SelfReference node is used, or just the user's display name
SelfReference
Description: Name used in the message sent to the user who rolled.
Permissions
Below is a list of the permissions available in the newest version.
CustomRTD.Roll
Description: Gives user the ability to use the /roll command.
Default: true
CustomRTD.ChooseMax
Description: Allows the user to do /roll (number) to provide a definable max to what the user could roll.
Default: op
CustomRTD.SeeAllRolls
Description: Allows administrators to see all rolls performed on the server if they'd like.
Default: op
CustomRTD.Unlimited
Description: Allows user to override RollLimit in config file.
Default: op
CustomRTD.NoCooldown
Description: Allows user to override cooldown timer.
Default: op
CustomRTD.*
Description: Gives the user all above permissions.
Guides
This area is for helping to clarify or assist in the understanding of certain, harder to understand aspects of the plugin that one may encounter
Roll Message
This is the configurable message that is sent to players who in range during a /roll command. When using this there are three special variables that can be used in the message.
%p desplays the name of the player who rolled when placed in the message.
%n displays the number rolled by that player.
%m displays the max possible number the player could've rolled with the command used.
Cooldown Message
This is the configurable message that is sent to a player when they attempt to /roll within the cooldown time limit predefined in the configuration file. When using this there are two special variables that can be used in the message.
%p displays the name of the player who attempted to roll.
%t displays the amount of time, in seconds, before the cooldown expires.
Improvements
I'm sure that this plugin could surely be improved in many ways. If you can think of any you would like, comment them below for me to see. Maybe it'll be simple and I'll add it in, or a worthwhile addition even if it takes some time.
Bug reporting is also important to the improvement of any plugin. If you post your issues below, then I'll do what I can to help you.
Change Log
V.1.3.1
- Added SelfReference Config Node
- Added UseSelfReference Config Node
V.1.3
- Fixed Harmless, but irritating error message when performing a /roll (number) above the limit without permission
- Added Cooldown Node in config
- Added CooldownMessage Node in config
- Added CustomRTD.NoCooldown permission node
V.1.2
- Added ability to configure message prefix
- Added ability to configure roll message
- Added RollLimit node to config file
- Added CustomRTD.Unlimited Permission node
- Fixed silly error in Plugin.yml involving permissions with /roll
V.1.1
- First Public Release!
- Added Config file
- MaxRoll Node added
- Radius Node Added
- Added /roll (number)
- Added permission Nodes
- CustomRTD.Roll
- CustomRTD.ChooseMax
- CustomRTD.SeeAllRolls
- Prefixed all plugin messages
I took care of preventing commands from the console, so that should be good. However, it wasn't enough to even warrent releasing it yet, so unless someone else comes along and requests a feature that I can do, I will probably just release that small change in coincidence with any other things that may need to be done to ensure compatibility with the next version of minecraft and its stable bukkit build whenever that happens.
I thought I took care of that, but I suppose I could've done it wrong, I'll look at it again for next version's bug fixes
@ThePsyDragon
Thanks a lot~ >.<~
well, maybe you should prevent commands like "roll" using at console. ;)
Alright, I've made a couple small changes.
V.1.3.1
- Added SelfReference Config Node
- Added UseSelfReference Config Node
Hopefully this version gets approved nice and quick
Ok, I think I'm understanding now. You would either like to be able to change the personal message for translation purposes or send the same message in both cases.
I can do that.
I think I'll make the changes and try to re-upload V.1.3 with these changes. If it's still not receiving approval after that, then I'll try something else such as dropbox.
@ThePsyDragon
- .-|||....well... when roll the dice, two messages come, one broadcast, the other notifies you. I want to see broadcast only... I need change "You" to other language...
And... what about to upload new plugin to dropbox in advance? :)
Disabling the message that notifies you of what you roll? I don't know what the point of having you roll at all is then XD. I'm sure you know what you're trying to do though.
Displaying the message to the person who rolled is hardcoded right now, I suppose I could try and add a permission node or something for being able to see your own roll. The message itself is configurable in the config.yml but the playername is always displayed to the player as "You". You could not have the message identify the roller at all by removing the "%p" from the message but then no one could tell who rolled. If you're willing to give an example of what you'd like I could see if I have any suggestions or something I could change in the code.
I don't know why the new version is taking so long to upload. It says it still is awaiting approval. Oh well, patience is a virtue.
oh, I just need Cooldown node! wait for new version~ :)
BTW, how to disable message "You rolled xx (out of xx)" to yourself? and... how to change "You" to other words?
Uploading a new version as I post this message. Updated at the request of UrNowKoed with the sole purpose of adding cooldowns.
V.1.3
- Fixed Harmless, but irritating error message when performing a /roll (number) above the limit without permission
- Added Cooldown Node in config
- Added CooldownMessage Node in config
- Added CustomRTD.NoCooldown permission node
Again, this is along the lines of something more complicated that I think has been done by other plugins. The purpose of this plugin is mostly for role play rolling or dungeon style loot splitting. Naturally if it fits elsewhere that's cool, but that's mainly what this is for.
I can take a look at it, but I would look around and see if there are other plugins if I were you.
Do you think that instead of rolling "numbers" they roll effects?
"[CustomRTD] Steve rolled Blindness!"
"[CustomRTD] Steve rolled Speed!"
"[CustomRTD] Steve rolled Jump Boost!"
First of all, I'm glad you like my plugin, I appreciate it. As for your first post, I think there are other plugins that do the betting pretty well if I remember right, but they may not fit your needs. I'll keep it in mind, but I know it'll be a bit more difficult as I don't have a ton of experiance with the bukkit API, and no experiance with any economy plugins. As far as the cooldown, this is definately a managable request. I'd probably do a cooldown if I do anything. Next time I do any additions that will probably be the first thing I take care of after bug fixes.
Oh and one more suggestion, would it be possible to add a "Max rolls per minute", or a "roll cooldown" option to the config?
Great plugin, just what I was looking for. Do you think you could add (or possibly make this a separate plugin) a gambling system?
Example: Player 1 uses /roll bet (bet amount) (playername) (max roll). This would send a request to the specified player, saying that Player 1 wants to bet against them with the max roll being whatever number was specified, and to use the "/roll accept (even or odd)" command to accept the offer. Then (if accepted), it would "roll the dice", and show both players what number was rolled and who won, then would deduct the bet amount from the loser and pay it to the winner.
So if Player 1 does /roll bet 1000 UrNowKoed 100, it would send me a message saying something along the lines of: "Player 1 wants to bet $1000 against you! Use /roll accept (even or odd) to accept the bet! Max roll is 100." Then if I accept, it goes through with the bet.
I know its a lot to ask for, and I probably didn't explain it too well...but if you ever get bored, maybe its something you can think about doing :)
Once again, thanks for the great plugin!
Just have to update the page and wait for the new version to receive approval.
@ThePsyDragon
Alright awesome :D
Finished with the changes you requested!
V.1.2
- Added ability to configure message prefix
- Added ability to configure roll message
- Added RollLimit node to config file
- Added CustomRTD.Unlimited Permission node
- Fixed silly error in Plugin.yml involving permissions with /roll
As in, you can change what it says before commands?
ThePsyDragon: /roll
[CustomRTD] Thepsydragon rolled a 74 (out of 100)
You want to be able to change the [CustomRTD] and the whole message?
Edit: I'm going to assume this is what you would like and see if I can do that, but I can't even look into it for another couple hours. Once I do, it should be a relatively simple addition.
Could you possibly make the Prefix and messages configurable?
Thank you so very much for this ! :D