Prob with this Spec_Proc

linebacker@microlink.net
Date: 10/03/96


I have a special procedure (below) that makes a mob
shout a given message depending on the probability.

It works fine however, sometimes it says,

The city guard shouts, "blah"

instead of

The town crier shouts, "blah"

It seems that sometimes a mob in the room with the crier
somehow shouts the message. I have even had it say a player's
name.

The town crier is the only mob the procedure is assigned to.

I am guessing some king of pointer problem, but I cannot locate it.

Here is the procedure, also if anyone sees a better way to code this,
please let me know.

thanks, Chuck

[CODE]

SPECIAL(town_crier)
{
  ACMD(do_gen_comm);

  switch (number(0, 2000)) {

  case 1:
    do_gen_comm(ch, "I hear there is a powerful vampire under a graveyard east of 
the city!", 1, SCMD_SHOUT);
    break;
  case 10:
    do_gen_comm(ch, "Rumors say that there are extensive catacombs under the 
city!", 1, SCMD_SHOUT);
    break;
  case 15:
    do_gen_comm(ch, "I have heard tales of a splendid elven city located in the 
Highbank Forest.", 1, SCMD_SHOUT);
    break;
  case 20:
    do_gen_comm(ch, "Bring plenty of poison antedotes with you on your journeys.", 1, 
SCMD_SHOUT);
    break;
  case 25:
    do_gen_comm(ch, "Rumors say that there are powerful weapons that can cast 
spells by themselves!", 1, SCMD_SHOUT);
    break;
  case 80:
    do_gen_comm(ch, "I hear there is a secret ranger glade just west of the city.", 
1, SCMD_SHOUT);
   break;
  case 90:
    do_gen_comm(ch, "There are ships leaving Tantras daily heading to remote parts of 
the realms.", 1, SCMD_SHOUT);
   break;
  case 98:
    do_gen_comm(ch, "There are tales of a powerful assassin's guild located under the 
city!", 1, SCMD_SHOUT);
    break;
    }
 return FALSE;
}

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



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