Re: [CODE] Using die() in mob specials

From: Edward Glamkowski (EGlamkowski@MATHEMATICA-MPR.COM)
Date: 08/27/97


The exploding monkeys snippet :)

The portion where the monkey explodes:
   act("$n has just exploded into little bitty bits!",
       FALSE, ch, 0, 0, TO_ROOM);
   extract_char(ch);

I never used this spec_proc, but presumably it must work,
or it probably wouldn't have found its way to the snippets
page :)


Edward Glamkowski, Programmer           Mathematica Policy Research
EGlamkowski@mathematic-MPR.COM          Princeton, NJ
                http://www.mathematica-mpr.com/

                                             eschew obfuscation

>----------
>From:  Jared Buckley[SMTP:jaredb@TI.COM]
>Sent:  Wednesday, August 27, 1997 4:00 PM
>To:    CIRCLE@post.queensu.ca
>Subject:       Re:  [CODE] Using die() in mob specials
>
>John Evans wrote:
>[snip]
>> When the sun comes up, loop through the character list and if you find a
>> mob that is flagged MOB_SHADOW do:
>>
>> act("$n screams and fades away as the sun hits $e!",
>>     FALSE, ch, 0, 0, TO_ROOM);
>> char_from_room(ch);
>> extract_char(ch);
>
>You can't call extract_char right after calling char_from_room,
>because extract char will error out, complaining about extracting
>a character from NOWHERE:
>
>SYSERR: NOWHERE extracting char. (handler.c extract_char)
>
>I'd also like to isolate this to a special procedure, rather
>than setting a bit for all mobs.  When I call die(), raw_kill(),
>or extract_char() on the mob in the room, it causes the mud to
>crash.  I'm having trouble though, seeing how this is different
>from when a mob dies in battle.  (And that works ok)  Obviously
>I'm missing something, as combat works, but this proc doesn't.
>Anyone tried to have a spec_procs mob destroy itself?
>
>Jared
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>


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



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