Mob_memory

From: Simran R. Kumar (srk4@po.CWRU.Edu)
Date: 04/05/94


It seems that the mail for absolut@b63740.cwru.edu is screwed, so, I'm
posting this from my personal account...
Anyway, we have a flag called MOB_HELPER that makes any mob so flagged
rescue any mobs that are in the same room that are being attacked.  Some of
these mobs area also flagged as MOB_MEMORY..however there is a problem.
Consider this scenario:

Krk walks into a room with Conner Macleod (who is flagged as HELPER and
MEMORY), and a fluff chic.  Krk attacks the fluff chic, and Conner rescues
the chic and starts to attack Krk (as he is supposed to).  Krk is now
getting his ass kicked by Conner, and decides to flee.  He comes back, but
Conner attackes him, saying that he is "the fiend who attacked me" (as per
MOB_MEMORY).  This shouldn't happen, since Krk never initiated an attack
against Conner. How can I fix this?  We are using 2.11 code (modified a
lot, though MEMORY was never touched).  Below is the code we are using for
HELPER (the code is in the mobact.c file, after the aggressive part).

/*   MOB_HELPER code by Ace [ace@b63740.cwru.edu], AbsolutMUD */
    if (IS_SET(ch->specials2.act, MOB_HELPER)) {
               found = FALSE;
               for(tmp_ch=world[ch->in_room].people; tmp_ch; tmp_ch = tmp_ch->next_in_room){
               if( !IS_NPC(tmp_ch) && tmp_ch->specials.fighting ){
                 act("$n screams 'ACK! YOU MUST DIE YOU MORTAL FOOL! ",
                      FALSE, ch, 0, 0, TO_ROOM);
                 stop_fighting(tmp_ch);
                 if(ch->specials.fighting) stop_fighting(ch);
                 hit(ch, tmp_ch, 0);
               }
           }
    } /* helper */

Thanks a lot for any help.
BTW...Jeremy, for 3.1, would a HELPER flag be feasible?

Ace
AbsolutMUD(b63740.cwru.edu 4000)
  
        

--

We are notes in the music, searching for remembered rhyme....



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