Re: CODE:Death & DT

From: Daniel Koepke (dkoepke@california.com)
Date: 12/01/96


On Sun, 1 Dec 1996, Administrador do Muds wrote:

>  Hey all,       
>         I made some changes do the death code. Now when you die, you return
> to a starting room, loose a bunch of exp but keep the stuff with you. Its working
> fine, but I have two doubts about it:
> 
>         -To do this, I changed the extract_char function. Since this function
> is called from the DT rotine too, I had to add a test, so if the person died due to
> a DT he would loose everything and return to the menu. So I added a !GET_POS(ch)=POS_DEAD
> teste. Is this a good way to test if the person died or DT?

This is bad!  extract_char() is used to kill mobiles, extract characters
from the game, etc. (eg., 'quit').  If they are being put back in the
start room, their character is remaining in the game.  You should not
change extract_char() unless absolutely neccessary.  For ordinary death
you should just do:

  char_from_room(ch);
  char_to_room(ch, r_mortal_start_room);
  GET_HIT(ch) = 1;
  GET_EXP(ch) -= exp_penality;


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


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



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