- Pokémon Essentials Version
- v20.1 ➖
Are you tired of scrolling through a huge event page for your Vending Machines?
Then I got the solution just for you!
The script has been tested in Base Essentials V20.1
How to use
I'll explain each input for the script 1 by 1 below:
I'll show a few examples
Example 1
With the explanation from above, this should be the script you put into the event page:
Example 2
If you don't want a discount but want the multyBuy option enabled:
Example 3
If you only want a discount:
Example 4
If you neither want a discount and neither the multyBuy option:
Installation
Also please give credits when you use this script, thank you :)
Then I got the solution just for you!
The script has been tested in Base Essentials V20.1
How to use
I'll explain each input for the script 1 by 1 below:
Script Input:
pbAdvancedVendingMachine(name, boughtVar, wonVar, [items], discount, multyBuy, minBuy, maxBuy)
- name (required): example: "Snacks" - This is the name of the kind of items the player can buy at the Vending Machine. This can be anything for example: Snacks, Drinks, PokeBalls, Potions, Items...
- boughtVar (required): example: 39 - The ID of the game variable you want to use to store the amount of the wanted items bought by the player (you can have a variable for every vending machine or items if you wish so)
- wonVar (required): example: 40 - The ID of the game variable you want to use to store the amount of the wanted items won by the player (same as var1, you can have a variable for every vending machine or kind of items if you wish so)
- items (required): example: [:PEWTERCRUNCHIES, :RAGECANDYBAR, :LAVACOOKIE] - This is just like how you would do it for the mart script, a list of all the items you want to show up in the buy list (important all items need to be in all caps and start with ":"!).
- discount (optional): example: 20 - If wished you can have the items to be a little cheaper than other vending machines. This number is in percentage.
- multyBuy (optional): example: true - Enables or disables the ability to buy multiple of the same item at once ("true" is on, "false" is off).
- minBuy (optional): example: 1 - The minimum items the player can buy of the selected kind.
- maxBuy (optional): example: 10 - The maximum items the player can buy of the selected kind at once.
I'll show a few examples
Example 1
With the explanation from above, this should be the script you put into the event page:
Example Event Script:
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 20, true, 1, 10)
Example 2
If you don't want a discount but want the multyBuy option enabled:
Example Event Script:
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 0, true, 1, 10)
Example 3
If you only want a discount:
Example Event Script:
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 20)
Example 4
If you neither want a discount and neither the multyBuy option:
Example Event Script:
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE])
Installation
- Extract the zip file using any extractor tool
- Copy the content inside the "Plugins" folder into your game's Plugins folder.
- Optional: copy the file inside Audio/SE to the Audio/SE folder if you want the Vending Machine Sound effect.
Also please give credits when you use this script, thank you :)
- Credits
- FL (helped with improving some code)
- MelonSpeedRuns (helped with the multyBuy part)
- Arcky