#include "x0_i0_position" void summonFX(location lLoc) { effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1); ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVis,lLoc); } void main() { object oCaster = OBJECT_SELF; float fOrient = GetFacing(oCaster); object oArea = GetArea(oCaster); location lNewSummon; vector vNewSpot; object oSummon; int nType = d2(); string sRef; int nNum; if ( nType == 1 ) { sRef = "summonedyoungadu"; nNum = d2(2); } else { sRef = "summonedtrollske"; nNum = d2(3); } while ( nNum > 0 ) { vNewSpot = GetPosition(oCaster); vNewSpot = GetChangedPosition(vNewSpot,5.0,IntToFloat(Random(360))); lNewSummon = Location(oArea,vNewSpot,fOrient); oSummon = CreateObject(OBJECT_TYPE_CREATURE,sRef,lNewSummon); ChangeFaction(oSummon,oCaster); lNewSummon = GetLocation(oSummon); DelayCommand(1.0,summonFX(lNewSummon)); nNum--; } }