Scriptname nDragonMechControllerScript extends activemagiceffect  

actor me
actor victim
bool brun=false

Event OnEffectStart(Actor akTarget, Actor akCaster)
    me = akCaster
    RegisterForSingleUpdate(fDelay)
Endevent

Event OnUpdate()
If me.IsInCombat()
		If warnSFX != none
			warnSFX.play(me)
		Endif
		victim = me.GetCombatTarget()
		me.DoCombatSpellApply(AbToCast[utility.RandomInt(0, 2)], victim)
   		RegisterForSingleUpdate(fRecharge + utility.RandomFloat(-fOffset, fOffset))
Else
   	RegisterForSingleUpdate(5.0)
Endif
Endevent

SPELL[] Property AbToCast  Auto  
Float Property fDelay = 30.0  Auto  
Float Property fRecharge=30.0  Auto 
Sound Property warnSFX  Auto  
Float Property fOffset=5.0  Auto  