#include "NW_I0_SPELLS" void main() { //Declare major variables object oCaster = GetAreaOfEffectCreator(); effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID); effect eVis3 = EffectVisualEffect(VFX_IMP_DEATH); effect eDrain = EffectNegativeLevel(2); effect eDeath = EffectDeath(); effect eBoost = EffectTurnResistanceIncrease(4); eBoost = EffectLinkEffects(eBoost,EffectRegenerate(5,6.0)); object oTarget = GetEnteringObject(); int nRace = GetRacialType(oTarget); if ( GetLocalInt(oTarget,"NEAura") ) return; if(GetIsEnemy(oTarget, oCaster)) { if ( nRace != RACIAL_TYPE_UNDEAD ) { if ( GetHitDice(oTarget) <= 2 ) { location lWight = GetLocation(oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oTarget); object oWight = CreateObject(OBJECT_TYPE_CREATURE,"nw_wight",lWight); ChangeFaction(oWight,oCaster); return; } ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDrain,oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget); } } if ( nRace == RACIAL_TYPE_UNDEAD ) { ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT,eBoost,oTarget); } SetLocalInt(oTarget,"NEAura",1); }