Package l2p.extensions.multilang

Examples of l2p.extensions.multilang.CustomMessage


      // accept the wedding request
      player.setMaryAccepted(true);
      Couple couple = CoupleManager.getInstance().getCouple(player.getCoupleId());
      couple.marry();
      //messages to the couple
      player.sendMessage(new CustomMessage("l2p.gameserver.model.instances.L2WeddingManagerMessage", player));
      player.setMaried(true);
      player.setMaryRequest(false);
      ptarget.sendMessage(new CustomMessage("l2p.gameserver.model.instances.L2WeddingManagerMessage", ptarget));
      ptarget.setMaried(true);
      ptarget.setMaryRequest(false);
      //wedding march
      player.broadcastPacket(new MagicSkillUse(player, player, 2230, 1, 1, 0));
      ptarget.broadcastPacket(new MagicSkillUse(ptarget, ptarget, 2230, 1, 1, 0));
View Full Code Here


    {
      return;
    }
    if(cha.isBlocked())
    {
      cha.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.RequestRestart.OutOfControl", cha));
      return;
    }
    if(cha.isInStoreMode())
    {
      cha.sendPacket(Msg.YOU_CANNOT_FORWARD_BECAUSE_THE_PRIVATE_SHOP_OR_WORKSHOP_IS_IN_PROGRESS);
View Full Code Here

  {
    for(L2Player player : L2World.getAroundPlayers(npc, 4000, 1000))
    {
      if(player != null && !player.isBlockAll())
      {
        String[] m = new CustomMessage(msg, player).addNumber(arenaId).toString().split(": ");
        player.sendPacket(new Say2(0, Say2C.SHOUT, m[0], m[1]));
      }
    }
  }
View Full Code Here

   */
  private boolean checkIfCanRegister(L2Player player)
  {
    if(player.getClan() == null || player.getClan().getLevel() < getSiegeClanMinLevel())
    {
      player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.ClanLevelToSmall", player).addNumber(getSiegeClanMinLevel()));
      return false;
    }
    if(player.getClan().getHasCastle() > 0 && getSiegeUnit().getType() == ResidenceType.Castle)
    {
      player.sendPacket(Msg.A_CLAN_THAT_OWNS_A_CASTLE_CANNOT_PARTICIPATE_IN_ANOTHER_SIEGE);
      return false;
    }
    if(player.getClan().getClanId() == getSiegeUnit().getOwnerId())
    {
      player.sendPacket(Msg.THE_CLAN_THAT_OWNS_THE_CASTLE_IS_AUTOMATICALLY_REGISTERED_ON_THE_DEFENDING_SIDE);
      return false;
    }
    if(SiegeDatabase.checkIsRegistered(player.getClan(), getSiegeUnit().getId()))
    {
      player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.AlreadyRegistered", player));
      return false;
    }
    if(isRegistrationOver())
    {
      player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.DeadlinePassed", player).addString(getSiegeUnit().getName()));
      return false;
    }
    if(isInProgress())
    {
      player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.NotTimeToCancel", player));
      return false;
    }
    if(getSiegeUnit().getType() == ResidenceType.Fortress)
    {
      // Нельзя регистрироваться на осаду фортов, если прошло менее двух часов после начала последней его осады
      if(getSiegeUnit().getLastSiegeDate() * 1000 + 2 * 60 * 60 * 1000 > System.currentTimeMillis())
      {
        player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.DeadlinePassed", player).addString(getSiegeUnit().getName()));
        return false;
      }
      // Нельзя регистрироваться на осаду фортов за 2 часа до битв за земли
      if(TerritorySiege.getSiegeDate().getTimeInMillis() > System.currentTimeMillis() && TerritorySiege.getSiegeDate().getTimeInMillis() - System.currentTimeMillis() < 2 * 60 * 60 * 1000)
      {
        player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.DeadlinePassed", player).addString(getSiegeUnit().getName()));
        return false;
      }
      // Владельцам замка нельзя атаковать присягнувшие крепости.
      if(player.getClan().getHasCastle() > 0 && ((Fortress) getSiegeUnit()).getCastleId() == player.getClan().getHasCastle() && ((Fortress) getSiegeUnit()).getFortState() == 2)
      {
View Full Code Here

  public void registerDefender(L2Player player, boolean force)
  {
    if(getSiegeUnit().getOwnerId() <= 0)
    {
      player.sendMessage(new CustomMessage("l2p.gameserver.model.entity.siege.Siege.OwnedByNPC", player).addString(getSiegeUnit().getName()));
    }
    else if(force || checkIfCanRegister(player))
    {
      _database.saveSiegeClan(player.getClan(), 2);
    } // Save to database
View Full Code Here

      }
      if(tax > 0)
      {
        seller.reduceAdena(tax, true);
        Stat.addTax(tax);
        seller.sendMessage(new CustomMessage("trade.HavePaidTax", seller).addNumber(tax));
      }
      temp = buyerInv.addItem(TransferItem);
      Log.LogItem(buyer, seller, Log.PrivateStoreBuy, TransferItem, amount);
      if(!temp.isStackable())
      {
View Full Code Here

        continue;
      }
      L2Item item = ItemTable.getInstance().getTemplate(itemId);
      if (item.getReferencePrice() / 2 > itemPrice)
      {
        activeChar.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.SetPrivateStoreBuyList.TooLowPrice", activeChar).addItemName(item).addNumber(item.getReferencePrice() / 2));
        continue;
      }
     
      // char wants to buy item that he doesn't have
      if (activeChar.getInventory().getItemByItemId(itemId) == null)
View Full Code Here

      return;
    }
    L2Clan clan = ClanTable.getInstance().getClanByName(_pledgeName);
    if(clan == null)
    {
      activeChar.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.RequestStopPledgeWar.NoSuchClan", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    if(!playerClan.isAtWarWith(clan.getClanId()))
    {
View Full Code Here

      if(activeChar.getNoChannelRemained() > 0 || activeChar.getNoChannel() < 0)
      {
        if(activeChar.getNoChannel() > 0)
        {
          int timeRemained = Math.round(activeChar.getNoChannelRemained() / 60000);
          activeChar.sendMessage(new CustomMessage("common.ChatBanned", activeChar).addNumber(timeRemained));
        }
        else
        {
          activeChar.sendMessage(new CustomMessage("common.ChatBannedPermanently", activeChar));
        }
        activeChar.sendActionFailed();
        return;
      }
      activeChar.updateNoChannel(0);
View Full Code Here

      clan.setAllyId(0);
      clan.setLeavedAlly();
      alliance.broadcastAllyStatus(true);
      alliance.removeAllyMember(clan.getClanId());
      alliance.setExpelledMember();
      activeChar.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.RequestOustAlly.ClanDismissed", activeChar).addString(clan.getName()).addString(alliance.getAllyName()));
    }
  }
View Full Code Here

TOP

Related Classes of l2p.extensions.multilang.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.