Configuration
config: # Set this option to true if your using # ANY supported economy system useiConomy: false # Cost per ticket cost: 5 # If you aren't using an economy system, # which item is used for currency material: 266 # How long between draws hours: 2 # Should we publically broadcast # when someone buys a ticket? broadcastBuying: true # At how many seconds remaining # should we append time till draw. broadcastBuyingTime: 120 # Should we show lottery status on player join? welcomeMessage: true # Should we clear 'extra' amount each draw clearExtraInPot: true # What percentage of ticket sales is the winner awarded netPayout: 100 # How many tickets can each player buy? maxTicketsEachUser: 1 # Use this option to enable fixed ticket mode. # Setting this will cause rollovers. numberOfTicketsAvailable: 0 buyingExtend: # Should the next draw timer be extended # if someone buys a ticket close to the draw? enabled: true # How many seconds remaining count as close to the draw secondsRemaining: 30 # The minimum amount to extend by extendBase: 15 # What multiplier should be used when extending by tickets. # Set to 0 to just use base. # Extend by: base + (multiplier * sqrt(ticketNumber)) extendMultiplier: 1.5 nextexec: 0 extraInPot: 0 jackpot: 0 debug: false message: welcome: '&6[LOTTERY] &fDraw in: &c%drawLong%'
Extra notes:
- useiConomy: If you want to use iConomy or another money plugin supported by Register, set this to "true". If you want to choose your own material (block or item), set it to false.
- cost: Cost is the amount the buyer got to pay to buy a ticket. This applies both to iConomy coins and material. Only whole numbers. Negative numbers will probably work, but I don't see the point.
- material: The material setting lets you choose which Material Value your users got to pay with, and get if they win. It is the item decimal value and can be found on the minecraft wikipedia (data values). Defaults to gold.
- hours: How many hours between every lottery drawing? Can be set to decimals or above 24.
- netPayout: is the percentage of the total pot that is being paid out to the winner. This can be as high as you wish, but not lower than 1 (one). 100 = 100%, which means the winner will get exactly as much as the players have paid in while buying tickets.
- numberOfTicketsAvailable: is the total number of tickets available. If this is set to anything but 0, then there is a chance the pot will go on to a jackpot.
- buyingExtend allows for the lottery to be slightly (or not so slightly) extended when someone buys a ticket. This is to allow people to properly buy tickets near the end of the lottery. Most important when the maxTicketsEachUser is set above 1.
Custom messages
At the current time, the only supported custom message is the welcome message.
The different variables you can use in the string:
- %draw% - Will produce a short time until draw message like this: 3d 15h 55m 40s
- %drawLong% - Same as above, only a long message: 3 days, 15 hours, 55 minutes and 40 seconds
- %player% - Gives back the player displayname (so if a plugin changes a name, that name will be used), like: Erbros
- %cost% - The cost of a lottery ticket. PS: Only a integer, so no coins or gold. Like this: 10
- %pot& - Amount of money in the pot. Only integer, no name. Like this: 900
- %newline% - Will cut your message and print the next part on a new line.
So if you want your lottery welcome message to display over three lines. Lets start with the first one.
welcome: '&6[LOTTERY]'
Now our welcome message will say [LOTTERY] in gold colors. Lets add some more to the message saying Hi Player in green color.
welcome: '&6[LOTTERY] &2 Hi %player%'
Now lets keep this, but add a new line saying [LOTTERY] in gold, but also how long until draw.
welcome: '&6[LOTTERY] &2 Hi %player%%newline%&6[LOTTERY] &fTime until draw: &4%draw%'
The finished message will now be like this:
[LOTTERY] Hi Erbros
[LOTTERY] Time until draw: 1d 15h 22m 55s
Useful colour reference: http://ess.khhq.net/mc/
Hey is there anyway this could be linked into a sign shop so players can right click a sign to buy a ticket? nice plugin too
Hi, it would be great if it is possible to edit alle messages. Could you add it? best regards Phib
idk why buy every time i buy a lot or any of my players does and when i draw it, it says No winner and teh money goes to jackpot. and sometimes when i test it, i was the only one who brought it and when i draw it, its still says No winner.? help?
config: cost: 30 hours: 4 nextexec: 1329114585769 material: 266 useiConomy: true broadcastBuying: true welcomeMessage: true extraInPot: 0 clearExtraInPot: false netPayout: 100 maxTicketsEachUser: 15 numberOfTicketsAvailable: 100 jackpot: 2700 debug: false lastwinner: Jackpot lastwinneramount: 2700 message: welcome: '&6[LOTTERY] &fDraw in: &c%drawLong%'
@iTzVien
I have the same, it gives no errors or something. And when the time is to draw the lottery it says no winners and puts the money spent to the lottery in the next pot.
if someone won the lottery only the ops see who won. how can i change it so that every one see who won?
Could you insert a language file? I would like to translate this plugin for my users.
Thanks :)
Just added all the missing messages to the config file in the latest dev build (available from the build server linked on the main page)
Where can you set the money to go? MYSQL or?