[Circle] Simple Spec_Proc Problem

From: linebacker (linebacker@microlink.net)
Date: 07/31/96


If you have not noticed yet, I hate spec_procs.

Here is my latest one, almost identical to the mayor that
comes with stock 3.0, minus the extra path and some other
cases.


SPECIAL(moon_captain)
{
  ACMD(do_gen_door);
  ACMD(do_gen_comm);

  static char open_path[] = "WAAAS.";
  static char *path;
  static int index;
  static bool move = FALSE;

if (!move) {
    if (time_info.hours == 10) {
       move = TRUE;
       path = open_path;
       index = 0;
       }
  }

  if (cmd || !move || (GET_POS(ch) < POS_SLEEPING) || (GET_POS(ch) == POS_FIGHTING))
    return FALSE;

  switch (path[index]) {

  case 'W':
    GET_POS(ch) = POS_STANDING;
    act("$n awakens and stretches to his feet.", FALSE, ch, 0, 0, TO_ROOM);
    break;

  case 'A':
    do_gen_comm(ch, "some bullshit message", 0, SCMD_SHOUT);
    break;

  case 'S':
    GET_POS(ch) = POS_SLEEPING;
    act("$n lies down into his bunk and goes to sleep.", FALSE, ch, 0, 0, TO_ROOM);
    break;

  case '.':
    move = FALSE;
    break;
  }

  index++;
  return FALSE;
}

Prob 1: it will not wake the captain.
Prob 2: When I manually wake the captain, it starts going through his path,
        although it will not shout the command. (i care little about this
        at this point, I just want to wake the damn captain)

It is funny, I have almost exactly the same proc that work fine. I mean the
only difference between this and another is the times and the text being sent.

What have I overlooked?

btw: by playing around with the if statement that checks for !move and cmd, I actually had the procedure making my character shout (who was standing in the roomwith the captain)

oh yea, the captain is set proc, sentinel, aware, memory, nochar, no summon, 
        noblind,  nobash, notrip, nogate

Thanks in advance,
Chuck

+-----------------------------------------------------------+
| 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/07/00 PST