6-Sided Die

A 6 sided die with ansi picture.

Author: Unknown
Category: Games
Commands: @create, @describe, @failure, @set.
Functions: add(), ansi(), pemit(), rand(), setq(), u().
Compatibility: CobraMUSH, PennMUSH, TinyBit, TinyMUSH, TinyMUX.

Instructions

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

MUSHCode for 6-Sided Die

@create a 6-sided die
@lock/Basic a 6-sided die==me
@set a 6-sided die = VISUAL
&COMMAND.ROLL a 6-sided die=$roll:[setq(1,add(rand(6),1))][pemit(%#,You toss the die..%r[u(me/side.%q1)]))]
@DESCRIBE a 6-sided die=A small, black & white cube.%rYou could probably [ansi(wh,roll)] it.
@set a 6-sided die/DESCRIBE=no_command visual
@FAILURE a 6-sided die=Why not try rolling it?
@set a 6-sided die/FAILURE=no_command
&SIDE.1 a 6-sided die=[ansi(whiX,%b%b%b%b%b)]%r[ansi(whiX,%b%b*%b%b)]%r[ansi(whiX,%b%b%b%b%b)]
&SIDE.2 a 6-sided die=[ansi(whiX,%b%b%b%b%b)]%r[ansi(whiX,%b*%b*%b)]%r[ansi(whiX,%b%b%b%b%b)]
&SIDE.3 a 6-sided die=[ansi(whiX,%b*%b%b%b)]%r[ansi(whiX,%b%b*%b%b)]%r[ansi(whiX,%b%b%b*%b)]
&SIDE.4 a 6-sided die=[ansi(whiX,%b*%b*%b)]%r[ansi(whiX,%b%b%b%b%b)]%r[ansi(whiX,%b*%b*%b)]
&SIDE.5 a 6-sided die=[ansi(whiX,%b*%b*%b)]%r[ansi(whiX,%b%b*%b%b)]%r[ansi(whiX,%b*%b*%b)]
&SIDE.6 a 6-sided die=[ansi(whiX,%b*%b*%b)]%r[ansi(whiX,%b*%b*%b)]%r[ansi(whiX,%b*%b*%b)]