Simple Calculator

A simple calculator, with ADD, SUB, DIV, MUL, and RAND buttons.

Author: Anonymous
Category: Other
Commands: @create, @describe, @pemit, @set.
Functions: add(), div(), mul(), rand(), sub().

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Simple Calculator

@create Simple Calculator
@set Simple Calculator=!NO_COMMAND
@set Simple Calculator=COMMANDS
@desc Simple Calculator=A simple calculator which demonostrates the use of basic $-commands, commands, and functions.%rCommands:%rADD (number),(number)%rSUB (number),(number)%rMUL (number),(number)%rDIV (number),(number)%rRAND
@lock/Basic Simple Calculator==me
&ADD Simple Calculator=$add *,*:@pemit %#=add(%0,%1)
&DIV Simple Calculator=$div *,*:@pemit %#=div(%0,%1)
&MUL Simple Calculator=$mul *,*:@pemit %#=mul(%0,%1)
&SUB Simple Calculator=$sub *,*:@pemit %#=sub(%0,%1)
&RAND Simple Calculator=$rand:@pemit %#=Random Number: [rand(100)]