Initial upload

Initial upload.
This commit is contained in:
Jaysyn904
2023-11-14 12:09:02 -05:00
parent 657466db0c
commit 08e84b4e71
1674 changed files with 1227255 additions and 0 deletions

36
_module/nss/ondying.nss Normal file
View File

@@ -0,0 +1,36 @@
// Module : OnPlayerDying by Brian "spilth" Kelly
// For Neverwinter Nights - Bleeding Tutorial
#include "bleeding_config"
void main() {
object oPC = GetLastPlayerDying();
// Let the module know somebody is not alive
object oModule = GetModule();
SetLocalInt(oModule, "EverybodyAlive", FALSE);
// Check if they stablized, disconnected and then reconnected...
if (GetLocalInt(oPC, "PlayerHealth") != PC_HEALTH_STABLE) {
int iCurrentHitPoints = GetCurrentHitPoints(oPC);
// How bad is it doc?
if (iCurrentHitPoints == 0) {
SetLocalInt(oPC, "PlayerHealth", PC_HEALTH_DISABLED);
} else {
// Flag them as dying. We make them bleed in the module's OnHeartbeat script
SetLocalInt(oPC, "PlayerHealth", PC_HEALTH_DYING);
}
// Save their hit points in case they disconnect
SetLocalInt(oPC, "LastHitPoints", iCurrentHitPoints);
} else {
// Do nothing. Heartbeat will take care of prompting the player
}
}