Rewards is very similar to Shops, but rewards don't have any price, and usually, it needs to be coordinated with the menu system.
Example for Daily Rewards
Create new shop config at /shops/
folder, then create new product like this:
Copy A :
price-mode : CLASSIC_ALL
product-mode : CLASSIC_ALL
products :
1 :
material : DIAMOND
amount : 16
2 :
material : IRON_INGOT
amount : 64
3 :
economy-plugin : Vault
amount : 1500
buy-prices :
1 :
economy-type : exp
amount : 0
placeholder : 'Free'
buy-limits :
default : '1'
buy-limits-reset-mode : 'TIMED'
buy-limits-reset-time : '00:00:00'
In this example, players can purchase this "product" once each day, and because the price is free, so we can consider it as "reward".
If you want to make VIP players have bonus 64x bread, then just use our conditions system, like this:
Copy A :
price-mode : CLASSIC_ALL
product-mode : CLASSIC_ALL
products :
1 :
material : DIAMOND
amount : 16
2 :
material : IRON_INGOT
amount : 64
3 :
economy-plugin : Vault
amount : 1500
4 :
material : BREAD
amount : 64
conditions :
- 'permission: group.vip'
buy-prices :
1 :
economy-type : exp
amount : 0
placeholder : 'Free'
buy-limits :
default : '1'
buy-limits-reset-mode : 'TIMED'
buy-limits-reset-time : '00:00:00'
If you also want to VIP players have 50% chance to get bonus 1x diamond sword, then we need create a new random placeholder at config.yml
:
Copy random :
chance :
reset-mode : ONCE
reset-time : '00:00:00'
elements :
- '1~100'
Then also use condition system:
Copy A :
price-mode : CLASSIC_ALL
product-mode : CLASSIC_ALL
products :
1 :
material : DIAMOND
amount : 16
2 :
material : IRON_INGOT
amount : 64
3 :
economy-plugin : Vault
amount : 1500
4 :
material : BREAD
amount : 64
conditions :
- 'permission: group.vip'
5 :
material : BREAD
amount : 64
conditions :
- 'permission: group.vip'
- 'placeholder: {random_chance};;>;;50' #
buy-prices :
1 :
economy-type : exp
amount : 0
placeholder : 'Free'
buy-limits :
default : '1'
buy-limits-reset-mode : 'TIMED'
buy-limits-reset-time : '00:00:00'
Example for Streak Rewards
Please download this example pack then carefully read Display Item Format , Shops and Conditions page to understand it.
How to use this resource?
Copy and drag the UltimateShop folder to your server's plugins folder. UltimateShop 1.7.7+ version is REQUIRED .
Where to change rewards?
Open UltimateShop/shops/streak.yml
, edit the buy-actions
.
Copy buy-actions :
- 'console_command: test-1'
# Please don't remove -1, the -1 is a conditional symbol which means this action will only run at first buy. -2 means second buy.
How to make streak be cycle?
Add below contents at buy-actions
option:
Copy - 'console_command: shop setbuytimes streak A %player_name% 0-31'
Replace A to B if you are trying add it at the second stread rewards.