HyperScript
Docs

← All of the Docs HyperEconomy

One money for scripts and plugins HyperEconomy

Guide and examples

Describe the currency in any script, as you would without this addon:

currency "coins":
    start: 100
    max: 1000000

command /coins:
    trigger:
        set {_has} to currency "coins" of player
        send "&7You have &6%economy format of {_has}%&7."

command /pay <player> <number>:
    trigger:
        set {_amount} to parse arg.2 as number
        if {_amount} is not set or {_amount} <= 0:
            send "&cHow much?"
            stop
        if currency "coins" of player < {_amount}:
            send "&cYou do not have that much."
            stop
        pay {_amount} of currency "coins" from player to arg.1
        send "&aPaid %economy format of {_amount}% to %arg.1%."

Everything HyperScript does with a currency works as before: currency "coins" of player, set, add, subtract, pay, top. What HyperEconomy adds is that a plugin which pays a player through Vault changes the same number.

  • A new player starts with what the block's start: says, for other plugins too.
  • A payment that would take a player past max: is refused, and nothing is paid in.
  • A plugin cannot take out more than a player has.
  • There are no banks. A plugin that asks for one is told so.