View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Mon Mar 21, 2016 17:10 Post subject: vir_oncdamage ? |
|
|
I was just going through my fork of nwnx2 for linux, and I found in the fixes plugin a reference to a RunScript("vir_oncdamage");
I was wondering if anyone has this script, or knows what it does?
I don't think it was included in the git upload?
Code: |
int CNWSCreature__DoDamage_hook(CNWSCreature *a1, unsigned int a2)
{
fixes.Log(3, "DoDamage: %08lX, %d, Current: %d\n", a1->Object.ObjectID, a2, a1->Object.HitPoints);
if (a1->IsPC && a1->Object.HitPoints > 0 && (int)a2 > a1->Object.HitPoints + 5) {
a2 = a1->Object.HitPoints + 5;
int ret = CNWSCreature__DoDamage(a1, a2);
fixes.Log(3, "Running script...\n");
RunScript("vir_oncdamage", a1->Object.ObjectID);
return ret;
}
return CNWSCreature__DoDamage(a1, a2);
}
|
In https://github.com/NWNX/nwnx2-linux/blob/master/plugins/fixes/FixesHooks.cpp |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Mar 24, 2016 15:26 Post subject: |
|
|
It was really a PW-specific tweak that prevents players from dying instantly, instead setting their HP to -5 to let other players revive them, or for them to have a chance to recover. Without this, low-level players used to die far too often on our PW.
The script contained a command to nearby creatures to stop attacking this PC. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|