2024-02-11 14:01:05 -05:00
|
|
|
#include "prc_inc_assoc"
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
object oPC = OBJECT_SELF;
|
|
|
|
object oComp = GetAssociateNPC(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC, NPC_SHAMAN_COMPANION);
|
|
|
|
string sResRef = "prc_shamn_cat";
|
|
|
|
|
|
|
|
//remove previously summoned companion
|
|
|
|
if(GetIsObjectValid(oComp))
|
|
|
|
DestroyAssociate(oComp);
|
|
|
|
|
|
|
|
oComp = CreateLocalNPC(oPC, ASSOCIATE_TYPE_ANIMALCOMPANION, sResRef, GetSpellTargetLocation(), NPC_SHAMAN_COMPANION, sResRef);
|
|
|
|
AddAssociate(oPC, oComp);
|
|
|
|
|
|
|
|
int nLevel = GetLevelByClass(CLASS_TYPE_SHAMAN, oPC);
|
|
|
|
//nLevel += (GetHitDice(oPC) - nLevel) / 2;
|
|
|
|
int n;
|
|
|
|
for(n = 1; n < nLevel; n++)
|
|
|
|
LevelUpHenchman(oComp, CLASS_TYPE_INVALID, TRUE);
|
|
|
|
|
|
|
|
// Disable inventory
|
|
|
|
SetLocalInt(oComp, "X2_JUST_A_DISABLEEQUIP", TRUE);
|
|
|
|
SetNaturalWeaponDamage(oComp);
|
|
|
|
|
|
|
|
object oCompSkin = GetPCSkin(oComp);
|
2025-01-29 22:46:38 -05:00
|
|
|
|
|
|
|
effect eCheckEffect = GetFirstEffect(oPC);
|
|
|
|
while (GetIsEffectValid(eCheckEffect))
|
|
|
|
{
|
|
|
|
if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_EXALTED_COMPANION)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_EXALTED_COMPANION),1);
|
|
|
|
eCheckEffect = GetNextEffect(oPC);
|
|
|
|
}
|
2024-02-11 14:01:05 -05:00
|
|
|
//Exalted Companion
|
2025-01-29 22:46:38 -05:00
|
|
|
if((GetHasFeat(FEAT_EXALTED_COMPANION, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_EXALTED_COMPANION)))
|
2025-01-21 07:40:49 -05:00
|
|
|
&& GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD)
|
2024-02-11 14:01:05 -05:00
|
|
|
ApplyExaltedCompanion(oComp, oCompSkin);
|
|
|
|
|
|
|
|
//Talontar Blightlord's Illmaster
|
|
|
|
if(GetLevelByClass(CLASS_TYPE_BLIGHTLORD, oPC) >= 2)
|
|
|
|
ApplyIllmaster(oComp, oCompSkin);
|
|
|
|
}
|