Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Death Sequence (Afterlife)
Death Sequence (Afterlife)
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Nystix
(19 posts) Bio
|
Date
| Mon 13 Jan 2003 11:26 PM (UTC) |
Message
| 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. | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #1 on Tue 14 Jan 2003 02:13 AM (UTC) |
Message
| 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 :-\ | Top |
|
Posted by
| Kris
USA (198 posts) Bio
|
Date
| Reply #2 on Tue 14 Jan 2003 11:25 PM (UTC) |
Message
| 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 =)
| Top |
|
Posted by
| Typhon
USA (112 posts) Bio
|
Date
| Reply #3 on Thu 16 Jan 2003 09:00 PM (UTC) |
Message
| 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 | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,227 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top