EN4_PRC8/_module/nss/nhi_en2deaths.nss
Jaysyn904 b464d8da05 Initial Commit
Initial Commit [v1.32PRC8]
2025-04-03 13:38:45 -04:00

27 lines
857 B
Plaintext

//::
//:: nhi_en2deaths.nss
//::
#include "utl_i_sqluuid"
void main()
{
object oPC = GetPCSpeaker();
int iLevel = GetHitDice(oPC);
int iDeaths = SQLocalsUUID_GetInt(oPC,"PCDeaths");
int iDeathAllowed = 3 + iLevel - SQLocalsUUID_GetInt(oPC,"PCEnterLevel");
if (SQLocalsUUID_GetInt(oPC,"PCHardCoreSpecial") == 1)
iDeathAllowed = (iLevel + 5) / 10;
if (SQLocalsUUID_GetInt(oPC,"PCHardcore") == 1 || SQLocalsUUID_GetInt(oPC,"PCHardCorePNP") == 1)
iDeathAllowed = 0;
if (iDeathAllowed == 1)
SetCustomToken(199,"You have " + IntToString(iDeathAllowed) + " life left.");
else
SetCustomToken(199,"You have " + IntToString(iDeathAllowed - iDeaths) + " lives left.");
//SpeakString("You have " + IntToString(iDeathAllowed - iDeaths) + " lives left before you are sent to the abyss");
}