Ejemplo n.º 1
0
  /**
   * 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.");
  }
Ejemplo n.º 2
0
  @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);
    }
  }
Ejemplo n.º 3
0
 /**
  * Method announce.
  *
  * @param sm SystemMessage
  */
 private void announce(SystemMessage sm) {
   for (Player player : GameObjectsStorage.getAllPlayersForIterate()) {
     player.sendPacket(sm);
   }
 }