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
➜ Deaths and pdeaths/pkills
|
Deaths and pdeaths/pkills
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Rob Harper
(108 posts) Bio
|
| Date
| Tue 01 Jul 2003 07:07 PM (UTC) |
| Message
| I'v noticed in my version of smaug apperently the only time pdeaths/pkills get added is when you are in the arena how can I go about chaning this, thus far I found this in the code.
/*
* Any character in the arena is ok to kill.
* Added pdeath and pkills here
*/
if ( in_arena( ch ) )
{
if ( !IS_NPC(ch) && !IS_NPC(victim) )
{
ch->pcdata->pkills++;
victim->pcdata->pdeaths++;
}
return;
}
thats just not cool what alterations do I have to make to make pkills/pdeaths, count everywhere that isnt safe.
Thanks | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #1 on Tue 01 Jul 2003 10:18 PM (UTC) |
| Message
| | Actually, if the code is properly written with checks for pkill attempts, the only place pkill should be possible in the first place is the arena. Mind you, Im not gonna go thru the SMAUG combat system to check it but you might want to before you start mucking with where pkill counters are added. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Rob Harper
(108 posts) Bio
|
| Date
| Reply #2 on Tue 01 Jul 2003 10:45 PM (UTC) |
| Message
| | Ahh...so its sususposed to be like that, I was intent on making it where ever you can..Ie clan halls/a designated dualing area. | | Top |
|
| Posted by
| Rob Harper
(108 posts) Bio
|
| Date
| Reply #3 on Sat 05 Jul 2003 03:28 AM (UTC) |
| Message
| | Anyone have any ideas to make them count everywhere? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Sat 05 Jul 2003 04:50 AM (UTC) |
| Message
| Have you tried taking out the test:
if ( in_arena( ch ) )
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #5 on Sat 05 Jul 2003 05:53 AM (UTC) |
| Message
| Taking out the if check will accomplish either of two things:
a) pkill will count everywhere
b) pkill will never count anywhere
The ultimate result here depends on what safety checks are built into the combat code to prevent "accidental" pkilling outside the arena. The amount of code in need of changing will also depend on those same safety checks in the combat system. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Rob Harper
(108 posts) Bio
|
| Date
| Reply #6 on Sat 05 Jul 2003 06:47 AM (UTC) |
| Message
| | It made them not count anywhere.... | | Top |
|
| Posted by
| Rob Harper
(108 posts) Bio
|
| Date
| Reply #7 on Sat 05 Jul 2003 06:55 AM (UTC) |
| Message
| | It works it works!, thanks guys. | | 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.
23,640 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top