Re: Random Msg

From: James Thomas (rasdan@TELEPORT.COM)
Date: 09/04/98


>
>   if (*cmd_info[cmd].command == '\n')
>     send_to_char("Huh?!?\r\n", ch);
>

I do it this way:

in constants.c
char *random_messages[] = {
  "What?\r\n",
  "TYPO!?\r\n",
  "I don't understand ...\r\n",
  "And what am I supposed to do with that?\r\n"
};

int numRandom = 4;

in interpreter.c (top of command_interpreter() function:
extern int numRandom = 4;
extern char *random_messages[];


Then at this part:
  if (*cmd_info[cmd].command == '\n') {
    send_to_char(random_messages[number(0, numRandom - 1)], ch);
    return;
  }

=-=-=-=-=-=-=-=-=
   James C. Thomas Jr.
   Head Implementor, FinalityMUD
   finality.com 4000
=-=-=-=-=-=-=-=-=


     +------------------------------------------------------------+
     | 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