Re: void raw_kill() Nov 3, 98 01:51:39 am

From: Joshua French (jfrench@UMR.EDU)
Date: 11/03/98


  First thing, consider whether or not this mud is pkill.  You might then
wish to make sure that the room they load in is safe, or give them a
SAFETY flag or something for say 5 minutes.  Second, have a look at my
additions.  This would handle MUDs where you have players save to rooms,
or use the house code.

> Subject: void raw_kill()
>
> Allright You guessed it this just a quick hack of void raw_kill.  I got
> tired of
> having people booted out to the menu screen if they died. This way they are
> re-
> turned to the mortal start room whence they began. Yes it is ugly, but it
> works. If you have any suggestions, holler @ me.
> >>------Bo----->Young
>
> void raw_kill(struct char_data * ch)
> {
>     sh_int load_room; /* Which room to place char in Taliesin - The Mists of
> Avalon */
>
+// just for arguments sake, add these lines
+if(IS_NPC(ch) return;  // if you forgot to check this before calling func.
+
+if(GET_LOADROOM(ch) > 0) // depending on compiler you may not need   > 0
+{
+  load_room = GET_LOADROOM(ch);
+}
+else
+{
>  if (GET_LEVEL(ch) >= LVL_IMMORT)
>    load_room = r_immort_start_room;
>  else
>    load_room = r_mortal_start_room;
+}
>
>  if (FIGHTING(ch))
>     stop_fighting(ch);
>
>   while (ch->affected)
>     affect_remove(ch, ch->affected);
>
>   death_cry(ch);
>
>   if (!IS_NPC(ch)) {
>    make_corpse(ch);
>       char_from_room(ch);
>       char_to_room(ch, load_room);
>       GET_POS(ch) = POS_STANDING;
>       look_at_room(ch, 0);
>   } else {
>    make_corpse(ch);
>       extract_char(ch);
>   }
>  }
>

--

email:  jfrench@umr.edu       ICQ#:   13579151
        Joshua French          web:   www.umr.edu/~jfrench


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