Settings and Setup file

The different customization options this plugin offers.


Settings

Below are the links to each of the customizable features available in this plugin:


Setup

To add settings in a Vending Machine script call is very similar to how it's done in the Poké Market plugin.

  • You no longer need to worry about the order of arguments (except for the item list, which should always come first).
  • Here's how you'd define a Vending Machine event:
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
])
9
end

Each optional argument is explained below and in more detail on its corresponding Settings page.


speech: "string"

This lets you assign a specific Vending Machine Class to the event.

1
speech: "ProVend"
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend")
9
end

➡️See Vending Machine Class for more info.


type: "string"

This defines the "type" of items you can buy from the Vending Machine rather than make it say "What item do you want to buy", it could say "What drink do you want to buy" if you're only selling dinkable items.

1
type: "drink"
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink")
9
end

discount: number

Use this to apply a discount by refering a Game Variable ID:

1
discount: 26
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26)
9
end

currency: "string"

Set which currency the Vending Machine should use. Valid default values:

  • "money" or "gold"
  • "coins"
  • "bp" or "battle points"

1
currency: "battle points"
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26, currency: "battle points")
9
end

bonusChance: number

Set the chance the player has to receive a bonus item when buying 1 or more items from the Vending Machine. The higher the number, the higher the chance of getting a bonus item.

1
bonusChance: 20
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26, currency: "battle points", bonusChance: 20)
9
end

stuckChance: number

Set the chance the player has of an item getting stuck when buying 1 or more items from the Vending Machine. Not providing this setting will disable items getting stuck completely.

1
stuckChance: 5
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26, currency: "battle points", bonusChance: 20, stuckChance: 5)
9
end

kickChance: number

Set the chance the player's kick will be successful upon items getting stuck in the Vending Machine. This setting is only used if a stuckChance was given as well, otherwise this setting has no effect.

1
kickChance: 80
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26, currency: "battle points", bonusChance: 20, stuckChance: 5, kickChance: 80)
9
end

multiBuy: { min: number, max: number }

Set the minimum and maximum amount of a same item the player can buy at once. By default this would be 1 at a time when not providing this setting at all. When not providing a minimum, the default is 1. Whene not providing a maximum, the amount will be the minumum.

1
multiBuy: { min: 1, max: 15 }
1
def someVendingMachine
2
advancedVendingMachine([
3
:POKEBALL, :GREATBALL,
4
:POTION, :SUPERPOTION, :HYPERPOTION,
5
:REPEL, :SUPERREPEL,
6
:REVIVE,
7
:ANTIDOTE, :PARALYZEHEAL,
8
], speech: "ProVend", type: "drink", discount: 26, currency: "battle points", bonusChance: 20, stuckChance: 5, kickChance: 80, multiBuy: { min: 1, max: 15})
9
end