Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
26
_module/nss/nhi_en2deaths.nss
Normal file
26
_module/nss/nhi_en2deaths.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//::
|
||||
//:: 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");
|
||||
}
|
Reference in New Issue
Block a user