Magic 8 Ball

Ask the Magic 8 Ball a question, shake it, and it returns an answer.

Author: Unknown
Category: Games
Functions: first(), shuffle(), v().

Instructions

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

MUSHCode for Magic 8 Ball

@create Magic 8 Ball
@link Magic 8 Ball = #3605
@lock/Basic Magic 8 Ball==me
&C_ASK Magic 8 Ball=$ask *:@pemit %#=You shake up the Magic 8 Ball, thinking of the question "%0"...;@oemit %#=%n shakes up the Magic 8 Ball, thinking of the question "%0"...;@wait 2=@trigger me/t_reply
@DESCRIBE Magic 8 Ball=This is a smooth black ball, about 6 inches across. A large white dot is painted on one side, with a black numeral 8 in the center of the dot. Exactly opposite the dot, there is a window through which messages can appear, when the ball is held with the window facing upwards.%r%rType 'ask <question>' to consult the Magic 8 Ball for the answer to any question which may be answered with either 'yes' or 'no'.
&D_MESSAGES Magic 8 Ball=As I see it, yes|Ask again later|Better not tell you now|Cannot predict now|Concentrate and ask again|Don't count on it|It is certain|It is decidedly so|Most likely|My reply is no|My sources say no|Outlook good|Outlook not so good|Reply hazy try again|Signs point to yes|Very doubtful|Without a doubt|Yes|Yes, definitely|You may rely on it
&T_REPLY Magic 8 Ball=:replies: "[first(shuffle(v(d_messages),|),|)]"