[NEWBIE] - act() question

From: Tom Dailey (tomd@waymark.net)
Date: 02/23/99


Hello all,

I coded a spec_proc that is giving me fits.  I've modified
this a few times, trying to get it to work so it looks about
as hackish as it can get...
The problem is when the character types a command,
like kick mob, the character is the one that says the do_say,
instead of the mob.  And when I try to do an act(), the $n is the
character, not the mob.  If I change $n to $N, it still doesn't work.
I thought about adding struct char_data *vict to the top of the
proc, then changing the do_say to do_say(vict, "", 0, 0); and
then right before the do_say(), add ch = vict, but that doesn't
seem to work either...

Well, here's the code..any help is appreciated:

SPECIAL(canttouchme)

{
  ACMD(do_say);

    if (GET_LEVEL(ch) >= LVL_IMMORT)
       return (0);
    if ( CMD_IS("punch") || CMD_IS("bash") ||
        CMD_IS("bash") || CMD_IS("disarm") || CMD_IS("kick") ||
        CMD_IS("push") || CMD_IS("powerpunch") )
      {
      act("$N raises $s arms in disgust", FALSE, ch, 0, 0, TO_ROOM);
      do_say(ch, "Your little warrior skills cannot hurt me!", 0, 0);
      return (1);
      }
      if(  CMD_IS("cut") || CMD_IS("encircle") ||
           CMD_IS("backstab") || CMD_IS("strike") || CMD_IS("gouge"))
      {
      act("$N raises $s arms in disgust", FALSE, ch, 0, 0, TO_ROOM);
      act("$N says, 'You foolish little thief, go away before I call your
mother to come get you'", FALSE, ch, 0, 0, TO_ROOM);
      return (1);
      }
      if( CMD_IS("cast"))
      {
      act("$n closes $s eyes and dispels your magic.", FALSE, ch, 0, 0,
TO_ROOM);
      do_say(ch, "A spell caster no less! bah, be gone with you.", 0, 0);
      return (1);
      }
      if( CMD_IS("kill") || CMD_IS("murder"))
      {
      do_say(ch, "KILL ME?!  I think not.", 0, 0);
      return (1);
      }
      if( CMD_IS("order"))
      {
      do_say(ch, "Ordering your beast to attack me is a quick way of
assuring your death.", 0, 0);
      return (1);
      }
   return (0);
   }


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



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