Package lineage2.gameserver.network.serverpackets.components

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


        player.getBonus().setDropSpoil(1.);
        if (player.getParty() != null)
        {
          player.getParty().recalculatePartyData();
        }
        String msg = new CustomMessage("scripts.services.RateBonus.LuckEnded", player).toString();
        player.sendPacket(new ExShowScreenMessage(msg, 10000, ScreenMessageAlign.TOP_CENTER, true), new ExBR_PremiumState(player, false));
        player.sendMessage(msg);
        if (Config.SERVICES_RATE_TYPE == Bonus.BONUS_GLOBAL_ON_GAMESERVER)
        {
          AccountBonusDAO.getInstance().delete(player.getAccountName());
View Full Code Here


        }
        if (_mode == 1)
        {
          if (sponsor.hasApprentice())
          {
            activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestOustAlly.MemberAlreadyHasApprentice", activeChar));
            return;
          }
          if (apprentice.hasSponsor())
          {
            activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestOustAlly.ApprenticeAlreadyHasSponsor", activeChar));
            return;
          }
          sponsor.setApprentice(apprentice.getObjectId());
          clan.broadcastToOnlineMembers(new PledgeShowMemberListUpdate(apprentice));
          clan.broadcastToOnlineMembers(new SystemMessage(SystemMessage.S2_HAS_BEEN_DESIGNATED_AS_THE_APPRENTICE_OF_CLAN_MEMBER_S1).addString(sponsor.getName()).addString(apprentice.getName()));
        }
        else
        {
          if (!sponsor.hasApprentice())
          {
            activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestOustAlly.MemberHasNoApprentice", activeChar));
            return;
          }
          sponsor.setApprentice(0);
          clan.broadcastToOnlineMembers(new PledgeShowMemberListUpdate(apprentice));
          clan.broadcastToOnlineMembers(new SystemMessage(SystemMessage.S2_CLAN_MEMBER_S1S_APPRENTICE_HAS_BEEN_REMOVED).addString(sponsor.getName()).addString(apprentice.getName()));
        }
        if (apprentice.isOnline())
        {
          apprentice.getPlayer().broadcastCharInfo();
        }
        activeChar.sendPacket(new PledgeReceiveMemberInfo(sponsor));
      }
    }
    else
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestOustAlly.NoMasterRights", activeChar));
    }
  }
View Full Code Here

    }
    final String price;
    String append = "";
    price = Util.formatAdena((long) (RECIPE_PRICE * Config.EVENT_MARCH8_PRICE_RATE));
    append += "<br><a action=\"bypass -h scripts_events.March8.March8:buyrecipe\">";
    append += new CustomMessage("scripts.events.March8.buyrecipe", getSelf()).addString(price);
    append += "</a><br>";
    return append;
  }
View Full Code Here

    {
      if (!ref.isDefault())
      {
        for (Player p : ref.getPlayers())
        {
          p.sendMessage(new CustomMessage("scripts.ai.freya.FreyaFailure", p));
        }
        ref.collapse();
      }
    }
    super.thinkActive();
View Full Code Here

    {
      return false;
    }
    if (getNoblePoints(noble.getObjectId()) < 3)
    {
      noble.sendMessage(new CustomMessage("lineage2.gameserver.model.entity.Olympiad.LessPoints", noble));
      return false;
    }
    if (noble.getOlympiadGame() != null)
    {
      return false;
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);
        seller.saveTradeList();
      }
      finally
View Full Code Here

    {
      if (!ref.isDefault())
      {
        for (Player p : ref.getPlayers())
        {
          p.sendMessage(new CustomMessage("scripts.ai.freya.FreyaFailure", p));
        }
        ref.collapse();
      }
    }
    super.thinkActive();
View Full Code Here

    {
      return;
    }
    if (changed)
    {
      Functions.show(new CustomMessage("scripts.commands.user.password.ResultTrue", activeChar), activeChar);
    }
    else
    {
      Functions.show(new CustomMessage("scripts.commands.user.password.ResultFalse", activeChar), activeChar);
    }
  }
View Full Code Here

      activeChar.sendActionFailed();
      return;
    }
    if (!activeChar.isClanLeader())
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.ChangeAffiliations", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    UnitMember subject = clan.getAnyMember(_subjectName);
    if (subject == null)
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.NotInYourClan", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    if (subject.getPledgeType() == _targetUnit)
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.AlreadyInThatCombatUnit", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    if ((_targetUnit != 0) && (clan.getSubUnit(_targetUnit) == null))
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.NoSuchCombatUnit", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    if (Clan.isAcademy(_targetUnit))
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.AcademyViaInvitation", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    if (Clan.isAcademy(subject.getPledgeType()))
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CantMoveAcademyMember", activeChar));
      activeChar.sendActionFailed();
      return;
    }
    UnitMember replacement = null;
    if (_replace > 0)
    {
      replacement = clan.getAnyMember(_replaceName);
      if (replacement == null)
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterNotBelongClan", activeChar));
        activeChar.sendActionFailed();
        return;
      }
      if (replacement.getPledgeType() != _targetUnit)
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterNotBelongCombatUnit", activeChar));
        activeChar.sendActionFailed();
        return;
      }
      if (replacement.isSubLeader() != 0)
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.CharacterLeaderAnotherCombatUnit", activeChar));
        activeChar.sendActionFailed();
        return;
      }
    }
    else
    {
      if (clan.getUnitMembersSize(_targetUnit) >= clan.getSubPledgeLimit(_targetUnit))
      {
        if (_targetUnit == Clan.SUBUNIT_MAIN_CLAN)
        {
          activeChar.sendPacket(new SystemMessage(SystemMessage.S1_IS_FULL_AND_CANNOT_ACCEPT_ADDITIONAL_CLAN_MEMBERS_AT_THIS_TIME).addString(clan.getName()));
        }
        else
        {
          activeChar.sendPacket(Msg.THE_ACADEMY_ROYAL_GUARD_ORDER_OF_KNIGHTS_IS_FULL_AND_CANNOT_ACCEPT_NEW_MEMBERS_AT_THIS_TIME);
        }
        activeChar.sendActionFailed();
        return;
      }
      if (subject.isSubLeader() != 0)
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.MemberLeaderAnotherUnit", activeChar));
        activeChar.sendActionFailed();
        return;
      }
    }
    SubUnit oldUnit = null;
View Full Code Here

    {
      if (!ref.isDefault())
      {
        for (Player p : ref.getPlayers())
        {
          p.sendMessage(new CustomMessage("scripts.ai.freya.FreyaFailure", p));
        }
        ref.collapse();
      }
    }
    super.thinkActive();
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.