Package lineage2.gameserver.network.serverpackets.components

Examples of lineage2.gameserver.network.serverpackets.components.CustomMessage


    if (cha.getPartnerId() != 0)
    {
      Player partner = GameObjectsStorage.getPlayer(cha.getPartnerId());
      if (partner != null)
      {
        partner.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.CoupleManager.PartnerEntered", partner));
      }
    }
  }
View Full Code Here


    }
    if (player.isGM())
    {
      player.sendMessage("Roulette balance: " + Util.formatAdena(GameStats.getRouletteSum()));
    }
    ret = ret.replace("%bettype%", new CustomMessage("Roulette." + type.toString(), player).toString());
    ret = ret.replace("%betnumber%", type == GameType.StraightUp ? betID : new CustomMessage("Roulette." + betID, player).toString());
    ret = ret.replace("%number%", roll[0]);
    ret = ret.replace("%color%", new CustomMessage("Roulette." + roll[1], player).toString());
    ret = ret.replace("%evenness%", new CustomMessage("Roulette." + roll[4], player).toString());
    ret = ret.replace("%column%", new CustomMessage("Roulette." + roll[3], player).toString());
    ret = ret.replace("%dozen%", new CustomMessage("Roulette." + roll[2], player).toString());
    ret = ret.replace("%highness%", new CustomMessage("Roulette." + roll[5], player).toString());
    ret = ret.replace("%param%", param[0] + " " + param[1] + " " + param[2]);
    show(ret, player);
  }
View Full Code Here

  public String getHtmlAppends(Integer val)
  {
    Player player = getSelf();
    if (Config.SERVICES_ALLOW_ROULETTE)
    {
      return "<br><a action=\"bypass -h scripts_services.Roulette:dialog\">" + new CustomMessage("Roulette.dialog", player).toString() + "</a>";
    }
    return "";
  }
View Full Code Here

        }
        long tax = TradeHelper.getTax(seller, totalCost);
        if (tax > 0)
        {
          totalCost -= tax;
          seller.sendMessage(new CustomMessage("trade.HavePaidTax", seller).addNumber(tax));
        }
        seller.addAdena(totalCost);
        buyer.saveTradeList();
      }
      finally
View Full Code Here

  public void start(String[] var)
  {
    Player player = getSelf();
    if (var.length != 2)
    {
      show(new CustomMessage("common.Error", player), player);
      return;
    }
    Integer category;
    Integer autoContinue;
    try
    {
      category = Integer.valueOf(var[0]);
      autoContinue = Integer.valueOf(var[1]);
    }
    catch (Exception e)
    {
      show(new CustomMessage("common.Error", player), player);
      return;
    }
    _category = category;
    _autoContinue = autoContinue;
    if (_category == -1)
    {
      _minLevel = 1;
      _maxLevel = 99;
    }
    else
    {
      _minLevel = getMinLevelForCategory(_category);
      _maxLevel = getMaxLevelForCategory(_category);
    }
    if (_endTask != null)
    {
      show(new CustomMessage("common.TryLater", player), player);
      return;
    }
    _status = 0;
    _isRegistrationActive = true;
    _time_to_start = Config.EVENT_TvTTime;
View Full Code Here

  {
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
    {
      if ((player != null) && !player.isDead() && (player.getLevel() >= _minLevel) && (player.getLevel() <= _maxLevel) && player.getReflection().isDefault() && !player.isInOlympiadMode() && !player.isInObserverMode())
      {
        player.scriptRequest(new CustomMessage("scripts.events.TvT.AskPlayer", player).toString(), "events.TvT.TvT:addPlayer", new Object[0]);
      }
    }
  }
View Full Code Here

    }
    if (team == 1)
    {
      players_list1.add(player.getStoredId());
      live_list1.add(player.getStoredId());
      show(new CustomMessage("scripts.events.TvT.Registered", player), player);
    }
    else if (team == 2)
    {
      players_list2.add(player.getStoredId());
      live_list2.add(player.getStoredId());
      show(new CustomMessage("scripts.events.TvT.Registered", player), player);
    }
    else
    {
      _log.info("WTF??? Command id 0 in TvT...");
    }
View Full Code Here

   */
  public static boolean checkPlayer(Player player, boolean first)
  {
    if (first && (!_isRegistrationActive || player.isDead()))
    {
      show(new CustomMessage("scripts.events.Late", player), player);
      return false;
    }
    if (first && (players_list1.contains(player.getStoredId()) || players_list2.contains(player.getStoredId())))
    {
      show(new CustomMessage("scripts.events.TvT.Cancelled", player), player);
      return false;
    }
    if ((player.getLevel() < _minLevel) || (player.getLevel() > _maxLevel))
    {
      show(new CustomMessage("scripts.events.TvT.CancelledLevel", player), player);
      return false;
    }
    if (player.isMounted())
    {
      show(new CustomMessage("scripts.events.TvT.Cancelled", player), player);
      return false;
    }
    if (player.isInDuel())
    {
      show(new CustomMessage("scripts.events.TvT.CancelledDuel", player), player);
      return false;
    }
    if (player.getTeam() != TeamType.NONE)
    {
      show(new CustomMessage("scripts.events.TvT.CancelledOtherEvent", player), player);
      return false;
    }
    if ((player.getOlympiadGame() != null) || (first && Olympiad.isRegistered(player)))
    {
      show(new CustomMessage("scripts.events.TvT.CancelledOlympiad", player), player);
      return false;
    }
    if (player.isTeleporting())
    {
      show(new CustomMessage("scripts.events.TvT.CancelledTeleport", player), player);
      return false;
    }
    return true;
  }
View Full Code Here

    if (player != null)
    {
      live_list1.remove(player.getStoredId());
      live_list2.remove(player.getStoredId());
      player.setTeam(TeamType.NONE);
      show(new CustomMessage("scripts.events.TvT.YouLose", player), player);
    }
  }
View Full Code Here

      st.setState(Quest.STARTED);
      st.setCond(1);
    }
    else
    {
      player.sendMessage(new CustomMessage("Quest._464_Oath.QuestCannotBeTaken", player));
      return false;
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.components.CustomMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.