78 lines
2.0 KiB
Plaintext
78 lines
2.0 KiB
Plaintext
|
///::///////////////////////////////////////////////
|
||
|
//:: Animate Dead
|
||
|
//:: NW_S0_AnimDead.nss
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Summons a powerful skeleton or zombie depending
|
||
|
on caster level.
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Preston Watamaniuk
|
||
|
//:: Created On: April 11, 2001
|
||
|
//:://////////////////////////////////////////////
|
||
|
|
||
|
#include "x2_inc_spellhook"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
/*
|
||
|
Spellcast Hook Code
|
||
|
Added 2003-06-23 by GeorgZ
|
||
|
If you want to make changes to all spells,
|
||
|
check x2_inc_spellhook.nss to find out more
|
||
|
|
||
|
*/
|
||
|
|
||
|
if (!X2PreSpellCastCode())
|
||
|
{
|
||
|
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// End of Spell Cast Hook
|
||
|
|
||
|
|
||
|
//Declare major variables
|
||
|
int nMetaMagic = GetMetaMagicFeat();
|
||
|
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||
|
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||
|
nDuration = 1;
|
||
|
// this is one hour, ie 12 mins
|
||
|
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||
|
effect eSummon;
|
||
|
//Metamagic extension if needed
|
||
|
if (nMetaMagic == METAMAGIC_EXTEND)
|
||
|
{
|
||
|
nDuration = nDuration * 2; //Duration is +100%
|
||
|
}
|
||
|
//Summon the appropriate creature based on the summoner level
|
||
|
if (nCasterLevel <= 5)
|
||
|
{
|
||
|
//Tyrant Fog Zombie
|
||
|
eSummon = EffectSummonCreature("jw_anizom",VFX_FNF_SUMMON_UNDEAD);
|
||
|
}
|
||
|
else if ((nCasterLevel >= 6) && (nCasterLevel <= 9))
|
||
|
{
|
||
|
//Skeleton Warrior
|
||
|
eSummon = EffectSummonCreature("jw_ani_skelwar",VFX_FNF_SUMMON_UNDEAD);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
//Skeleton Chieftain
|
||
|
eSummon = EffectSummonCreature("jw_aniskelchief",VFX_FNF_SUMMON_UNDEAD);
|
||
|
}
|
||
|
//Apply the summon visual and summon the two undead.
|
||
|
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||
|
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|