- Supported Minecraft Versions
With this skript, players will be able to buy a ticket and join the lottery. After a specified amount of time (You can configure it in-game with a GUI) the lottery will draw a random winner between those who bought a ticket and will give them the prize (in-game money). The winning will be the sum of all the prices of the tickets sold. Every player can get 1 ticket per draw. You can easily setup the plugin with an ingame menu.
The plugin will automatically start lotteries one after the other, with a settable cooldown. During the cooldown players will be able to buy tickets.
A economy plugin combatible with skript (EssentialsEco)
lottery.manage - Players with this permission will be able to access to setup GUI.
To access the gui use /lottery
- Click the second item (golden ingot) to buy a ticket for the lottery.
- With the third item (redstone) you can see the winner of the last draw.
- The diamond will show the current amount of the prize. The winning is the sum of the price of every ticket sold.
-The nametag shows credits the author of the plugin (me). You can disable it in the setup GUI.
-The red wool block is shown only to players who have the permission "lottery.manage". Use it to access to the setup GUI.
- The nametag allows you to set the prefix of every chat message from the skript. For example:
"[prefixyouwant] Notch has won the lottery!"
- With the golden ingot you can set the price for each ticket. Default is 50$.
- With the first wool you will be able to enable or disable lottery alerts! When this option is on, the lottery will send a reminder to every player!
The alert shows at mid time between two draws. (Sorry for my english lel, let me give you an example).
If you set the timer between draws to 20 seconds, the alert will be shown when the timer has got to its half. So if you set the timer to 1 hour, alert will show when it reaches 30 minutes. The half. Default: OFF
- With the second wool you can enable / disable the credit nametag in the lottery menu. Default: ON
With the third wool you can enable or disable the skript. Default: ON
If you disable the lottery, the timer will be paused and players will still be able to open the gui, but not to buy tickets (They would waste money).
- With the barrier you can get back to the lottery menu.
- Now using rhe barrier in the setup GUI to get back to the /lottery GUI works properly.
- Current Skript version is shown in the credit section. Players with permission lottery.manage will always see the credit option, even if disabled for normal players.
Thank you for the attention, Dere
If you have any problem ask in the discussion of this skript!
When, at the moment of drawing, no players are in the lottery, the draw will be cancelled and it will start the cooldown for the next one. (To avoid plugin flood / bad looking messages with <none>)
This is one of my firsts plugins, so if it has any problem don't bother asking me for support.
Thanks yall for the attention, DereWah
Uh, and please leave a rating (stars) to let me know how you find the skript!
As said, for any issues use the discussion related to this resource