Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Error when Dying (http://www.topmudsites.com/forums/showthread.php?t=293)

Verboden Faction 03-24-2003 05:11 PM

When anyone dies, and their health drops to a negative, it never recovers. I want them to heal automatically when they die. I tried putting in a restore piece, but that kept healing the whole room. I run rom24b6

Tezcatlipoca 03-24-2003 11:42 PM

Well, i dont do ROM, but basically what your looking for is wherever the death is handled in the code. Make a char, get em killed, then copy a unique message it gives when you die. Do a grep command on the message until you find where it is. Somewhere in there it will "Extract" the character object from the room you died in, and transplant it in your "resurection room." Right after it does that, just manualy set their hitpoints to 1. Might be something like this to set the hp:
pc->hit = 1;

If you wanted to heal them to full then instead put in:
pc->hit = pc->hitmax;
(or the equvilent for your code). Personaly i wouldnt suggest doing this though, as you open yourself up real wide for players to just spam attack a mob until its dead (costing them many lives in the process, but who cares if theres no reprisals?) Better to just leave them at 1 hp to heal manually up. Then they have to either wait to heal fully, or use expensive/rare healing potions to get themself to full quickly.

Grey 03-25-2003 11:59 PM

My two cents would be in agreement with the previous post. I would certainly suggest leaving the player's hit points at 1 and allowing them to heal. i use lpc code and i find that the use of bodis is a better idea. there are player bodies and ghost bodies and upon death, a player (and it's data) is put into the ghost body which has different commands.


All times are GMT -4. The time now is 09:43 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022