HiddenTradition_PRC8/_module/nss/ht5_mod_levelup.nss
Jaysyn904 d5e54b1f5d Fixed XP exploit
Fixed XP exploit.  Full compile.  Updated release archive.
2024-10-05 22:02:39 -04:00

36 lines
871 B
Plaintext

//::///////////////////////////////////////////////
//:: ht5_mod_levelup.nss
//::
//:://////////////////////////////////////////////
#include "nw_i0_henchman"
#include "nw_i0_generic"
void main()
{
object oPC = GetPCLevellingUp();
int nHD = GetHitDice(oPC);
if (GetIsObjectValid(oPC) == TRUE)
{
object oHench = GetHenchman(oPC);
if (GetIsObjectValid(oHench) == TRUE)
{
if (GetCanLevelUp(oPC, oHench) == TRUE)
{
object oNew = DoLevelUp(oPC, oHench);
if (GetIsObjectValid(oNew) == TRUE)
{
DelayCommand(1.0,AssignCommand(oNew, EquipAppropriateWeapons(oPC)));
}
}
}
if (nHD > 1)
{
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
SetXP(oPC, nMin);
}
}
}