[DG-SCRIPTS] [CODE] MGecho Cmmd

From: Brandon Brown (ViperBrd@AOL.COM)
Date: 10/17/98


Just a simple little command for mobs to gecho to the MUD - I found it useful
because we have a few special features that could use things to report to the
whole mud - without gossiping, etc... basically, mgecho is a hack of gecho +
mecho - simple.

Any comments, suggestions, questions - email viperbrd@aol.com
Though I doubt there's much to comment on :p

Remember to add mgecho to the ACMD list and Master Cmmd list (R) in
interpreter.c

-=-=-=-=- Place in dg_mobcmd.c -=-=-=-=-

ACMD(do_mgecho)
{
  struct descriptor_data *pt;
      skip_spaces(&argument);
  delete_doubledollar(argument);

    if (!MOB_OR_IMPL(ch)) {
        send_to_char( "Huh?!?\r\n", ch );
        return;
    }

    if (AFF_FLAGGED(ch, AFF_CHARM))
        return;

    if (!*argument) {
        mob_log(ch, "mgecho called with no arguments");
        return;
    }
  else {
   sprintf(buf, "%s\r\n", argument);
    for (pt = descriptor_list; pt; pt = pt->next)
      if (STATE(pt) == CON_PLAYING && pt->character && pt->character != ch)
        send_to_char(buf, pt->character);
     }
 }

-=-=-=-=- End -=-=-=-=-

 - Brandon (Viper)
TimeTravellerMUD


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