BBLottery
BBLottery
BBLottery is a lottery - nothing more, nothing less. It features multiple tickets for the lottery, some stats about the lottery, configuration of the intervall a ticketnumber is drawn, the initial pot, the ticketrange,price and tax and how many tickets may be bought.
Configuration
intervall: The time between drawings in minutes
pot: The inital jackpot, every time someone wins, it gets reset to this amount
range: The ticket-range, the higher this number, the less likey it is that the lottery is won (each ticket has a chance of 1/range to win)
maxTickets: How many tickets a player may buy per round
ticketPrice: How much a ticket costs
tax: Tax on the tickets, so not the full price gets added to the jackpot
If you set the range to -1, the tickets will be given out in order, so first one to buy a ticket gets #1, second #2 and so on, and the winnig ticket will be taken from the bought tickets
Commands
- /lottery - Shows the help
- /lottery buy [ticketnumber] - buys a ticket with the given number, if no number is given, buys a random Ticket
- /lottery give <player> [ticketnumber] - like /lottery buy, but buys ticket for another player (target has to be online)
- /lottery info- current jackpot, tickets the player has bought and how much money a player would get if he won with a ticket
- /lottery stats - shows some stats about the lottery
Some admin-comands:
- /lottery reload - reloads the config
- /lottery draw [-f]- forces the lottery to draw a ticketnumber and start the next round, if -f is set it also reloads the lottery.yml
Permissions
- bblottery.buy - You can buy a ticket
- bblottery.buy.multi - You can buy up to <maxTickets> tickets
- bblottery.buy.other - You can buy a ticket for someone else
- bblottery.draw - You can force the next round
- bblottery.reload - You can reload the config
TODO
Fix Resetting Tickets-bug- Draw at specific time
- Suggestions!
Requires Vault and an economy-plugin
If you want to thank me, a little donation on Paypal is appreciated:
It does not work!!!11
If you encounter any problems with BBLottery give me as much info as you have, so that I can help you to the best I can. You got an error? go to the Server-Log and look for the error-message/stacktrace. Version of the plugin and Bukkit you are using would also be nice. Got no error-message? Then tell me what you were doing/typing. If I don't know what happend I can't fix it.
what's the differents with version1.2 and 1.2.1? My server is 1.4.7-R1.1, I want to konw the "Fixed Bug where Tickets would not get saved properly" is a serious problem?
Yup, I set that while starting on my own schedule, forgot to mention that, sorry^^ If you want to you can use this with commandScheduler until I am done, next Version will also include anouncements
the "intervall" should be disabled when it be set as 0
@Xcelsior1991
I want to draw once a day at a specific time (like 21h00, IRL time).
I think intervall will be messed up on plugins reload, server crash, tps lag etc..
Also I would like it to announce that the drawing is coming, the jackpot, and the time left some minutes before the drawing.
(I really like your plugin because it allows players to choose a number instead of just buying a random ticket :) )
@the_merciless
a bit of information please. Which version did you use (plugin as well as bukkit)? While fixing the bug and updating it to 1.5.1 I encountered a similar problem, but after some more fixing I got rid of it. On 1.4.7 it was working fine (apart from the ticket-bug, which i fixed). And what do you mean they return false? Do you get an error? A stacktrace would be nice then. Or do you get the usage? then I would ask you to tell me what you did, so I can help you/fix the problem. I mean, come on, you are a dev yourself, you know that I can't do shit with a message like that -.-'
all commands return false!
Ok, I fixed the bug with the tickets (just waiting for bukkit to approve version 1.2.1) and I started to work at the drawing at a specific time...
sooo @angeplay, what were you imagining format-wise, would you like to draw it once a day at 12:00 Realtime, or would you like to do it on multiple times a day? or were you thinking of something completely different?
@Xcelsior1991
Thanks, and if you can't, just allow to disable autodrawing so I can use command scheduler ;)
@angeplay
I will see what I can do, maybe in the next version after I get the current bug fixed...
Is it possible to draw at a specific time instead of interval?
@Atlas_Minecraft
Ok, so the easy things first: whenever there is a "[lottery] null" you found a bug with the localization-import, could be that there are some lines missing (forgot to add some kind of default-message...), so to get rid of the null-thing compare your localization-file with the Localizations-page and add missing lines.
And about the reloag-thing: that seems to be a new bug with the saving of tickets, it seems like as soon as you logout, the tickets you bought get semi-reset(you still have the tickets, but it loses the count of bought tickets, so you can have more than the preconfigured maxtickets and the 'old' tickets do not show up with /lottery info), but the total count of tickets stays, so when you give out tickets again, they get the next ticket in line...this is a major bug, but i will not get to fix this until wednesday, so please use version 1.1 until then...
I just saw the new version and I downloaded it. It's awesome! except I may have found a bug. I have the range set to -1 so the tickets are given out in order. When I run the console command "lottery give player1" then player1 is given ticket #1. That is working correctly, however, if I run that command again, instead of player1 getting ticket #2 it just says "[Lottery]null" in the console. But if player1 reconnects (by logging off then logging back on), then the command can be run and player1 will get ticket #2. So basically a specific player can't be given 2 tickets in a row unless he reconnects to the server.
I love the plugin, keep up the good work!
@huntershenep
Is there a erormessage or stacktrace in the log? with just that I can't do much about it...And about the jackpot not getting reset-issue... I will look into it, I did not notice it while testing
Your 1.2 update seems to be crashing my server. (DiamCraft)
Howcome the Jackpot doesn't get reset after someone has won it?
@Atlas_Minecraft
Ok, I am done. So as soon as the new version gets its 'approval-stamp' from Bukkit you can download it. I am going to update the infos now
@Xcelsior1991
No problem, whenever you can do it is fine. Thanks
@Atlas_Minecraft
Not yet, it still is not working properly and I am in the mid of my exams, so I do not know when I will get to it, I am sorry that it takes so long.
Is the new version uploaded somewhere?
@Xcelsior1991
Awesome!! Thanks so much