Lottery - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html) +---- Forum: Archived Plugins (https://forum.cuberite.org/forum-18.html) +---- Thread: Lottery (/thread-18.html) |
Lottery - Tim - 02-26-2011 Fairly simple lottery type script, just thought I'd post it to encourage other people to publish their scripts however complicated or simple, also to help people that are just starting out. Basically the syntax for the command is /lottery [number1] [number2] [number3] when you execute the command it generates 3 random numbers and compares each one to your number in the same order if you get what i mean? For each number you get right, you get a cake! Anyway, heres the plugin code so you can see it for yourself, just copy and paste it in to a new lua file in your plugins folder Code: local LotteryPlugin = {} Good luck and i hope you win many cakes RE: Lottery - NinjaSiren - 09-29-2013 Hello, this is a nice plugin, but I wonder if I could change the item being won? than cake, ie: iron, or diamond. or if ever better if he/she got a number the player will get item depending on how many numbers he/she got correctly and giving random item that corresponds also on how many numbers the player were correct. RE: Lottery - xoft - 09-29-2013 This script will most probably not work in current MCServer versions, it uses the old plugin architecture no longer supported. To change the won item, search the text for 92 and replace it with E_ITEM_DIAMOND, E_ITEM_IRON or whatever item you want the players to win. |