//:://///////////////////////////////////////////// //:: Gate //:: NW_S0_Gate.nss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// //:: Summons a Balor to fight for the caster. //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: April 12, 2001 //::////////////////////////////////////////////// void CreateBalor(); #include "x2_inc_spellhook" #include "inc_multisummon" void main() { /* Spellcast Hook Code Added 2003-06-20 by Georg 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); effect eSummon; effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE); //Make metamagic extend check if (nMetaMagic == METAMAGIC_EXTEND) { nDuration = nDuration *2; //Duration is +100% } //Summon the Balor and apply the VFX impact if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) || GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) || GetHasSpellEffect(SPELL_HOLY_AURA)) { int nFNF_Effect = VFX_FNF_SUMMON_GATE; string sSummon = "NW_S_BALOR"; PrimoEffectSummonCreature(sSummon, nFNF_Effect, GetSpellTargetLocation(), DURATION_TYPE_TEMPORARY, RoundsToSeconds(nDuration), 3.0); } else { effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); DelayCommand(3.0, CreateBalor()); } } void CreateBalor() { CreateObject(OBJECT_TYPE_CREATURE, "NW_S_BALOR_EVIL", GetSpellTargetLocation()); }