Lottery
Lottery
News
- Appears to still work on 1.4.6 & 1.5.2 & 1.6.4 & 1.7.1 & 1.8.3 & 1.9 no reported bugs.
Shortcuts
FAQ
Q: How do I set the amount of money the jackpot should start with?
A: You need to set extraInPot to whatever amount you want it to start with, and then do clearExtraInPot: false
Q: The jackpot is winning too much, I don't want it to win.
A: Then you need to change the numberOfTickets to something else, or just set it to 0 (jackpot will never win then).
Features
- Users can buy one or more tickets and have the chance to win money in the pot (total tickets bought * price * net payout variable / 100 )
- Configurable price, material (including money/coins), hours between lottery drawings and other configurations.
- Supports iConomy v4, iConomy v5, iConomy v6, BOSEconomy v6, BOSEconomy v7, Essentials Eco, MultiCurrency and Vault.
- Permission nodes using superPerms
- Custom welcome message
Permissions
These are the superPerm nodes you can use to tweak the default permissions.
- lottery.buy : Gives you all the basic rights /lottery (buy, help, winners).
- Given to all players by default, so you need to remove from the users/groups you don't want to have.
- lottery.admin.draw : Gives the group/user access to the /lottery draw command.
- Given to OP's by default.
- lottery.admin.addtopot : Gives the group/user access to the /lottery addtopot command
- Given to OP's by default.
- lottery.admin.editconfig : Grant access to edit/reload the lottery config ingame
- Given to OP's by default.
Commands
- /lottery : Basic information
- /lottery buy <number> : Buy one or <number> of tickets.
- /lottery help : Help pages
- /lottery winners : List over 10 last winners
- /lottery draw : Force the drawing to happen. Op only if not permission plugin.
- /lottery addtopot : Adds extra money/items to the pot. Op only if not permission plugin.
- /lottery config <cost/hours/max/maxTicketsEachUser/reload> : Change/reload the config ingame.
Configuration
In the configuration that is made when the plugin is run the first time, you don't get comments about the different options. Here you do!
Click here to check out the explanation to the configuration :)
Tutorial
PS: The /lottery claim command is used when you are using material and you win, since blocks/items can only be given to online players
Great plugin!
Maybe you could implement a feature that allows you put on a sign, for example.
[LOTTERY]
Buy
1 Ticket
That would be rather awesome.
@khobbits
When a player is given the 'lottery.buy' permission, they cannot type /lottery as they do not have permissions.
Thanks for keeping this bad boy updated, we love this plugin.
Epics
@UnitedFactions
Nope, i'm trying to keep this lottery simple, i think there's a lottery+ plugin which tries to do a lot more.
@khobbits
Ever thought of adding a second lottery?
@Baffu
Haven't had any problems with it, this plugin doesn't use any fancy features which need constantly updating.
Does this run with 1.2.3?
The latest I see is:
R: v0.8.1 for CB 1.1-R7 Mar 09, 2012
Can you add please the messages properties for translate?>
@Jenssss91
Not the problem, I entered 50.
@khobbits I had this on previous versions too, I keep updating, no change.
@RicardoForce
Update.
@RicardoForce
java.lang.NumberFormatException: For input string: "50,00" at
maybe you wrote in your configfile "50,00" but you have to write "50"
@khobbits
Here's the lottery log with errors after changing the useiConomy to true and cost to 50.
2012-03-14 07:44:56 [INFO] [Lottery] Enabling Lottery v0.8.0 2012-03-14 07:44:56 [SEVERE] Error occurred while enabling Lottery v0.8.0 (Is it up to date?) java.lang.NumberFormatException: For input string: "50,00" at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at net.erbros.lottery.Etc.formatAmount(Unknown Source) at net.erbros.lottery.LotteryConfig.loadConfig(Unknown Source) at net.erbros.lottery.Lottery.onEnable(Unknown Source) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:336) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:363) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:250) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:232) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:374) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:361) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:187) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
@RicardoForce
I'm more interested in the load order than errors, whatever your issue is, I cant replicate it without further info. The plugin itself works fine, the issue must be dealing with some dependency.
Hey there, I've been looking for a while for a specific type of lottery plugin, but nothing I come across quite works the way I want it to. I was wondering if anyone here is familiar with creating plugins and how hard/easy it would be to create my type or if there are currently any that I overlooked with my specifications.
Basically, I want my lottery not to be an "always win" type of lottery. I want a plugin that creates a kind of superlotto where players purchase tickets which adds to the jackpot. Every ticket gives a set % chance to win but do not stack (ie 1 ticket = 1% chance... 100 tickets each done individually at 1% each, NOT a 100% chance win). Also the ability to have tickets pulled at random so players don't have higher chances of winning, and having several prizes as an option (ie 1st winner wins jackpot, second wins [item/money], thrid wins etc.). And lastly, having a sign set as a ticket purchasing point would be a nice finisher.
SO, is there any plugin currently similar to this? I have been searching for quite a while, but to no avail.
When I set the 'useiConomy:' to true, that's where it bugs me out. When it's set to false it works fine. I do have iConomy, latest version and Vault. No errors on the log
@ThaSourceGaming
This plugin is compatible with Essentials Eco with or without Vault.
~ KHobbits Lead Developer of Essentials & Lottery
Make this compatible with Vault please :) I use Essentials Currency
@RicardoForce
It should most the time, although pex only half supports bukkits permission api, it uses a nasty hack which sometimes causes issues.
Use this website: http://pastie.org Go to your server log, and copy and paste the server startup log of the last restart, through to you actually using the command.
This error is most commonly caused by a plugin dependency not loading properly, for example pex being configured so that pex crashes on start. But it could be something else, since your sure that isn't an issue.
@khobbits
Does this work with PEX?
@RicardoForce
This plugin works with any decent superperms implementation, running any decent version of bukkit. If your having issues, check your startup log for errors, or fix your permissions.
@Baffu Yep
working with 1.2.3?