Random Messages to Huh!

From: The Merciless lord of Everything (serces@MUD.DK)
Date: 09/05/98


This is howto make a random message when people enter commands not
defined
for them, usually it goes "Huh!?!", but with a little bit of work you
can
make it say thousands (erh.. maybe not.. :) or at least as many as you
have
patience to define, I only defined 6 or so, but it's easily extended
without
dreadful things like a playerwipe or such.. :)

Usual disclaimer follows:
Whatever this code does to your mud is not my responsibility, it works
in
my code, if you decide to use it and it breaks your mud, kills your dog,
leaves you without a job or ANYTHING else, I cannot be blamed. (hey..
you
decided yourself to put it in.. :)

Onwards to the code.. :)

Everything takes place in Interpreter.c Just before void
command_interpreter(struct char_data *ch, char *argument) you add
everything
in between *SNIPPET*

*SNIPPET*
char *rnd_fail_msg[] =
{
 "Huh!?!\r\n",
 "What?!?\r\n",
 "UggaBugga?!?\r\n",
 "Duh?!?\r\n",
 "ArgleBargle!?!?\r\n",
 "Not Understood!\r\n"
};
#define MAX_RND_FAIL 6
*SNIPPET*

Now look for the line :
        send_to_char("Huh?!?\r\n", ch);
in void command_interpreter, and replace it with :
        send_to_char(rnd_fail_msg[number(0, MAX_RND_FAIL)], ch);

And recompile, Tadaa.. :) If you have done everything correct it should
be a
little more fun to look at than just the Usual Huh?!?!
Oh .. I don't want credits for this one (As it was just something I
whipped
up in a couple of minutes), but I would like to have an Email from you
should you decide to use this, so I can run around and Brag. *chuckle*

Have fun

Serces


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST