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
➜ Dawn of Time
➜ Administration
➜ Corpse generation change
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Tue 26 Nov 2002 08:51 PM (UTC) |
| Message
| Here's the deal. I need mpdamage to NOT be treated as a pkill in the event of a fatal dose. I am attempting to modify the generation routine in fight.cpp to include a check for morgue corpse generation in the event the killer is the same as the character. The original check is:
if(GAMESETTING(GAMESET_MORGUE_ENABLED) && !IS_NPC(ch)
&& (!killer || (killer!=ch && IS_NPC(killer) && !killer->master)) )
and what I think should work (doesn't) is:
if(GAMESETTING(GAMESET_MORGUE_ENABLED) && !IS_NPC(ch)
&& (killed_by!=ch->name && !killer || (killer!=ch && IS_NPC(killer) && !killer->master)) )
Any advice would be appreciated on this matter.... especially as we now have places that players very simply cannot retrieve corpses from. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Cirin
USA (19 posts) Bio
|
| Date
| Reply #1 on Tue 26 Nov 2002 09:07 PM (UTC) |
| Message
| | killed_by is killer->short_descr not killer->name |
ººººººººººººººººººººººº
ºº»º¢îrìñ hëllþørñ身ºº
ººººººººººººººººººººººº | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #2 on Tue 26 Nov 2002 09:16 PM (UTC) |
| Message
| | Oops, see, thats what I get for not having the code in front of me and writing from memory. Anyway, I've tried several combinations, including killer->descr, killer->name, victim->name, and ch->descr plugged into the appropriate locations in the new check. I suspect there may be a placement issue as well but it *shouldn't* matter where in the call the check is made. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Cirin
USA (19 posts) Bio
|
| Date
| Reply #3 on Wed 27 Nov 2002 12:59 AM (UTC) Amended on Wed 27 Nov 2002 01:09 AM (UTC) by Cirin
|
| Message
| try:
if(GAMESETTING(GAMESET_MORGUE_ENABLED) && !IS_NPC(ch) && (str_cmp(killed_by,killer->short_descr) && (!killer || killer!=ch) || (IS_NPC(killer) && !killer->master)))
|
ººººººººººººººººººººººº
ºº»º¢îrìñ hëllþørñ身ºº
ººººººººººººººººººººººº | | Top |
|
| Posted by
| Cirin
USA (19 posts) Bio
|
| Date
| Reply #4 on Wed 27 Nov 2002 07:42 PM (UTC) |
| Message
| | Did that happen to work for you? |
ººººººººººººººººººººººº
ºº»º¢îrìñ hëllþørñ身ºº
ººººººººººººººººººººººº | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #5 on Wed 27 Nov 2002 08:02 PM (UTC) |
| Message
| | Yet another attempt that looks like it should work but doesnt. For now, I'm walking away from this particular project and the players will simply have to face the risk of an unrecoverable corpse without immortal intervention. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Cirin
USA (19 posts) Bio
|
| Date
| Reply #6 on Wed 27 Nov 2002 09:14 PM (UTC) |
| Message
| One last try. I had to put it in my editing stuff so I could actually look at it on a black background all this white annoys my eyes. This "should" do it, though.
if (GAMESETTING(GAMESET_MORGUE_ENABLED) &&
!IS_NPC(ch) && str_cmp(killed_by,killer->short_descr) &&
(!killer || killer!=ch || IS_NPC(killer)) &&
!killer->master )
|
ººººººººººººººººººººººº
ºº»º¢îrìñ hëllþørñ身ºº
ººººººººººººººººººººººº | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #7 on Thu 28 Nov 2002 07:32 AM (UTC) |
| Message
| | I'm so close to fixing this I can taste it but there's still something not quite right in the code.... I can either set it so all deaths send corpses to the morgue or mpdamage is treated as standard pkill.... Can't quite find the happy medium I'm looking for |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #8 on Fri 29 Nov 2002 09:16 AM (UTC) |
| Message
| Finally managed to get this working about 5 minutes ago. Heres the fix that eventually did what I needed done... mpdamage and npc combat kills to morgue, pkill to room.
if (GAMESETTING(GAMESET_MORGUE_ENABLED) && !IS_NPC(ch)
&& (killer == ch)
|| (IS_NPC(killer) && !killer->master))
|
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | 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.
25,807 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top