Don't like ads? PRO users don't see any ads ;-)
Guest

Viral Lightning

By: Mellen on Dec 11th, 2012  |  syntax: None  |  size: 0.70 KB  |  hits: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Scriptname ChainLoopSCRIPT extends ActiveMagicEffect  
  2.  
  3. SPELL Property pToChain  Auto  
  4.  
  5. Event OnEffectStart(Actor akTarget, Actor akCaster)
  6.         Actor randomActor = Game.FindRandomActorFromRef(akTarget, 20.0)
  7.         Actor player = Game.GetPlayer() as Actor
  8.         int Tries = player.GetAV("magicka") as Int
  9.         bool ready = player.IsWeaponDrawn()
  10.         While (Tries >= 20)
  11.                 If ready == True               
  12.                         Utility.Wait(0.5)
  13.                         player.DamageActorValue("magicka", 20)
  14.                         Tries = player.GetAV("magicka") as Int
  15.                         pToChain.RemoteCast(akTarget, player, randomActor)
  16.                 ElseIf ready == False
  17.                         Tries = 0
  18.                         player.DispelSpell(pToChain)
  19.                         akTarget.DispelSpell(pToChain)
  20.                         randomActor.DispelSpell(pToChain)
  21.                 EndIf
  22.         EndWhile
  23. EndEvent