try
{
Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
L2Spawn sp = new L2Spawn(NpcTable.getTemplate(MOBS));
sp.setLoc(pos);
L2NpcInstance npc = sp.doSpawn(true);
if(caster.isPet() || caster.isSummon())
{
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, caster, Rnd.get(2, 100));
}
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, caster.getPlayer(), Rnd.get(1, 100));