PoA_PRC8/_module/_removed files/x2_s2_sumundead.nss
Jaysyn904 151d074880 Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
2022-10-10 10:39:34 -04:00

73 lines
2.3 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
//:://////////////////////////////////////////////
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);
effect eSummon;
//Summon the appropriate creature based on the summoner level
if (nCasterLevel <= 6)
{
//Ghoul
eSummon = EffectSummonCreature("shadow01",VFX_IMP_HARM,0.0f,0);
}
else if (nCasterLevel <= 8)
{
//Shadow
eSummon = EffectSummonCreature("doomknight01",VFX_IMP_HARM,0.0f,0);
}
else if (nCasterLevel <= 10)
{
//Ghast
eSummon = EffectSummonCreature("shadfiend01",VFX_IMP_HARM,0.0f,1);
}
else if (nCasterLevel <= 14)
{
//Wight
eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD,0.0f,1);
}
else if (nCasterLevel >= 15)
{
//Wraith
eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD,0.0f,1);
}
// * Apply the summon visual and summon the two undead.
// * ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_10),GetSpellTargetLocation());
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
// * 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));
}
}