WoR_PRC8/_module/nss/rhun_on_plvlup.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

31 lines
707 B
Plaintext

//#include "sha_subr_methds"
#include "inc_npc"
void main()
{
//SubraceOnPlayerLevelUp(); //:: Replaced by PRC
object oPC = GetPCLevellingUp();
int nHD = GetHitDice(oPC);
int nNewXP = ((nHD * (nHD-1)) / 2 * 1000);
int nCurrXP = GetXP(oPC);
int nOverflow = nCurrXP-nNewXP;
int nCohort = GetPersistantLocalInt(oPC, "RegisteringAsCohort");
if(nCohort > 0)
{
return;
}
if (GetTag(GetArea(oPC)) != "TESTINGAREA" && GetTag(GetArea(oPC)) != "ATranquilGrove")
{
if (nOverflow > 100)
nOverflow = 100;
}
SetXP(oPC,nNewXP+nOverflow);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_UNDEAD_DRAGON), oPC);
}