Simple Item Lottery 2
SimpleItemLottery2
Craftbukkit plugin. Lottery tickets to item prizes or cash prizes. Supports item meta.
Usage
- OPs define a prize list, then make lottery tickets, then give them to players.
- Players right click the tickets to randomly get a prize (item or cash) from the prize list of a prize class.
Feature
- Class of prizes and lottery tickets
- Relative probability
- Support items of anykind
- Optional econ (Vault) support
Commands
- /silot2 add <prize class> <probability> [money amount] - Hold an item on hand, and type the command to add it as prize into database. If money amount is given, cash prize will be added instead.
- /silot2 list [prize class default=1] [page default=1] - Views prize list.
- /silot2 make <prize class default=1> [ticket amount default=1] [player default=you] - Makes lottery tickets [and gives them to somebody].
- /silot2 delete (id 1, id 2, id 3...) - Deletes prize rows from database.
- /silot2 reload - Reloads the plugin.
Permissions
SILOT2.*:
description: Gives access to all SimpleItemLottery2 commands.
default: op
SILOT2.admin:
description: Gives access to all SimpleItemLottery2 administrative commands.
children:
SILOT2.reload: true
SILOT2.list: true
SILOT2.use: true
SILOT2.class.*: true
default: op
SILOT2.reload:
description: Reloads the plugin.
default: op
SILOT2.list:
description: Players with this permission can list all the prizes.
default: op
SILOT2.use:
description: Gives access to use lottery ticket.
default: true
SILOT2.class.*:
description: Gives access to use class X lottery ticket.
default: true
Examples
You are an OP.
Adding prizes
- Hold a diamond block in your hand, then type /silot2 add 1 20 to add 1 diamond block as a prize to database.
- Hold a iron block in your hand, then type /silot2 add 1 200 to add 1 iron block as a prize to database. Now, in prize class 1, diamond block and iron block have a relative probability of 20:200, which is 1:10 (9%:91%)
-
Hold a dirt block in your hand, then type /silot2 add 1 1000 to add 1 iron block as a prize to database. Now, in prize class 1, the blocks have a relative probability of 20:200:1000, which is 1:10:50 (1.6%:16.4%:82%)
-
Hold a super awesome sword in your hand, then type /silot2 add 2 5 to add it to class 2's prize list.
-
And don't forget to type /silot2 add 2 50 100000 to add $100000 as prize, making it more difficult to get your super awesome sword.
-
Got some even more rarer armors, and you want them to be prizes? Type /silot2 add 3 20 to add them to a even more higher class prize list!
-
There is a hard limit of classes and probability number of 2147483647 which is 2^31 - 1. You can change the soft limit in config.yml.
Making lottery tickets
-
Type /silot2 make 1 16 to make 16 * class 1 lottery tickets. You can consider selling them in regular shops, or give them to newcomers.
-
Type /silot2 make 2 to make a class 2 lottery tickets. Consider selling them in higher class shop or giving them out as event prizes!
-
Type /silot2 make 3 to make a class 3 lottery tickets. Consider letting them be one of the drops of a boss mob.
Deleting prizes
- You found the super awesome sword not appropriate in a class 2 prize list, let's delete it.
- You know that it's a class 2 prize, but you apparently don't know which row ID represents the sword.
- First, type /silot2 list 2 to locate what the sword's row ID is, then you type /silot2 delete <row ID> to delete it from the list.
You are a Player.
Using tickets
- You bought some tickets from an admin shop, or you just got them in an event. The only thing you have to do now is to use them.
- Trust me, it's very simple to use, you just right click on them and see what you got.
-
View User Profile
-
Send Message
Posted Feb 8, 2016Can you add support of changing the color of ticket lore? THX a lot :D / I also face the problem, it show the player who are not OP "You are not allowed to use lottery tickets of this class" The version is SILOT2-0.0.5a ,Vault version is Vault 1.2.31 ,server version is git-Spigot-1.7.2-R0.3-122-gb58e277, I also get the same problem in git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks I also try to use a whole new server file to install this plugin,it show me the same problem LOL 不管如何,都會顯示這個錯誤........... / update in 2016/02/12,After I install "PermissionsEx",I finally handle the permission problem,LOL. I think the problem is I didn't install any permission manage plugin. So now silot2 work fine with "Vault+PermissionEx" THX a lot for this great plugin :P,it give the player in my server more fun. /// LOL, I found new problem, everything is right,but sometimes when player use the ticket,server will show red word error and 1 ticket can get 2 prize (like a prize is 64 dirt,I will get 64 dirt+64 dirt) one error code: "[11:01:07] [Server thread/WARN]: [SimpleItemLottery2] Task #1577 for SimpleItemLottery2 v0.0.5a generated an exception java.lang.ArrayIndexOutOfBoundsException: -1 at net.minecraft.server.v1_7_R1.PlayerInventory.setItem(PlayerInventory.java:331) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventory.setItem(CraftInventory.java:82) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.wtako.SILOT2.Methods.Tickets$1.run(Tickets.java:33) [?:?] at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:614) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:562) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:469) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot-1.7.2-R0.4-SNAPSHOT.jar:git-Spigot-1.7.2-R0.3-122-gb58e277]"
-
View User Profile
-
Send Message
Posted Feb 11, 2015Are there only 3 classes? Is it possible to add more classes or is that the limit?
-
View User Profile
-
Send Message
Posted Feb 10, 2015One more thing: I am unable to add heads when obtained from the method from these websites: http://heads.freshcoal.com/maincollection.php http://www.planetminecraft.com/blog/create-snapshots-from-skulls/
-
View User Profile
-
Send Message
Posted Feb 10, 2015Hi, is it possible to rename a class? For example, I want a certain class to be seasonal, so I'd like to name it Christmas or something like that.
-
View User Profile
-
Send Message
Posted Aug 30, 2014Version 0.0.5 Uploaded on Aug 26, 2014, and it is still not approved. What?
-
View User Profile
-
Send Message
Posted Aug 16, 2014I'm finding major issues with this plugin on 1.7.9 (Probably because it is not up to date) where the tickets are duped or generally act weird when using a stack e.g. they double, half, delete...
It's a great plugin tho!
-
View User Profile
-
Send Message
Posted Jul 9, 2014is there anyway that you could make this plugin 1.6.4 compatable? i would be willing to return the favour in any way that i could.
-Mentosftw
-
View User Profile
-
Send Message
Posted Jul 1, 2014nvm, I decided to update 1.7.2
-
View User Profile
-
Send Message
Posted Jun 30, 2014Would you make a 1.6.4 compatible version plz????
I love this plugin so much. I think it just a problem that make a lottery to player.
Thank you for make this plugin and sorry about my English.
btw, I know you are HK people and so do I. :D
-
View User Profile
-
Send Message
Posted May 29, 2014@traipop
Well, I suppose it's not my problem because these two permissions are always true, meaning that you can use the tickets anytime unless you (mistakenly) revoked them in permission managing plugin.
-
View User Profile
-
Send Message
Posted May 28, 2014http://prntscr.com/3nf2qu
i have added perms and everything tried , i am using essentialsgroupmanager
-
View User Profile
-
Send Message
Posted May 17, 2014@Hunger1046633853
Didn't expect that.. lol
-
View User Profile
-
Send Message
Posted May 16, 2014mcpc+ update to forge1078,the plugin can be used. Thx author
-
View User Profile
-
Send Message
Posted May 15, 2014Thanks a lot !!!
-
View User Profile
-
Send Message
Posted May 12, 2014@guillotchi
Version 0.0.4 published and waiting for approval.
In case somebody wants that command badly, download the yet UNAPPROVED version here.
http://dev.bukkit.org/bukkit-plugins/simple-item-lottery-2/files/5-version-0-0-4/
-
View User Profile
-
Send Message
Posted May 12, 2014@guillotchi
I will work on that.
-
View User Profile
-
Send Message
Posted May 12, 2014Hi, is it possible to allow to create tickets directly in player's inventory, please? for example: /silot2 make <class> <quantity> <player>
-
View User Profile
-
Send Message
Posted May 11, 2014@z65703071
Well if he is called "Saren" then he is me.
-
View User Profile
-
Send Message
Posted May 11, 2014Amazing plugin! But it can't use in MCPC+
-
View User Profile
-
Send Message
Posted May 10, 2014I saw a member posted this plugin in a Hong Kong forum. isn't you right?