• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Advanced Vending Machine

v20.1 Advanced Vending Machine v1.1

This resource pertains to version 20.1 of Pokémon Essentials.
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:
Script Input:
Expand Collapse Copy
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.
important: if you don't want a discount but you want to use the multyBuy, just set discount to 0, if you don't it'll throw an error!

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:
Expand Collapse Copy
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 20, true, 1, 10)
Advanced Vending Machine Example 1.png


Example 2
If you don't want a discount but want the multyBuy option enabled:
Example Event Script:
Expand Collapse Copy
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 0, true, 1, 10)
Advanced Vending Machine Example 2.png


Example 3
If you only want a discount:
Example Event Script:
Expand Collapse Copy
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE], 20)
Advanced Vending Machine Example 3.png


Example 4
If you neither want a discount and neither the multyBuy option:
Example Event Script:
Expand Collapse Copy
pbAdvancedVendingMachine("snack",39, 40,[
:PEWTERCRUNCHIES,
:RAGECANDYBAR,
:LAVACOOKIE])
Advanced Vending Machine Example 4.png

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.
If you have any suggestions for things to add or any issues you faced while using the script, please let me know. Contact me either here or on Discord: Arcky#1021

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
Author
Arcky
Downloads
555
Views
2,823
First release
Last update

Ratings

5.00 star(s) 2 ratings

More resources from Arcky

Latest updates

  1. Compatible with v19.1 now too :D

    I just changed a few lines that were changed in v20.1, installation method is the same (or you...

Latest reviews

I couldn't get it to work by just following the installation instructions, but pasting the contents of Advanced Vending Machine.rb in the script above main got it working just fine. Otherwise, I've had no issues :>
Arcky
Arcky
Ah good to hear
much more stable than the original, ganna thank for the dudes who make this kind of plugins
Arcky
Arcky
zeta approved
Back
Top