Money

Pernese Money Commands:

+give <thing>[=<amount>] (or +pay) +buy <vendor>=<product>[,<amount>]
+deposit <object>=<amount> +collect <thing>[=<amount>]
+money [<thing>] +coins
+steal <person>
&MCost[-<product>] <object>=<amount> &MPay[-<product>] <object>=<message>
&MOPay[-<product>] <object>=<message> &MAPay[-<product>] <object>=<commands>
&MGive <object>=<message> &MOGive <object>=<message>
&MAGive <object>=<commands>

<amount> can be specified as a decimal number or as a coinage expression.

Use +help <topic> for more help on one of:

AMOUNTS GIVE BUY
COLLECT DEPOSIT CASH
PAY OPAY APAY
GIVE2 OGIVE AGIVE
INCOME

Note: No command prefixes are used in the <topic> field for +help.


AMOUNTS

Money Amounts:

The <amount> field of commands can be specified one of two ways.

The first is to use a decimal number, in terms of the primary coin of the monetary system, eg. 1.5 meaning 1 Mark 1 halfMark.

The second way is to use the coin names or abbreviations, which are listed in +coins. For example, 1 Mark, or 1 halfMark, or 1 Mark 1 halfMark, or any combination. You can use the singular, plural, or abbreviation names listed in +coins. If you type something which cannot be resolved, it will be treated as 0.

(top)


Command: GIVE

Usage:

  • +give <thing>[=<amount>]
  • +pay <thing>[=<amount>]

This command is used to give players and objects some of your coins. For players, <amount> must be specified.

For objects, the <thing> must have an &MCost set, and you must pass <thing>'s UseLock. If <thing>'s &MCost is less than zero, it accepts donations of any size, so you must specify an <amount>. If the &MCost is greater than zero, only the proper <amount> is accepted - any less is not enough, and any extra will be returned as change.

Example:

+give Bartender=1 Two-Mark

You pay the Bartender.
You get 1 Mark 1 halfMark in change.

(top)


Command: BUY

Usage: +buy <thing>=<product>[,<amount>]

This command is used to purchase a specific item from a vendor, and allow you to specify the price paid. The &MCost-<product> of the vendor must be set, and you must pass the machine's UseLock. The <amount> argument is optional - you don't have to supply it, and it is just a safety check to make sure you don't spend more than you are anticipating. If supplied, the same rules as for +give to a machine apply.

Example:

+buy Bartender=Aspirin,1 Five-Mark

You buy some aspirin from the Bartender.
You get 1 halfMark in change.

(top)


Command: COLLECT

Usage: +collect <thing>[=<amount>]

This command is used to retrieve money stored on an object or player. You must control <thing> (see Help Control). This is useful for collecting the profits garnered by a vendor, or retrieving money deposited in a wallet or vault. If <amount> is not specified, all of the money <thing> has will be collected.

Example:

+collect Bartender

You collect 1 Five-Mark 1 Two-Mark 1 halfMark from Bartender.

(top)


Command: DEPOSIT

Usage: +deposit <thing>=<amount>

This command is used to store money on an object, like a wallet, or other secure place (see $help STEAL). You must control <thing> (see Help Control). This is useful for avoiding theft, as well as keeping large amounts of money in a vault, etc.

Example:

+deposit Wallet=2.5

You deposit 1 Two-Mark 1 halfMark in Wallet.

(top)


Command: CASH

Usage: +money [<thing>]

If <thing> is not specified, the command reports how much money you have with you. If <thing> is specified, and you control it (see Help Control) then the amount of money <thing> has is reported.

Example:

+money

You have 1 halfMark.

+money Wallet

Wallet has 1 Five-Mark.

(top)


COINAGE

Usage: +coins

This command will display a table of the MUSH's coins, and their different values, as well as a short description of what that translates into in buying power.

(top)


COST

Command: MCost
Usage: &MCost[-<product>] <thing>=<amount>

Without the <product> specification, this is like the standard MUSH command @cost, but the Money System allows you to specify fractional amounts for the cost of operating a machine. You should also set an &MPay, &MOPay and &MAPay on an object, to respond when the object is given money, like the @Pay, @Opay, and @Apay equivalents.

If <amount> is negative, <thing> will accept donations of up to the absolute (positive) value of <amount>.

With a <product> named, the object, the +buy command may be used. This makes it much easier for a vendor to sell a number of different items.

Example:

&MCost Bartender=1 Mark 1 halfMark

Set.

&MCost-Aspirin Bartender=2 Two-Marks 1 halfMark

Set.

(top)


Command: MPay

Usage: &MPay[-<product>] <thing>=<message>

This is like the standard MUSH command @Pay, but is used when the object is paid using the Money System. The person giving <thing> money sees <message>. If <product> is specified, then <message> is seen when someone uses +buy and specifies that product.

Example:

&MPay Bartender=You pay the bartender, who quickly mixes you a drink.

Set.

&MPay-Aspirin Bartender=You buy some aspirin from the Bartender.

Set.

+pay is just an alias for +give. See $help GIVE for help.

(top)


OPAY

Command: MOPay
Usage: &MOPay[-<product>] <thing>=<message>

This is like the standard MUSH command @OPay, but is used when the object is paid using the Money System. The everyone in the room except the person paying <thing> sees <message>, prepended with the payers name and a space. If <product> is specified, then <message> is seen when someone uses +buy and specifies that product.

Example:

&MOPay Bartender=pays the bartender, who quickly mixes %o a drink.

Set.

&MOPay-Aspirin Bartender=buys some aspirin from the Bartender.

Set.

(top)


APAY

Command: MAPay
Usage: &MAPay[-<product>] <thing>=<command list>

This is like the standard MUSH command @APay, but is used when the object is paid using the Money System. When <thing> is paid, the command list is run. If <product> is specified, then the <command list> is run when someone uses +buy and specifies that product. The %0 register is set to the decimal value paid.

Example:

&MAPay Bartender=@create Glass of Mead; give %N=Glass of Mead

Set.

&MAPay-Aspirin Bartender=@create Two Aspirin; give %N=Aspirin

Set.

(top)


GIVE2

Command: MGive
Usage: &MGive <thing>=<message>

The MGive attribute holds <message>, which only the recipient of a +give is shown.

Example:

&MGive King=The King hands you some coins.

Set.

(top)


OGIVE

Command: MOGive
Usage: &MOGive <thing>=<message>

This <message> is shown to others in the same location as the recipient of a +give. For the purposes of code, %N is the name of the recipient, %# is the dbref# of the recipient, etc.

Example:

&MOGive King=is given a handful of coins by the King.

(top)


AGIVE

Command: MAGive
Usage: &MAGive <thing>=<command list>

This attribute is used to hold commands to be run upon the execution of a +give command. Since the Money System is coded in MUSHcode, a +give does not run in one "tick" of the queue as other commands do, and hence there is some need for synchronization when dealing with complex vendors. The %# register is set to the dbref# of the recipient, and the usual %-registers are similarly set. The %0 register holds the value given.

Example:

&MAGive King=@trigger Grand Vizier/TAX_PERSON=%#,add(%0,1)

(top)


INCOME

Commands:

+income displays your income
+income <name> displays the income of <name>
+setincome <name>=<amount> sets the income of <name> to <amount>

Only area builders and wizards may view the income of others and set people's income.

(top)


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License