Bonus Items
How to add Bonus Items for an Item
This is a new feature as of v1.3.0 of the Poké Mart Plugin. It allows you to setup Bonus Items for multiple Items.
Bonus Items apply to all stores for the same Item.
A Bonus Item is only given if the bought Item is found in the BonusItems
Setting.
Example 1
This is the basic structure where you give the amount required to get the bonus item given.
:POKEBALL => { }
= the Item's ID that can give bonus Items followed by a Hash.:amount => 10
= for each 10 bought Poke Balls, you'll get a Bonus Item.:item => :PREMIERBALL
= The Bonus Item's ID.
So to conclusion: For each 10 bought Poke Balls, you'll be given 1 Premier Ball.
Only for Item Balls, if the bought Item is a Great Ball or any kind of Ball Item, this bonus Item will be applied unless you added a specific Bonus Item for that Ball Item.
Example 2
This is an expansion on the structure from example 1 where you can give an array of multiple items along with (optional) a specific chance for this item to be chosen as the given bonus item.
:GREATBALL => { }
= the item's ID that can give bonus Items followed by a Hash.:amount => 10
= for each 10 bought Great Balls, you'll get a Bonus Item.:item => [ ]
= an array containing items.[:GREATBALL, 20]
= an array containing the following::GREATBALL
= the Bonus Item's ID.20
= the chance this Bonus Item is given. (optional).
:PREMIERBALL
= the Bonus Item's ID. (There's no chance given so the remaining chance is 80%)
So to conclusion: For each 10 bought Great Balls, you'll be given either a Great Ball (20% chance) or a Premier Ball (80% chance).
For the Bonus Items that don't have a chance, the remaining chance will be devided among them.
Example 3
This is the most complex structure and is used if you want to give more than 1 of the bonus item for the required amount of the bought item. You can also give a chance like in example 2.
:ULTRABALL => { }
= the item's ID that can give the bonus items followed by a Hash.:amount => 5
= For each 5 bough Ultra Balls, you'll get a Bonus Item.:item => { }
= A hash containing items.:PREMIERBALL => { }
= The Bonus Item's ID followed by a hash.:amount => 3
= The amount of this Bonus Item you get for each 5 Ultra Balls.
:MASTERBALL => { }
= The Bonus Item's ID followed by a hash.:chance => 0.1
= The chance (0.1%) this Bonus Item is given.
:ULTRABALL => { }
= The Bonus Item's ID followed by a hash.:amount => 2
= The amount of this Bonus Item you get for each 5 Ultra balls.:chance => 5
= The chance (5%) this Bonus Item is given.
If you are using this structure then either :amount or :chance must be given for each Bonus Item, if you don't give any of these then you should use the structure of Example 2 instead.
Last updated