Your First Reward File (v2.0.0+) - English
Your First Reward File (v2.0.0+) - English
Prerequisites
Before started you must know what you want !
So first you must define if this reward file is for a POWER's level up or a SKILL's level up.
After that you must define if this reward file is for a specific level reached or everytime the level reached is multiple of a specific level.
First example
I decide to do a reward file when a player reached the POWER level 200.
I want to give him some foods if he has the permissions "players.food'
- so the reward file will be in the folder plugins/BoomcMMoReward/POWER.
- i don't want an everytime reward file so it will be on the ONE subfolder.
- and its name will be 200.yml.
- i'll have a condition part (must have permission "players.food')
- and on the rewards part i'll give him some food
So i create this new reward file :
plugins/BoomcMMoReward/POWER/ONE/200.yml
Inside this file i start with the initial node 'all:':
all:
I decide to name this scenario 'Foods for all':
all: Foods for all:
Conditions part
I have a permission condition so i add a conditions part:
all: Foods for all: conditions:
.. and i add the permission checking:
all: Foods for all: conditions: perm: - +players.food
Rewards part
I have obviously a rewards part too ...:
all: Foods for all: conditions: perm: - +players.food rewards:
... because i want to give him some foods:
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3'
'297:3' means 3 x the 297 item which is BREAD.
'350:3' means 3 x the 350 item which is COOKED FISH.
Second example
Now i want to do the same reward but if the player has the permission "vip.food" he gains more food.
So i edit the already exists reward file :
plugins/BoomcMMoReward/POWER/ONE/200.yml
I decide to name this scenario 'Foods for VIP':
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3' Foods for VIP:
Conditions part
I have a permission condition so i add a conditions part:
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3' Foods for VIP: conditions:
.. and i add the permission checking:
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3' Foods for VIP: conditions: perm: - +vip.food
Rewards part
I have obviously a rewards part too ...:
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3' Foods for VIP: conditions: perm: - +vip.food rewards:
... because i want to give him some foods:
all: Foods for all: conditions: perm: - +players.food rewards: item: - '297:3' - '350:3' Foods for VIP: conditions: perm: - +vip.food rewards: item: - '297:6' - '350:6'
'297:3' means 6 x the 297 item which is BREAD.
'350:3' means 6 x the 350 item which is COOKED FISH.
BE CAREFUL !!
You must understand that in this reward file a player who has both permissions "players.food" and "vip.food" will gain 3+6 BREAD and 3+6 COOKED FISH.
To avoid that we add a new permission checking : he can't have "players.food" if he has "vip.food" for those scenarii:
all: Foods for all: conditions: perm: - +players.food - -vip.food rewards: item: - '297:3' - '350:3' Foods for VIP: conditions: perm: - +vip.food - -players.food rewards: item: - '297:6' - '350:6'
Comments