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
@brchat222
well this is a wheel of prizes ATM, however i could extend it so you could use it as a punishment / reward random generator i guess :o
maybe you can /spin [name] or /doom [name] ?
i would need more input on what punishment you would like :)
Thanks, - Idiot
going to add this to my server
brcfreebuild.mine.bz
you should add a wheel of doom that bad players are forced to spin by admins and crreate a wheel of prizes to reward players for being good.
added log file and server wide broadcast on rare win !
v 1.3
enjoy :).
Thanks, - Idiot
@Dennild
Okay, i have an idea.
i could make a list of like 40 definible items and ammounts in the config and have everything else be sand?
and also include rares?
How does that sound?
Thanks, - Idiot
@midnightfang22
@Dennild
Ahh i see! he wants to say what you can win, well atm i'm just using everything :/ and i'm doing this via a random number... it would be difficult to implement this but i will give it a try :)
Thanks,
- Idiot
@idiotonastic
Most likely make the list of possible items in a config, but that is probably different from how you are currently using the plugin.
@Dennild
i'm sorry i don't quite get what you mean, please explain further :).
why not let us choose what items we want to be rolled for ourself?
@midnightfang22
economy feature added in v 1.0
@Rodolffo
Thanks :) but i had a friend explain it to me :)
You should read this: http://wiki.bukkit.org/Configuration_API_Reference
@midnightfang22 "Also, I personally like "You have won a block of air!" as a better message :)."
me too!
and let me put it this way... the times when you don't win anything are when the item ID doesn't = an item. its actually me sneakingly using an error to my advantage so its hard to predict and add a message too :(.
I have hooked into vault ATM and am trying to make the config file work... that i'm getting nowhere with :(. if i can get it to read the Economy: true form the config then were sailing but i just keep getting a NullPointerException :(
Thanks for the interest tho :)
Thanks, - Idiotonastic
@idiotonastic
It would require hooking into vault, but I don't know anything about java yet so I can't help you with it. Starting to learn coding but I'm doing python as my first one since its the simplest to learn. For the "You won nothing" part you want to add, just add in a few of the possibilities for a prize to send that message instead of sending an item? Also, I personally like "You have won a block of air!" as a better message :).
@midnightfang22
okay but that will involve hooking into vault or something?
haven't quite got how to hook in yet but i will work on it :)
Thanks, - Idiotonastic
Maybe add an optional economy feature so that it costs money to use it. Some people might want it and some won't, but its nice to have an option.