Scriptname nRoFScript extends activemagiceffect  

import utility

actor me
actor he
objectreference obj1
objectreference obj2
int count=0

Event OnEffectStart(Actor akTarget, Actor akCaster)
	me = akCaster
	he = akTarget
	obj1 = he.placeatme(aSource)
	obj2 = he.placeatme(aTarget)
while count < iProjNum
	obj1.SetPosition((he.GetPositionX() + RandomFloat(-fOffset, fOffset)), (he.GetPositionY() + RandomFloat(-fOffset, fOffset)), he.GetPositionZ() + fHeight)
	obj2.SetPosition((he.GetPositionX() + RandomFloat(-fOffset, fOffset)), (he.GetPositionY() + RandomFloat(-fOffset, fOffset)), he.GetPositionZ())
	AbToCast.RemoteCast(obj1, me, obj2)
	count += 1
	;wait(0.1)
Endwhile
wait(1.0)
obj1.delete()
obj2.delete()
Endevent

SPELL Property abToCast  Auto
Activator Property aSource  Auto  
Activator Property aTarget  Auto  
Float Property fOffset  Auto  
Float Property fHeight  Auto  
Int Property iProjNum  Auto  
