Files
HeroesStone_PRC8/_removed/x2_s2_sumundead.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

90 lines
2.6 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Summon Undead
//:: X2_S2_SumUndead
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
The level of the Pale Master determines the
type of undead that is summoned.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Feb 05, 2003
//:: Updated By: Georg Zoeller, Oct 2003
//:://////////////////////////////////////////////
#include "inc_multisummon"
void PMUpgradeSummon(object oSelf, string sScript)
{
object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oSelf);
ExecuteScript ( sScript, oSummon);
}
void main()
{
//Declare major variables
int nCasterLevel = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF);
int nDuration = 14 + nCasterLevel;
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
string sResRef;
int nVisID;
int bAppear;
//Summon the appropriate creature based on the summoner level
if (nCasterLevel <= 5)
{
//Ghoul
sResRef = "NW_S_GHOUL";
nVisID = VFX_IMP_HARM;
}
else if (nCasterLevel == 6)
{
//Shadow
sResRef = "NW_S_SHADOW";
nVisID = VFX_IMP_HARM;
}
else if (nCasterLevel == 7)
{
//Ghast
sResRef = "NW_S_GHAST";
nVisID = VFX_IMP_HARM;
bAppear = TRUE;
}
else if (nCasterLevel == 8)
{
//Wight
sResRef = "NW_S_WIGHT";
nVisID = VFX_IMP_HARM;
bAppear = TRUE;
}
else if (nCasterLevel >= 9)
{
//Wraith
sResRef = "X2_S_WRAITH";
nVisID = VFX_IMP_HARM;
bAppear = TRUE;
}
// * Apply the summon visual and summon the two undead.
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_10),GetSpellTargetLocation());
if(GetLocalInt(GetModule(), "PnPSummonDuration")==FALSE)
PrimoEffectSummonCreature(sResRef,nVisID, GetSpellTargetLocation(),
DURATION_TYPE_TEMPORARY, HoursToSeconds(nDuration), 0.0, 0.0,
bAppear);
else
PrimoEffectSummonCreature(sResRef,nVisID, GetSpellTargetLocation(),
DURATION_TYPE_TEMPORARY, RoundsToSeconds(nDuration-14), 0.0, 0.0,
bAppear);
// * If the character has a special pale master item equipped (variable set via OnEquip)
// * run a script on the summoned monster.
// string sScript = GetLocalString(OBJECT_SELF,"X2_S_PM_SPECIAL_ITEM");
// if (sScript != "")
// {
// object oSelf = OBJECT_SELF;
// DelayCommand(1.0,PMUpgradeSummon(oSelf,sScript));
// }
}