Is there any way to make it so that a player, upon death is set to a state of 'dead', hence rendering them unable to affect anything in the real world (namely perform actions such as get, eat, drink attack etc.,) but still able to wander, with a tag of 'shade' on them? Or create an afterlife area, and set them to that state? Thanks.
Death Sequence (Afterlife)
Posted by Nystix on Mon 13 Jan 2003 11:26 PM — 4 posts, 19,733 views.
Reply although it's very do-able and I know of a few MUDs that have player 'ghosts' I think it would be quite an undertaking to convert your code to do exactly what you want. Unless there's a snippet out there for it :-\
Actually, if you wanna be lazy about it, it shouldn't be very difficult at all. Here's how I'd do it if I didn't want it to take forever:
Add a bool variable to the CHAR_DATA structure in mud.h; e.g. 'is_dead' or something like that.
In function 'interpret' of interp.c, put in an ifcheck so that if ch->is_dead == TRUE, it'll skip over check_skill and check_social (thereby disabling all skills and socials for the ghost).
You could also have the player's stats all to 0, while storing his/her actual stats somewhere else (knowing me, I'd just add to the CHAR_DATA structure for those hehe). That way, he/she would not be able to get anything, let alone carry it.
After that, the remaining work to be done would be minor. Perhaps automatically imposing a flag similar to 'silence' on the player, for example.
Then you could just go around adding "if(ch->is_dead==TRUE) return;" to various other functions that you want disabled for a ghost.
If you know your code, it shouldn't be very difficult at all =)
Add a bool variable to the CHAR_DATA structure in mud.h; e.g. 'is_dead' or something like that.
In function 'interpret' of interp.c, put in an ifcheck so that if ch->is_dead == TRUE, it'll skip over check_skill and check_social (thereby disabling all skills and socials for the ghost).
You could also have the player's stats all to 0, while storing his/her actual stats somewhere else (knowing me, I'd just add to the CHAR_DATA structure for those hehe). That way, he/she would not be able to get anything, let alone carry it.
After that, the remaining work to be done would be minor. Perhaps automatically imposing a flag similar to 'silence' on the player, for example.
Then you could just go around adding "if(ch->is_dead==TRUE) return;" to various other functions that you want disabled for a ghost.
If you know your code, it shouldn't be very difficult at all =)
ok i was very intrigued by this and decided to code it for myself.. ive run into a few bugs that im cleaning up.. ill keep you p[osted when i write up a little snippet for you.. it not the easiest thing to code but it wasnt difficult
-typ
-typ