Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage2


    {
      player.sendPacket(SystemMsg.YOUR_NUMBER_OF_MY_TELEPORTS_SLOTS_HAS_REACHED_ITS_MAXIMUM_LIMIT);
      return false;
    }
    player.getInventory().destroyItem(item, 1);
    player.sendPacket(new SystemMessage2(SystemMsg.S1_HAS_DISAPPEARED).addItemName(item.getItemId()));
    player.bookmarks.setCapacity(player.bookmarks.getCapacity() + 3);
    player.sendPacket(SystemMsg.THE_NUMBER_OF_MY_TELEPORTS_SLOTS_HAS_BEEN_INCREASED);
    return true;
  }
View Full Code Here


    GameClient client = getClient();
    Player activeChar = client.getActiveChar();
    Player newMentee = World.getPlayer(_newMentee);
    if (newMentee == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.THAT_PLAYER_IS_NOT_ONLINE));
      return;
    }
    if (activeChar.getClassId().getId() < 139)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.YOU_MUST_AWAKEN_IN_ORDER_TO_BECOME_A_MENTOR));
      return;
    }
    if (activeChar.getMenteeMentorList().getList().size() == 3)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.A_MENTOR_CAN_HAVE_UP_TO_3_MENTEES_AT_THE_SAME_TIME));
      return;
    }
    if (newMentee.getMenteeMentorList().getMentor() != 0)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_ALREADY_HAS_A_MENTOR).addName(newMentee));
      return;
    }
    for (Map.Entry<Integer, MenteeMentor> entry : activeChar.getMenteeMentorList().getList().entrySet())
    {
      if (entry.getValue().getName().equals(_newMentee))
      {
        return;
      }
    }
    if (activeChar.getName().equals(_newMentee))
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.YOU_CANNOT_BECOME_YOUR_OWN_MENTEE));
      return;
    }
    if (newMentee.getLevel() > 85)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_IS_ABOVE_LEVEL_86_AND_CANNOT_BECOME_A_MENTEE).addName(newMentee));
      return;
    }
    if (!newMentee.getInventory().validateCapacity(33800, 1))
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_DOES_NOT_HAVE_THE_ITEM_NEDEED_TO_BECOME_A_MENTEE).addName(newMentee));
      return;
    }
    long mentorPenalty = activeChar.getVarLong("mentorPenalty", 0L);
    if (mentorPenalty > System.currentTimeMillis())
    {
      long milisPenalty = mentorPenalty - System.currentTimeMillis();
      double numSecs = (milisPenalty / 1000) % 60;
      double countDown = ((milisPenalty / 1000) - numSecs) / 60;
      int numMins = (int) Math.floor(countDown % 60);
      countDown = (countDown - numMins) / 60;
      int numHours = (int) Math.floor(countDown % 24);
      int numDays = (int) Math.floor((countDown - numHours) / 24);
      activeChar.sendPacket(new SystemMessage2(SystemMsg.YOU_CAN_BOND_WITH_A_NEW_MENTEE_IN_S1_DAYS_S2_HOUR_S3_MINUTE).addInteger(numDays).addInteger(numHours).addInteger(numMins));
      return;
    }
    new Request(L2RequestType.MENTEE, activeChar, newMentee).setTimeout(10000L);
    activeChar.sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_OFFERED_TO_BECOME_S1_MENTOR).addName(newMentee));
    newMentee.sendPacket(new ExMentorAdd(activeChar));
  }
View Full Code Here

    if (player.getClan() == null)
    {
      return;
    }
    player.getClan().incReputation(30, false, "Ballista " + getTitle());
    player.sendPacket(new SystemMessage2(SystemMsg.THE_BALLISTA_HAS_BEEN_SUCCESSFULLY_DESTROYED));
  }
View Full Code Here

    int oldLvl = getActiveSubClass().getLevel();
    getActiveSubClass().addExp(addToExp);
    getActiveSubClass().addSp(addToSp);
    if ((addToExp > 0L) && (addToSp > 0L) && ((bonusAddExp > 0L) || (bonusAddSp > 0L)))
    {
      sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_ACQUIRED_S1_EXP_BONUS_S2_AND_S3_SP_BONUS_S4).addLong(addToExp).addLong(bonusAddExp).addInteger(addToSp).addInteger((int) bonusAddSp));
    }
    else if ((addToSp > 0L) && (addToExp == 0L))
    {
      sendPacket(new SystemMessage(331).addNumber(addToSp));
    }
View Full Code Here

    {
      return SystemMsg.THAT_PERSON_IS_IN_MESSAGE_REFUSAL_MODE.packet(inviter);
    }
    if (isInParty())
    {
      return new SystemMessage2(SystemMsg.C1_IS_A_MEMBER_OF_ANOTHER_PARTY_AND_CANNOT_BE_INVITED).addName(this);
    }
    if (inviter.getReflection() != getReflection())
    {
      if ((inviter.getReflection() != ReflectionManager.DEFAULT) && (getReflection() != ReflectionManager.DEFAULT))
      {
View Full Code Here

            Mentoring.sendMentorMail(mentorPlayer, signOfTutor);
          }
        }
        if (getLevel() >= 86)
        {
          sendPacket(new SystemMessage2(SystemMsg.YOU_REACHED_LEVEL_86_RELATIONSHIP_WITH_S1_CAME_TO_AN_END).addString(mentorName));
          getMenteeMentorList().remove(mentorName, false, false);
          sendPacket(new ExMentorList(this));
          if (mentorPlayer != null)
          {
            if (mentorPlayer.isOnline())
            {
              mentorPlayer.sendPacket(new SystemMessage2(SystemMsg.THE_MENTEE_S1_HAS_REACHED_LEVEL_86).addName(this));
              mentorPlayer.getMenteeMentorList().remove(_name, true, false);
              mentorPlayer.sendPacket(new ExMentorList(mentorPlayer));
            }
            Mentoring.setTimePenalty(mentorId, System.currentTimeMillis() + (1 * 24 * 3600 * 1000L), -1);
          }
View Full Code Here

    long hours = timeleft / 3600000;
    long minutes = (timeleft - (hours * 3600000)) / 60000;
    long seconds = (long) Math.ceil((timeleft - (hours * 3600000) - (minutes * 60000)) / 1000.);
    if (hours > 0)
    {
      sendPacket(new SystemMessage2(item.getTemplate().getReuseType().getMessages()[2]).addItemName(item.getTemplate().getItemId()).addInteger(hours).addInteger(minutes).addInteger(seconds));
    }
    else if (minutes > 0)
    {
      sendPacket(new SystemMessage2(item.getTemplate().getReuseType().getMessages()[1]).addItemName(item.getTemplate().getItemId()).addInteger(minutes).addInteger(seconds));
    }
    else
    {
      sendPacket(new SystemMessage2(item.getTemplate().getReuseType().getMessages()[0]).addItemName(item.getTemplate().getItemId()).addInteger(seconds));
    }
  }
View Full Code Here

    {
      return;
    }
    if (activeChar.getActiveReflection() != null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.INSTANT_ZONE_CURRENTLY_IN_USE_S1).addInstanceName(activeChar.getActiveReflection().getInstancedZoneId()));
    }
    int limit;
    boolean noLimit = true;
    boolean showMsg = false;
    for (int i : activeChar.getInstanceReuses().keySet())
    {
      limit = InstantZoneHolder.getInstance().getMinutesToNextEntrance(i, activeChar);
      if (limit > 0)
      {
        noLimit = false;
        if (!showMsg)
        {
          activeChar.sendPacket(SystemMsg.INSTANCE_ZONE_TIME_LIMIT);
          showMsg = true;
        }
        activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_WILL_BE_AVAILABLE_FOR_REUSE_AFTER_S2_HOURS_S3_MINUTES).addInstanceName(i).addInteger(limit / 60).addInteger(limit % 60));
      }
    }
    if (noLimit)
    {
      activeChar.sendPacket(SystemMsg.THERE_IS_NO_INSTANCE_ZONE_UNDER_A_TIME_LIMIT);
View Full Code Here

      return;
    }
    if (_response == 0)
    {
      request.cancel();
      requestor.sendPacket(new SystemMessage2(SystemMsg.S1_DECLINED_YOUR_CLAN_INVITATION).addName(player));
      return;
    }
    if (!player.canJoinClan())
    {
      request.cancel();
      player.sendPacket(SystemMsg.AFTER_LEAVING_OR_HAVING_BEEN_DISMISSED_FROM_A_CLAN_YOU_MUST_WAIT_AT_LEAST_A_DAY_BEFORE_JOINING_ANOTHER_CLAN);
      return;
    }
    try
    {
      player.sendPacket(new JoinPledge(requestor.getClanId()));
      int pledgeType = request.getInteger("pledgeType");
      SubUnit subUnit = clan.getSubUnit(pledgeType);
      if (subUnit == null)
      {
        return;
      }
      UnitMember member = new UnitMember(clan, player.getName(), player.getTitle(), player.getLevel(), player.getClassId().getId(), player.getObjectId(), pledgeType, player.getPowerGrade(), player.getApprentice(), player.getSex(), Clan.SUBUNIT_NONE);
      subUnit.addUnitMember(member);
      player.setPledgeType(pledgeType);
      player.setClan(clan);
      member.setPlayerInstance(player, false);
      if (pledgeType == Clan.SUBUNIT_ACADEMY)
      {
        player.setLvlJoinedAcademy(player.getLevel());
      }
      member.setPowerGrade(clan.getAffiliationRank(player.getPledgeType()));
      clan.broadcastToOtherOnlineMembers(new PledgeShowMemberListAdd(member), player);
      clan.broadcastToOnlineMembers(new SystemMessage2(SystemMsg.S1_HAS_JOINED_THE_CLAN).addString(player.getName()), new PledgeShowInfoUpdate(clan));
      player.sendPacket(SystemMsg.ENTERED_THE_CLAN);
      player.sendPacket(player.getClan().listAll());
      player.setLeaveClanTime(0);
      player.updatePledgeClass();
      clan.addSkillsQuietly(player);
View Full Code Here

        }
        try
        {
          final Skill skill = SkillTable.getInstance().getInfo(Integer.parseInt(wordList[1]), Integer.parseInt(wordList[2]));
          target.getPlayer().addSkill(skill, true);
          target.getPlayer().sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_EARNED_S1_SKILL).addSkillName(skill.getId(), skill.getLevel()));
        }
        catch (NumberFormatException e)
        {
          _log.info("AdminClientSupport:useAdminCommand(Enum,String[],String,L2Player): " + e, e);
          return false;
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.SystemMessage2

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.