### Reward Parameters

RewardParameters is main setting that will allow you to configure rewards.

## Basic RewardParameters line

Every RewardParameters consists of one or multiple lines. Line is most basic part, created from one or more items.

### Single item

Simplest Reward parameters is this:

`264 10`

Above will give winner 10 diamonds after he wins (264 is the ID of diamond item. You can get IDs here).

### Random quantity

Next option is to add random quantity, which will make reward more dynamic:

`264 1-20`

Above will give winner random amount of diamonds between 1 and 20.

### Multiple items

Why giving only one item? Let's give more of them

`264 1,266 1-3`

Above will give winner 1 diamond and between 1 and 3 gold ingots. Note that there is NO space after comma.

### Relative Reward

What about making reward dynamic and based on how much score did player achieved? Use relative reward. That will use player's score instead of absolute values to calculate rewards You can do this by adding capital R before amount of item.

`264 R10`

Above example will give player 10x more diamonds than his score. So if he scored 10 points, he will get 100 diamonds.

`20 R0.5-1.2`

Above will give player between 0.5x to 1.2x glass than his score. So if he scores 20 points, he will get between 10 and 24 glass. Be careful with lines like this. If player does not score high enough, he may not get single item.

## Multiple RewardParameters lines

You may define multiple RewardParameter lines and separate them by semicolon (;).

`264 10;13 64;26 1-5`

Above example will give winner 10 diamonds or 64 gravel or between 1 and 5 beds. All lines in this example have equal chance of being selected. Note that there is no space after semicolon.

### Percentage

By default all lines will have equal chance of being selected. But what if you want, let's say rare reward and common reward? No problem. Add percentages to your lines. This is achieved by entering colon (:) and percentage at the beginning of the line.

`:10 264 10;:90 3 64`

Above example will have 10% chance to reward 10 diamonds and 90% chance to reward 64 dirt blocks. Sum of all percentages must be exactly 100. Otherwise you will get errors. You may also combine percentage and non-percentage lines:

`:50 264 1;57 1;56 1`

In above example, there is 50% chance to reward 1 diamond, 25% chance to reward 1 diamond block and 25% chance to get diamond ore. This works that way: maximum percentage is 100 and diamonds already "stole" 50. That means there is 50% left for non-percentage rewards. And since all non-percentage rewards are equal, each one will get equal share. There is 50% left and there are 2 equal rewards. So 50 / 2 = 25.

## Special items

### Economy

Yes, you may use iConomy or any other economy system money for the reward. How? Simply enter item id 0.

`0 8,264 1`

Above example will give winner 8 money and 1 diamond.

You need Register plugin for economy rewards.

### Item Data

Many items in minecraft carry special data. For example wool in minecraft is only one block, but it carries special data that determines it's color. Reference for those data is available here. Data can be added by adding colon (:) to the item id and then number for special data.

`35:12 1,44:3 1`

Above example will give winner 1 brown wool (item id for wool is 35 and data number for brown color is 12) and 1 cobblestone slab (slab block id is 44 and data number for cobblestone one is 3).

## Example

Tutorial above was modular. For the sake of simplicity and understanding, each item was presented separately, without other elements involved. But you can mix many above elements to get some awesome reward combinations. Only imagination is your limit.

`:90 13 1-64,2 1-12;:5 39 1-5,40 1-5;:4 52 R0.1-0.2;:1 18 10``

Above example will have 90% chance to give winner between 1 and 64 gravel and between 1-12 dirt, 5% to give between 1-5 brown mushrooms and between 1 and 5 red mushrooms, 4% to give 10 times less mob spawners than player scores and finally 1% chance to give player 10 leaf blocks. Complicated, right? Don't worry, you will probably understand your creations :)

## Comments