Scriptname aaaTKCPushawayscript extends activemagiceffect  

Activator Property FXEmptyActivator Auto
Spell Property ThunderBolt Auto
Spell Property PushResistSpell Auto
MagicEffect Property MarkPushResist Auto

Sound Property ThunderSound Auto
ObjectReference StartBox


Event OnEffectStart (Actor akTarget, Actor akCaster)

	StartBox = akTarget.placeAtMe(FXEmptyActivator)

 	if !akTarget.HasMagicEffect(MarkPushResist)
		StartBox.PushActorAway(akTarget, 15)
		PushResistSpell.Cast(akTarget,akTarget)
	endif

	Utility.Wait(0.6)
	StartBox.moveto(akTarget,0,0, 500)	
	Utility.Wait(0.01)
	ThunderBolt.RemoteCast(StartBox,akCaster,akTarget)
	ThunderSound.Play(akTarget)
	StartBox.Delete()

EndEvent