McLottery

Failsafes are going to be things that will check to make sure that what is in the config file is supported. If not, the plugin wont run.

What this plugin does: It chooses a number 1-(Predetermined number). The players have the chance to guess (at the cost of a diamond) and the cost is added to a prize pool. If they get it wrong, they are told if their number was too low or too high. If they get it right, they win the Prize Pool and a new number is generated.

FUTURE UPDATES:

  1. Console Support
  2. Configuration
  3. IN GAME SET UP SUPPORT (will be added after config update)
  4. Support for more than just diamonds (In case the user wants to give Iron or Gold)
  5. Possible support for money rather than diamonds (iConomy)
  6. Other types of Lottery (?)
  7. Suggestions

This Plugin will create a game that is this dialogue but in plugin form. -"I'm thinking of a number 1-10,000" -"Is it 4035?" -"No, The number is higher"

If the player gets the guess wrong, a diamond will be taken from his inventory and added to a Prize Pool. When someone gets it right, they get the contents of the prize pool and the number will randomize once again.

This is basically the functionality of the code already made.

When the plugin is enabled, it will create a random integer between 1 and 10,000. Then, the message, "The McLottery number has been changed.".

The commands are as follows: /McLottery or /mcl is the "hub" command that will display basic information, including the size of the Prize Pool, the available numbers (1-10,000), the cost of guessing (1 diamond per guess), and how to play a game (command).

The next command is /McLGuess (number guess) or /McLG (Number guess). This is where the magic happens in the plugin. First, the plugin makes sure you formatted the command right by making sure they had 1 argument. Then, it will check if the person has a diamond in his/her inv to gamble. If they don't, a message will be sent to them. if they do, it will then check to make sure the number given is in the limit (1 - 10,000). If not, it will send a message. Then it will check to see if it is the correct number. If it is, then they win the prize pool and the number uses a random number function to restart. If they didn't, it will say that they lost and whether the number given was larger or smaller than the winning number.

Finally, the last command is only available to Ops. /McLGetNumber will return the winning number.

I intend for this plugin to add a fun way to use logic, collaborate with friends, and a lucky chance to get rich on a server. Also, I intend for this plugin to have a very easy installation process so many people can use it.

I hope this was enough, thank you for reading :).


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    40115
  • Created
    May 27, 2012
  • Last Released File
    Jun 17, 2012
  • Total Downloads
    2,575
  • License

Categories

Members

Recent Files

Bukkit