Initial module commit
Initial module commit.
This commit is contained in:
49
_module/nss/69_o0_levelup.nss
Normal file
49
_module/nss/69_o0_levelup.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 69_O0_LevelUp.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This script fires whenever a player levels up.
|
||||
If the henchmen is capable of going up a level, they do.
|
||||
Place in the OnPlayerLevelUp event in Module Properties
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: 2002
|
||||
//:: Modified By: 69MEH69
|
||||
//:://////////////////////////////////////////////
|
||||
#include "69_hench_lib"
|
||||
#include "69_leadership"
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCLevellingUp();
|
||||
int nPC = GetHitDice(oPC);
|
||||
int nNth = 1;
|
||||
object oHench = GetHenchman(oPC, nNth);
|
||||
int nNewClass, nClassPackage;
|
||||
//Check for Leadership
|
||||
int nLeadership = GetLocalInt(GetModule(), "nLeadership");
|
||||
if(nLeadership == 1)
|
||||
{
|
||||
//Resets Maximum Henchmen
|
||||
SetMaxHenchmen69(oPC);
|
||||
GetMaxHenchmen69(oPC);
|
||||
}
|
||||
//Check for Henchman XP
|
||||
int HENCH_XP = GetLocalInt(GetModule(), "HENCHXP");
|
||||
if(HENCH_XP == 0)
|
||||
{
|
||||
while(GetIsObjectValid(oHench))
|
||||
{
|
||||
if(GetCanLevelUp69(oPC, oHench))
|
||||
{
|
||||
AssignCommand(oHench, SpeakString("Leveling Up"));
|
||||
CheckHenchClass69(oHench);
|
||||
nNewClass = GetLocalInt(oHench, "NewClass");
|
||||
nClassPackage = GetLocalInt(oHench, "ClassPackage");
|
||||
LevelUpHenchman69(oHench, oPC);
|
||||
}
|
||||
oHench = GetHenchman(oPC, ++nNth);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user