36 lines
871 B
Plaintext
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);
|
|
}
|
|
}
|
|
} |