/** * Method checkAllDestroyed. * * @return boolean */ private static boolean checkAllDestroyed() { if (!GameObjectsStorage.getAllByNpcId(25600, true).isEmpty()) { return false; } if (!GameObjectsStorage.getAllByNpcId(25601, true).isEmpty()) { return false; } if (!GameObjectsStorage.getAllByNpcId(25602, true).isEmpty()) { return false; } return true; }
/** * Method onBypassFeedback. * * @param npc NpcInstance * @param player Player * @param command String * @see lineage2.gameserver.handlers.IBypassHandler#onBypassFeedback(NpcInstance, Player, String) */ @Override public void onBypassFeedback(NpcInstance npc, Player player, String command) { int val = Integer.parseInt(command.substring(16)); NpcInstance npcInst = GameObjectsStorage.getByNpcId(val); if (npcInst != null) { player.sendPacket(new RadarControl(2, 2, npcInst.getLoc())); player.sendPacket(new RadarControl(0, 1, npcInst.getLoc())); } }
/** * Method onTimeElapsed. * * @param task ExecutedTask */ @Override public void onTimeElapsed(ExecutedTask task) { _log.info("Recommendation Global Task: launched."); for (Player player : GameObjectsStorage.getAllPlayersForIterate()) { player.restartRecom(); } _log.info("Recommendation Global Task: completed."); }
void checkInRadius(int id, QuestState st, NpcInstance npc) { NpcInstance quest0457 = GameObjectsStorage.getByNpcId(id); if (npc.getRealDistance3D(quest0457) <= 150.0D) { st.setCond(2); if (_followTask != null) { _followTask.cancel(false); } _followTask = null; npc.stopMove(); } }
@Override public void onBypassFeedback(Player player, String command) { if (!canBypassCheck(player, this)) { return; } if (command.startsWith("start1")) { Reflection r = player.getActiveReflection(); if (r != null) { if (player.canReenterInstance(instanceId)) { player.teleToLocation(r.getTeleportLoc(), r); } } else if (player.canEnterInstance(193)) { ReflectionUtils.enterReflection(player, new AltarShilen(), instanceId); } } else if (command.startsWith("start2")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar1"); party.setVar("Altar2", "true", -1); party.teleToLocation(FLOOR2, player.getReflection()); } } else if (command.startsWith("start3")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar2"); party.setVar("Altar3", "true", -1); party.teleToLocation(FLOOR3, player.getReflection()); } } else if (command.startsWith("exit")) { for (Player party : GameObjectsStorage.getAllPlayersForIterate()) { party.unsetVar("Altar3"); party.teleToLocation(OFF, 0); } } else { super.onBypassFeedback(player, command); } }
/** Method runImpl. */ @Override public void runImpl() { for (NpcInstance npc : GameObjectsStorage.getAllByNpcId(TeleportCube, true)) { npc.deleteMe(); } }
/** * Method announce. * * @param sm SystemMessage */ private void announce(SystemMessage sm) { for (Player player : GameObjectsStorage.getAllPlayersForIterate()) { player.sendPacket(sm); } }