You want to give some money for users who reach the mcMMO level 250 ?
Or you want this user to be granted to a new group ?
Or just give them some items or greetings message ?
Giving some items enchanted or not ?
Giving some items with damage value or not ?
Give their 1 chance to 10 to win a bonus items or 1 chance sur 100 ?
...
...Yes it's possible...
Perhaps just adding one permission to this users is enough ?
Or there isn't enough and you want to launch some admin console commands after that ?
...Yes it would be possible..
The basic idea
Power is the global level of a user in mcMMO. It is the addition of all the skills. One skill is an ability.
The idea is to make a system based on tree folders.
No more needs to reload or restart the server to take effects of some new rewards.
There are 2 main folders on it's plugin folder :
- POWER
- SKILLS
Inside SKILLS every available skills of mcMMO have its subfolder.
In every SKILLS subfolder and in POWER folder there will be another 2 folders :
- ONE - means when the level is reached
- EVERY - everytime the level is mutliple of
How it works
The plugin act on the levelUp mcMMO event.
When a player level up a skill he level up his global level.
The plugin do:
- a search on POWER/ONE folder if there is a reward file for the reached global level
- a search on POWER/EVERY folder if there is a reward file multiple of the reached global level
- a search on SKILLS/skill/ONE folder if there is a reward file for this skill level itself
- a search on SKILLS/skill/EVERY folder if there is a reward file multiple of this skill level itself
If the plugin find a reward file it deals with it.
Let's see some examples
Depends
This plugin for the moment depends on Vault and of course mcMMO.
Installation
Put the .jar on your plugins folder.
On first start it create the folder's structure .
No needs to restart the server, just make your reward yaml file and put them where they must be.
Configuration
The level
To define the level when the reward must be done simply create a yaml file named with the level to reach.
- rewards for global level 100
create the file POWER/ONE/100.yml
- rewards for mining level 100
create the file SKILLS/MINING/ONE/100.yml
- rewards for global level multiple of 5
create the file POWER/EVERY/5.yml
- rewards for mining level multiple of 250
create the file SKILLS/MINING/EVERY/250.yml
The conditions
If you want to have conditions the player needs to fulfill before reward you can add a conditions section.
This conditions is optional and is inside the yaml file.
If one condition is not fulfill the rewards part is not treated.
You can check condition regarding :
- how much money the player has
- if he is or he isn't on a specific group
- if the level of a specific skill is less than or more than
- if he is on a specific world
- if he has or not some specific permissions
More infos on the conditions page
The rewards
The rewards yaml part is where you put the rewards gained by the player.
You can actually reward the player with:
- new perms to add or remove
- new group to join or leave
- a bonus money (send by a specific player or not)
- messages (private message, broadcast messages or for you log messages) colorized or not
- some items enchanted or not with or without damage
- a lotteryItems
- a luckyItem
- a lotteryMoney
- a lotteryKit
- for advanced users you can launch a console command
More infos on the rewards page
Commands
A console only command to toggle debug mode when server is started :
boomcmmorewarddebug
A console command to On/Off database storing of player's rewards:
boomcmmorewarddb
A console only command to retrieve history per player :
boomcmmorewarddbgetplayerName
Last Release
v1.1.5
Changes to adapt for new mcMMO packages structures
Tested on craftbukkit 1.4.7-R1.1-SNAPSHOT, mcMMO 1.4.00-dev2 and Vault-1.2.22.
Need help to setup your reward ?
Feel free to join me at #boo on esper.net.