Initial Commit

Initial Commit
This commit is contained in:
Jaysyn904
2025-04-03 11:24:16 -04:00
parent 3ba3cf1b81
commit 5e558169a0
6086 changed files with 1502996 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
// 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();
if (GetLocalInt(oPC,"arena"))
{
SetLocalInt(oPC, "PlayerHealth", PC_HEALTH_DEAD);
}
else
{
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_DYING);
} 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
}
}
}