@Override protected void onEvtAttacked(Creature attacker, int damage) { if (attacker == null || attacker.getPlayer() == null) return; for (NpcInstance minion : World.getAroundNpc(getActor(), 3000, 2000)) if (minion.getNpcId() == 22358 || minion.getNpcId() == 22357) minion.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 5000); if (!_attacked) { Functions.npcSay(getActor(), "Fool, you and your friends will die! Attack!"); _attacked = true; } }
private void AddAgression(Playable player, int aggro) { if (player == null) return; for (NpcInstance mob : _spawn.getAllSpawned()) { mob.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, aggro); } }