WheelOfFortune
# This is my FIRST plugin
#
Please feel free to post what you would like to see in this plugin in the future in the comment section bellow
If you are running this on a server i would very much like to come and see how you have implemented it, please pm me your ip if you wouldn't mind :)
WHEN UPDATING PLEASE DELETE OLD CONFIG FILE
Desc:
the plugin allows users one chance a day a to spin a Wheel of Fortune that will give them random items, there is a 6/1000 chance that they will get a Rare reward, and an approximate chance of 1/100 that they will receive nothing. The rewards contain every block in game. except non-craftible blocks, these i have replaced with sand. (in-case you were wondering why you always get sand)
The rare rewards are as follows:
64 Diamond block, 64 Gold Block, 64 Iron Block, 64 Emeralds, 32 Beacon, 64 cake's.
[ I am open to constructive comments about he amount of items / items in the Rare list]
Commands:
/spin Spin the wheel.
/wofreload Reloads the plugin config.
/wof test if the plugin is there.
/reward [player] give the player another spin! if they have already spun today.
permissions:
- wheeloffortune.*:
- description: Players with this node have all wheeloffortune permissions.
- default: op
- wheeloffortune.reload:
- description: Players with this node can reload
- default: op
- wheeloffortune.canspin:
- description: Players with this node can spin
- default: true
- wheeloffortune.timeroverride:
- description: Players with this node can spin anytime
- default: op
- wheeloffortune.proceoverride:
- description: Players with this node can spin without incurring a charge.
- default: op
[WheelOfFortune 1.7.5 +]
- wheeloffortune.x2:
- description: Players with this node can spin twice
- default: op
- wheeloffortune.x4:
- description: Players with this node can spin four times
- default: op
- wheeloffortune.x8:
- description: Players with this node can spin eight times
- default: op
- wheeloffortune.x16:
- description: Players with this node can spin sixteen times
- default: op
Signs: [ WheelOfFortune 1.3.5+]
Type "[Spin]" on the first line of the sign.
The "[Spin]" will then turn purple.
You have created a spin sign!
Notes:
a the plugin currently stores player data on an ArrayList so the data is lost on server restart / reload. [Working on a fix/ Need help with file writing].
- Those of you updating to V 1.2 please delete your previous config file prior to installing the new version. Thanks.
ToDo:
add an Op timer override.extend this to a permission.
add Config Filemake Rare items define in configmake chance of Rare define in config
replace item Id's on player message to item names.fix occasional error during spin.add "You won nothing." message.add a broadcast when a player wins a rare.log player name, dateTime and prize.add optional cost for use.[Suggested by:midnightfang22]hook into vault.
add permission for more then one spin a day for like vip's and such.[Suggested by:paintball89]- add economy cash rewards.[Suggested by:Gametista]
Config:
Thanks,
- Idiotonastic
can you add permission for more then one spin a day for like vip's and such
wheeloffortune.vip.<Number>
@david204
@ke4zzy
@darkracer125
UPDATED
@darkracer125
@ke4zzy
@david204
Mojang have recently moved from Block ID's to eNums so i'mma have tore write a bit of this code...
Hopefully release it soon :)
same here it just gives an ingame error message
/spin Good Luck an internal error accured when trying to perform this command
@david204
SAME PROBLEM
Hello, I'm using the latest version of the plugin and gives me this error by putting the command /spin
2013-08-17 15:53:43 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'spin' in plugin WheelOfFortune v1.5.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189) at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:971) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846) at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.IllegalArgumentException: n must be positive at java.util.Random.nextInt(Unknown Source) at com.hotmail.idiotonastic.plugins.WheelOfFortune.Spin.doSpin(Spin.java:81) at com.hotmail.idiotonastic.plugins.WheelOfFortune.Spin.playerSpin(Spin.java:64) at com.hotmail.idiotonastic.plugins.WheelOfFortune.Commands.onCommand(Commands.java:24) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more
Do you have any solutions?
PD: Sorry my English, not speak or write very well xD
@idiotonastic
One request I have is the ability to set a special reward such as a console command being run instead of giving an item. And if possible, can you possibly implement a permission system where an item can be configured to require a permission in order to receive it?
With those 2 features listed above I could make a skill using Custom Professions where spinning gives you experience in Gambling and at higher levels you gain the ability to win better items and rewards.
Please consider them and congrats on first plugin :)
@stevensilvergood
Well i use This Plugin called Empire Command Signs and i add the command to it and when they click it... it they have to pay money to click it again...
therefore just get Empire Command Signs plugin
@idiotonastic
I have updated it to 1.6.2 :)
@UserDead
hi there, i haven't worked on this in a while, i'll see if i can update it to the latest release for you :)
Item rewards need to be configurable!
its not working no more on my server. gives a internal error if you try to /spin
ok i got a major issue every once in a while it decides to award me with air which instantly crashes the server because air is an unobtainable item please add a banned item list in the config so you can stop certain items from being won
@ACEJY
you should be able to do this in the config of 1.5, if not delete your previous config and restart the server.
@ACEJY
Working on this atm... taking some time :(
am i able to customize the items and the chance rate of the WOF?
@NetfreakF21
i have never experienced any of these issues running it on a multi-verse essentials economy server :o
please send me your config?
paste it into a paste bin.
Thanks,
- Idiot
Hi! , I am looking into putting this into the casinos on my server. I have installed it and spent many hours looking at the config, a little help please? :D
I have a multiverse server and use essentials for the economy, so I don't now if that has anything to do with it.
There are two problems.
1) It will not take out a payment to play, regardless of Economy true or false.
2) prizes won rarely appear in the inventory instantly, you have to change between worlds to have them appear.
Thanks in advance for your time.
@Dennild
implemented in 1.5!