home *** CD-ROM | disk | FTP | other *** search
/ PC Zone 125 / DPPCZ0203B.7z / DPPCZ0203B.ISO / Demos / Neverwinter / data1.cab / override / nw_s1_pulsspore.nss < prev    next >
Text File  |  2002-09-10  |  2KB  |  43 lines

  1. //::///////////////////////////////////////////////
  2. //:: Vrock Spores
  3. //:: NW_S1_PulsSpore
  4. //:: Copyright (c) 2001 Bioware Corp.
  5. //:://////////////////////////////////////////////
  6. /*
  7.     A wave of disease spreads out from the creature
  8.     and infects all those within 10ft
  9. */
  10. //:://////////////////////////////////////////////
  11. //:: Created By: Preston Watamaniuk
  12. //:: Created On: Jan 8, 2002
  13. //:://////////////////////////////////////////////
  14.  
  15. void main()
  16. {
  17.     //Declare major variables
  18.     float fDelay;
  19.     effect eDisease;
  20.     effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE);
  21.     ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
  22.     //Get first target in spell area
  23.     object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
  24.     while(GetIsObjectValid(oTarget))
  25.     {
  26.         if(oTarget != OBJECT_SELF)
  27.         {
  28.             if(!GetIsReactionTypeFriendly(oTarget))
  29.             {
  30.                 //Fire cast spell at event for the specified target
  31.                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DISEASE));
  32.                 //Determine effect delay
  33.                 fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
  34.                 eDisease = EffectDisease(DISEASE_SOLDIER_SHAKES);
  35.                 //Apply the VFX impact and effects
  36.                 DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget));
  37.             }
  38.         }
  39.         //Get next target in spell area
  40.         oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
  41.     }
  42. }
  43.