27 lines
857 B
Plaintext
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");
|
|
}
|