Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage2


      {
        double valCP = cha.getMaxCp() - cha.getCurrentCp();
        if (valCP > 0)
        {
          cha.setCurrentCp(valCP + cha.getCurrentCp());
          cha.sendPacket(new SystemMessage2(SystemMsg.S1_CP_HAS_BEEN_RESTORED).addInteger(Math.round(valCP)));
        }
        double valHP = cha.getMaxHp() - cha.getCurrentHp();
        if (valHP > 0)
        {
          cha.setCurrentHp(valHP + cha.getCurrentHp(), false);
          cha.sendPacket(new SystemMessage2(SystemMsg.S1_HP_HAS_BEEN_RESTORED).addInteger(Math.round(valHP)));
        }
        double valMP = cha.getMaxMp() - cha.getCurrentMp();
        if (valMP > 0)
        {
          cha.setCurrentMp(valMP + cha.getCurrentMp());
          cha.sendPacket(new SystemMessage2(SystemMsg.S1_MP_HAS_BEEN_RESTORED).addInteger(Math.round(valMP)));
        }
      }
    }
  }
View Full Code Here


    {
      return false;
    }
    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 false;
    }
    Calendar c = Calendar.getInstance();
    c.setTimeInMillis(activeChar.getCreateTime());
    activeChar.sendPacket(new SystemMessage2(SystemMsg.C1S_BIRTHDAY_IS_S3S4S2).addName(activeChar).addInteger(c.get(Calendar.YEAR)).addInteger(c.get(Calendar.MONTH) + 1).addInteger(c.get(Calendar.DAY_OF_MONTH)));
    if ((c.get(Calendar.MONTH) == Calendar.FEBRUARY) && (c.get(Calendar.DAY_OF_WEEK) == 29))
    {
      activeChar.sendPacket(SystemMsg.A_CHARACTER_BORN_ON_FEBRUARY_29_WILL_RECEIVE_A_GIFT_ON_FEBRUARY_28);
    }
    return true;
View Full Code Here

    {
      activeChar.sendPacket(SystemMsg.THIS_COMMAND_CAN_ONLY_BE_USED_BY_A_NOBLESSE);
      return true;
    }
    Player playerTarget = objectTarget.getPlayer();
    SystemMessage2 sm = new SystemMessage2(SystemMsg.FOR_THE_CURRENT_GRAND_OLYMPIAD_YOU_HAVE_PARTICIPATED_IN_S1_MATCHES_S2_WINS_S3_DEFEATS_YOU_CURRENTLY_HAVE_S4_OLYMPIAD_POINTS);
    sm.addInteger(Olympiad.getCompetitionDone(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionWin(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionLoose(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getNoblePoints(playerTarget.getObjectId()));
    activeChar.sendPacket(sm);
    int[] ar = Olympiad.getWeekGameCounts(playerTarget.getObjectId());
    sm = new SystemMessage2(SystemMsg.YOU_HAVE_S1_MATCHES_REMAINING_THAT_YOU_CAN_PARTICIPATE_IN_THIS_WEEK_S2_1_VS_1_CLASS_MATCHES_S3_1_VS_1_MATCHES__S4_3_VS_3_TEAM_MATCHES);
    sm.addInteger(ar[0]);
    sm.addInteger(ar[1]);
    sm.addInteger(ar[2]);
    sm.addInteger(ar[2]);
    activeChar.sendPacket(sm);
    return true;
  }
View Full Code Here

      if(equipped)
      {
        inventory.equipItem(targetItem);
        inventory.isRefresh = false;
      }
      player.sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_SPENT_S1_ON_A_SUCCESSFUL_APPEARANCE_MODIFICATION).addLong(cost));
    }
    finally
    {
      inventory.writeUnlock();
    }
View Full Code Here

      player.sendPacket(SystemMsg.THE_NAME_IS_NOT_CURRENTLY_REGISTERED);
      return;
    }
    player.getPostFriends().remove(key);
    CharacterPostFriendDAO.getInstance().delete(player, key);
    player.sendPacket(new SystemMessage2(SystemMsg.S1_WAS_SUCCESSFULLY_DELETED_FROM_YOUR_CONTACT_LIST).addString(_name));
  }
View Full Code Here

      return;
    }
    switch (_answer)
    {
      case -1:
        requestor.sendPacket(new SystemMessage2(SystemMsg.C1_IS_SET_TO_REFUSE_COUPLE_ACTIONS_AND_CANNOT_BE_REQUESTED_FOR_A_COUPLE_ACTION).addName(activeChar));
        request.cancel();
        break;
      case 0:
        activeChar.sendPacket(SystemMsg.THE_COUPLE_ACTION_WAS_DENIED);
        requestor.sendPacket(SystemMsg.THE_COUPLE_ACTION_WAS_CANCELLED);
View Full Code Here

        handler.onBypassCommand(activeChar, Config.BBS_DEFAULT);
      }
    }
    else
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.THE_COMMUNITY_SERVER_IS_CURRENTLY_OFFLINE));
    }
  }
View Full Code Here

    ICommunityBoardHandler handler = CommunityBoardManager.getInstance().getCommunityHandler(_url);
    if (handler != null)
    {
      if (!Config.COMMUNITYBOARD_ENABLED)
      {
        activeChar.sendPacket(new SystemMessage2(SystemMsg.THE_COMMUNITY_SERVER_IS_CURRENTLY_OFFLINE));
      }
      else
      {
        handler.onWriteCommand(activeChar, _url, _arg1, _arg2, _arg3, _arg4, _arg5);
      }
View Full Code Here

      addObject(DEFENDERS, new SiegeClanObject(DEFENDERS, _oldOwner, 0));
    }
    SiegeClanDAO.getInstance().delete(getResidence());
    flagPoleUpdate(true);
    updateParticles(true, ATTACKERS, DEFENDERS);
    broadcastTo(new SystemMessage2(SystemMsg.THE_FORTRESS_BATTLE_S1_HAS_BEGUN).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
    super.startEvent();
  }
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.