Re: [CODE] Mob Death Spec Proc Question

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 06/25/98

Make this a bit more dynamic.
in raw_kill add:
if(IS_NPC(vict)&& has-a-spec-proc(ch))
   run-spec-proc(normal args, SPEC_DEAD);

ok, now, add another variable (a long int) to the SPECIAL macro.  You can either
make it a bitvector or an int based on wether or not you want to use more than
one mode at the same time.

Then write up a spec proc that checks this variable and does code if it is ( ==
or &) SPEC_DEAD.

#define SPEC_INIT   1 // For use to init the mob on load(run from load_zone)
#define SPEC_CMD    2 // When activated from interpreter.c
#define SPEC_MOBACT 3 // When activated from mobact.c
#define SPEC_DEAD   4 // When activated from raw_kill()
#define SPEC_ENTER  5 // Someone just entered my room
<.. add more here ..>

This may seem rather complex, but if you are going to code a lot of spec_procs,
it will really help out in the long run.  Especially for converting the BIG AND
NASTY mobprogs and dg-scripts to faster code.

P.S. George, wanna stick something like this into bpl1[45]?  Think it would make
it easier on the newbies than the syntax that checks the 'cmd' variable.  Also
would fall in line with some of the event systems out there, making it all look
the same.

______________________________ Reply Separator _________________________________
Subject:  [CODE] Mob Death Spec Proc Question
Date:    6/25/98 7:28 AM

I'm trying to get a my spec_proc for a certain mob who is holding a key
to unlock and open a door when he dies, I have the door_gen for unlock
and open but I'm not sure what to add for the "make this happen" part.
I'm thinking about maybe making a seperate non spec_proc routine in void
raw_kill (fight.c) to do this, any advice?


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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