Roulette
This is a very simple plugin that allows anyone to use the /roulette command to place a diamond bet and spin the wheel at a chance to win back triple their diamonds! There is only one command: /roulette <selected # between 1-75> <# of diamonds to bet>. An example would be /roulette 35 5 if you want to pick 35 as your number and bet 5 diamonds.
To be more specific, when a player types /roulette with the correct parameters, the plugin will check to see if they have the correct amount of diamonds in their inventory as well as check to ensure they picked a valid number between 1 and 75. Not adhering to these parameters causes an error message to show. If the parameters are correct, the plugin will choose a random number between 1 and 75. If the number matches the one the player chose, their original diamond bet is tripled and added back into their inventory. If they lose because their number does not match the randomly selected one, they lose the diamonds that they had bet.
This is intended as sort of a 'oh neat' plugin on the side for more socially oriented and less hard survival related servers. Eventually, I hope to add the ability to bet on Odds/Evens and tweak the payoff amounts.
I am making this public domain and releasing the full source because this is nothing amazing and it would be interesting to see if someone adds other things such as Odds/Evens, Red/Black and Permissions or iConomy support. Feel free to use, edit or claim as your own! I used this as a very good learning experiment!
Enjoy! :)
Comments