@Override protected void handleDied() { cancelPhaseTask(); if (getNpcId() == 217309) { sendMsg(1500390); spawn(217310, 238.160f, 598.624f, 178.480f, (byte) 0); deleteHelpers(); AI2Actions.deleteOwner(this); } else { sendMsg(1500391); final WorldMapInstance instance = getPosition().getWorldMapInstance(); if (instance != null) { final Npc ariana = instance.getNpc(799668); if (ariana != null) { ariana.getEffectController().removeEffect(19921); ThreadPoolManager.getInstance() .schedule( new Runnable() { @Override public void run() { ariana.getSpawn().setWalkerId("30028000016"); WalkManager.startWalking((NpcAI2) ariana.getAi2()); } }, 1000); NpcShoutsService.getInstance().sendMsg(ariana, 1500415, ariana.getObjectId(), 0, 4000); NpcShoutsService.getInstance().sendMsg(ariana, 1500416, ariana.getObjectId(), 0, 13000); ThreadPoolManager.getInstance() .schedule( new Runnable() { @Override public void run() { if (instance != null) { SkillEngine.getInstance() .getSkill(ariana, 19358, 60, ariana) .useNoAnimationSkill(); instance.getDoors().get(145).setOpen(true); deleteNpcs(instance.getNpcs(701156)); ThreadPoolManager.getInstance() .schedule( new Runnable() { @Override public void run() { if (ariana != null && !NpcActions.isAlreadyDead(ariana)) { NpcActions.delete(ariana); } } }, 13000); } } }, 13000); } } } super.handleDied(); }
private void spawnServant() { Npc healServant = getPosition().getWorldMapInstance().getNpc(282988); if (healServant == null) { rndSpawn(282988, Rnd.get(1, 3)); NpcShoutsService.getInstance().sendMsg(getOwner(), 341784, getObjectId(), 0, 0); } }
@Override protected void handleDied() { super.handleDied(); Npc freeTerma = (Npc) spawn(205495, 455.94f, 537.06f, 132.6f, (byte) 0); spawn(701009, 451.706f, 534.313f, 131.979f, (byte) 0); NpcShoutsService.getInstance().sendMsg(freeTerma, 1500444, freeTerma.getObjectId(), 0, 3000); }
@Override protected void handleSpawned() { super.handleSpawned(); int owner = getOwner().getNpcId(); switch (owner) { case 283913: NpcShoutsService.getInstance() .sendMsg(getOwner(), 1500679, getOwner().getObjectId(), 0, 2000); break; case 283914: NpcShoutsService.getInstance() .sendMsg(getOwner(), 1500680, getOwner().getObjectId(), 0, 2000); break; case 283915: NpcShoutsService.getInstance() .sendMsg(getOwner(), 1500681, getOwner().getObjectId(), 0, 2000); break; case 283916: NpcShoutsService.getInstance() .sendMsg(getOwner(), 1500682, getOwner().getObjectId(), 0, 2000); break; } despawn(); }
private void sendMsg(int msg) { NpcShoutsService.getInstance().sendMsg(getOwner(), msg, getObjectId(), 0, 0); }
private void shout_died() { NpcShoutsService.getInstance().sendMsg(getOwner(), 1501105, getObjectId(), 0, 3000); }