NOTE: You would need EnchantmentBook plugin. (please make sure to have the latest EnchantmentBook for EBChance)
This plugin provides a utility function for EnchantmentBook. EnchantmentBook Chance Item (EBChance Item) can
increase
decrease
the chance of
success rate
destroy rate
on a EnchantmentBook.
Types of EBChance Items (dusts):
There are three types of EBChance Items:
INCREASE
DECREASE
MAGIC
If you have a MAGIC item, you can right-click it to turn it into either INCREASE or DECREASE items.
You can use "/ebchance give" command to issue one of these three EBChance Items.
How to use EBChance Item (dust):
To use INCREASE and DECREASE item, you just drag and drop it onto the EnchantmentBook item. It will increase or decrease the success/destroy rate accordingly.
To use MAGIC item, you simply right click AIR/Block while you're holding the MAGIC item. The Magic item will turn into either INCREASE or DECREASE item.
As a server owner, you can use "/ebchance give" command as a voting reward, mining reward, mystery crate rewards in order to issue different EBChance items.
Video:
Test server: testserver.vk2gpz.com
Commands:
/ebchance help : displays the help menu
/ebchance reload : reloads config file.
/ebchance give [name:name] [type:+|-|*] [apply:success|destroy] [[rate:rate] | [min:min_rate] [max:max_rate]] : gives an EBChance item. Type '+' will generate "INCREASE" item, '-' will generate "DECREASE" item and '*' will generate "MAGIC item. You can specify the value of chance using either
[rate:rate], or
[min:min_rate] [max:max_rate]
if min and max are specified, the value of chance will randomly selected between these two values
/ebchance convert: converts an EnchantmentBook into an EBChance MAGIC Item.
The chance value of the converted EBChance Item will be calculated as:
success_rate : success rate of the EnchantmentBook,
destroy_rate : destroy rate of the EnchantmentBook,
max = max(success_rate, destroy_rate),
min = min(success_rate, destroy_rate),
chance = (min + rand(max - min)) * Chance.Factor
>ebchance give %p name:&1Dust1 type:+ apply:success min:4 max:10
>ebchance give %p name:&1Dust2 type:+ apply:success min:4 max:10
>ebchance give %p name:&1Dust3 type:- apply:destroy min:1 max:5
>ebchance give %p name:&1Dust4 type:- apply:destroy min:2 max:5
>ebchance give %p name:&1Dust5 type:* min:2 max:5
>ebchance give %p name:&1Dust6 type:* min:2 max:7
Permissions:
ebchance.reload : allows you to use reload command
ebchance.give : allows you to use /ebchance give command
ebchance.convert : allows you to use /ebchance convert command
ebchance.use : allows you to use EBChance Item.
Installation: First, you need to install EnchantmentBook.jar into the plugins folder. Once you've installed EB, you can put EBChance.jar in the plugins folder.
Configuration: You can have full customisation in how EBChance item is displayed.
# This is a template config file # define your parameter and its value like: Messages: ErrorMsg : "&c[EBChance] : Some error occured." EBCGiven: "&e[EBChance] : You've given EBChance Item %name% to %type% the chance by %value%!" EBCApplied: "&e[EBChance] : You've applied %name% EBChance item to %type% the chance by %value%.!" NoPlayerFound: "&c[EBChance] : %player% is not found" NoPermission: "&c[EBChance] : You don't have a permission to use EBChance!" NoSuchEBChance: "&c[EBChancek] : The EBChance Item %type% is not found."
HelpMessages: banner: msg: "=== &e[&aEBChance Commands List (%version%)&e] &r===" help: msg: "&a/ebchance help : displays this help menu." reload: msg: "&a/ebchance reload : reloads config file." permission: "ebchance.reload" debug: msg: "&a/ebchance debug : turn on / off the debug mode." permission: "ebchance.debug" give: msg: "&a/ebchance give [name:name] [type:+|-|*] [apply:success|destroy] [min:min_rate] [max:max_rate]" permission: "ebchance.give" convert: msg: "&a/ebchance convert : converts the EnchantmentBook in your hand into a MAGIC EBChance item." permission: "ebchance.convert"
AppliedSound: ENTITY_PLAYER_LEVELUP # for pre 1.9 LEVEL_UP GivenSound: ENTITY_ARROW_HIT_PLAYER # for pre 1.9 SUCCESSFUL_HIT
Increase: Material: SUGAR Lore: "&aClick an EnchantmentBook with\n&athis item to increase \n&athe %apply% chance by %value%." Decrease: Material: SULPHUR Lore: "&aClick an EnchantmentBook with\n&athis item to decrease \n&athe %apply% chance by %value%." Magic: Material: FIREBALL Lore: "&aClick this item to get surprise dust."
FireWorkEffect: Color: GREEN Type: STAR Power: 0
# when Enchantment Book is converted into MAGIC dust # resulting chance for the MAGIC dust will be picked randomly between
# resulting rate = Random(rate on the book * ConvertFactor); # for instance, if EBook has success rate of 80%, the resulting chance for magic dust will be # Random(0.8 * 0.1) (random number between 1 - 8 %) Convert: Factor: 0.1 Sound: ENTITY_PLAYER_LEVELUP # for pre 1.9 LEVEL_UP