void main() { location lTargetLoc; effect eLight = EffectVisualEffect(VFX_IMP_LIGHTNING_M); int nXPos, nYPos; object oTargetArea = GetArea(OBJECT_SELF); vector vNewVector; int x=0; object oMonster; float DELAY = 0.5; if(GetLocalInt(OBJECT_SELF,"IS_ACTIVE") == 0) { for(x=0;x<2;++x) { vNewVector = GetPositionFromLocation(GetLocation(OBJECT_SELF)); nXPos = Random(10) - 5; nYPos = Random(10) - 5; vNewVector.x += nXPos; vNewVector.y += nYPos; lTargetLoc = Location(oTargetArea, vNewVector, 0.0); oMonster = CreateObject(OBJECT_TYPE_CREATURE, "stormconjurer", lTargetLoc); DelayCommand(DELAY,ApplyEffectToObject(DURATION_TYPE_INSTANT,eLight,oMonster)); } SetLocalInt(OBJECT_SELF,"IS_ACTIVE",1); DelayCommand(600.0,SetLocalInt(OBJECT_SELF,"IS_ACTIVE",0)); } }