Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.SystemMessage


        double addToCp = Math.max(0, Math.min(maxNewCp, ((target.calcStat(Stats.CP_LIMIT, null, null) * target.getMaxCp()) / 100.) - target.getCurrentCp()));
        if (addToCp > 0)
        {
          target.setCurrentCp(addToCp + target.getCurrentCp());
        }
        target.sendPacket(new SystemMessage(SystemMessage.S1_CPS_WILL_BE_RESTORED).addNumber((long) addToCp));
        getEffects(activeChar, target, getActivateRate() > 0, false);
      }
    }
    if (isSSPossible())
    {
View Full Code Here


    Reflection ref = getActor().getReflection();
    if(!getActor().isDead() && _idleDelay > 0 && _idleDelay + 60000 < System.currentTimeMillis())
      if(!ref.isDefault())
      {
        for(Player p : ref.getPlayers())
          p.sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(1));
        ref.collapse();
      }

    super.thinkActive();
    return true;
View Full Code Here

        }
        else if (target.isPlayer())
        {
          if (activeChar == target)
          {
            activeChar.sendPacket(new SystemMessage(SystemMessage.S1_HPS_HAVE_BEEN_RESTORED).addNumber(Math.round(addToHp)));
          }
          else
          {
            target.sendPacket(new SystemMessage(SystemMessage.XS2S_HP_HAS_BEEN_RESTORED_BY_S1).addString(activeChar.getName()).addNumber(Math.round(addToHp)));
          }
        }
        else if (target.isServitor() || target.isPet())
        {
          Player owner = target.getPlayer();
View Full Code Here

    {
      return false;
    }
    currPetition.setResponder(respondingAdmin);
    currPetition.setState(PetitionState.In_Process);
    currPetition.sendPetitionerPacket(new SystemMessage(SystemMessage.PETITION_APPLICATION_ACCEPTED));
    currPetition.sendResponderPacket(new SystemMessage(SystemMessage.PETITION_APPLICATION_ACCEPTED_RECEIPT_NO_IS_S1).addNumber(currPetition.getId()));
    currPetition.sendResponderPacket(new SystemMessage(SystemMessage.PETITION_CONSULTATION_WITH_S1_UNDER_WAY).addString(currPetition.getPetitioner().getName()));
    return true;
  }
View Full Code Here

  @Override
  public void handle(Player player, int id, String txt)
  {
    if (GmListTable.getAllVisibleGMs().size() == 0)
    {
      player.sendPacket(new SystemMessage(SystemMessage.THERE_ARE_NOT_ANY_GMS_THAT_ARE_PROVIDING_CUSTOMER_SERVICE_CURRENTLY));
      return;
    }
    if (!PetitionManager.getInstance().isPetitioningAllowed())
    {
      player.sendPacket(new SystemMessage(SystemMessage.CANNOT_CONNECT_TO_PETITION_SERVER));
      return;
    }
    if (PetitionManager.getInstance().isPlayerPetitionPending(player))
    {
      player.sendPacket(new SystemMessage(SystemMessage.ALREADY_APPLIED_FOR_PETITION));
      return;
    }
    if (PetitionManager.getInstance().getPendingPetitionCount() == Config.MAX_PETITIONS_PENDING)
    {
      player.sendPacket(new SystemMessage(SystemMessage.THE_PETITION_SYSTEM_IS_CURRENTLY_UNAVAILABLE_PLEASE_TRY_AGAIN_LATER));
      return;
    }
    int totalPetitions = PetitionManager.getInstance().getPlayerTotalPetitionCount(player) + 1;
    if (totalPetitions > Config.MAX_PETITIONS_PER_PLAYER)
    {
      player.sendPacket(new SystemMessage(SystemMessage.WE_HAVE_RECEIVED_S1_PETITIONS_FROM_YOU_TODAY_AND_THAT_IS_THE_MAXIMUM_THAT_YOU_CAN_SUBMIT_IN_ONE_DAY_YOU_CANNOT_SUBMIT_ANY_MORE_PETITIONS));
      return;
    }
    if (txt.length() > 255)
    {
      player.sendPacket(new SystemMessage(SystemMessage.PETITIONS_CANNOT_EXCEED_255_CHARACTERS));
      return;
    }
    if (id >= PetitionManager.PetitionType.values().length)
    {
      _log.warn("PetitionManager: Invalid petition type : " + id);
      return;
    }
    int petitionId = PetitionManager.getInstance().submitPetition(player, txt, id);
    player.sendPacket(new SystemMessage(SystemMessage.PETITION_APPLICATION_ACCEPTED_RECEIPT_NO_IS_S1).addNumber(petitionId));
    player.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_SUBMITTED_S1_PETITIONS_YOU_MAY_SUBMIT_S2_MORE_PETITIONS_TODAY).addNumber(totalPetitions).addNumber(Config.MAX_PETITIONS_PER_PLAYER - totalPetitions));
    player.sendPacket(new SystemMessage(SystemMessage.THERE_ARE_S1_PETITIONS_PENDING).addNumber(PetitionManager.getInstance().getPendingPetitionCount()));
  }
View Full Code Here

        {
          getPetitioner().sendMessage("Your petition was rejected. Please try again later.");
        }
        else
        {
          getResponder().sendPacket(new SystemMessage(SystemMessage.ENDING_PETITION_CONSULTATION_WITH_S1).addString(getPetitioner().getName()));
          if (endState == PetitionState.Petitioner_Cancel)
          {
            getResponder().sendPacket(new SystemMessage(SystemMessage.RECEIPT_NO_S1_PETITION_CANCELLED).addNumber(getId()));
          }
        }
      }
      if ((getPetitioner() != null) && getPetitioner().isOnline())
      {
        getPetitioner().sendPacket(new SystemMessage(SystemMessage.ENDING_PETITION_CONSULTATION));
      }
      getCompletedPetitions().put(getId(), this);
      return getPendingPetitions().remove(getId()) != null;
    }
View Full Code Here

      for (Player partyMember : party.getPartyMembers())
      {
        if ((partyMember != null) && pc.isInRange(partyMember, Config.ALT_PARTY_DISTRIBUTION_RANGE))
        {
          itemId = ITEMS[Rnd.get(ITEMS.length)];
          partyMember.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_OBTAINED_S1).addItemName(itemId));
          partyMember.getInventory().addItem(itemId, 1);
        }
      }
    }
    else
    {
      itemId = ITEMS[Rnd.get(ITEMS.length)];
      pc.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_OBTAINED_S1).addItemName(itemId));
      pc.getInventory().addItem(itemId, 1);
    }
  }
View Full Code Here

    double damage = calc();
    if (damage >= (getEffected().getCurrentHp() - 1))
    {
      if (getSkill().isToggle())
      {
        getEffected().sendPacket(new SystemMessage(SystemMessage.YOUR_SKILL_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_HP));
        return false;
      }
    }
    int increaseCount = 1;
    int chargeMaxCount = 10;
View Full Code Here

    {
      if (target != null)
      {
        if (!_negateOffensive && !Formulas.calcSkillSuccess(activeChar, target, this, getActivateRate()))
        {
          activeChar.sendPacket(new SystemMessage(SystemMessage.C1_HAS_RESISTED_YOUR_S2).addString(target.getName()).addSkillName(getId(), getLevel()));
          continue;
        }
        int count = 0;
        List<Effect> effects = target.getEffectList().getAllEffects();
        for (Stats stat : _negateStats)
        {
          for (Effect e : effects)
          {
            Skill skill = e.getSkill();
            if (!skill.isOffensive() && (skill.getMagicLevel() > getMagicLevel()) && Rnd.chance(skill.getMagicLevel() - getMagicLevel()))
            {
              count++;
              continue;
            }
            if ((skill.isOffensive() == _negateOffensive) && containsStat(e, stat) && skill.isCancelable())
            {
              target.sendPacket(new SystemMessage(SystemMessage.THE_EFFECT_OF_S1_HAS_BEEN_REMOVED).addSkillName(e.getSkill().getId(), e.getSkill().getDisplayLevel()));
              e.exit();
              count++;
            }
            if ((_negateCount > 0) && (count >= _negateCount))
            {
View Full Code Here

    {
      final int hours = (int) (_reuse_time - _remaining_time) / 3600000;
      final int minutes = ((int) (_reuse_time - _remaining_time) % 3600000) / 60000;
      if (hours > 0)
      {
        final SystemMessage sm = new SystemMessage(SystemMessage.THERE_ARE_S1_HOURSS_AND_S2_MINUTES_REMAINING_UNTIL_THE_TIME_WHEN_THE_ITEM_CAN_BE_PURCHASED);
        sm.addNumber(hours);
        sm.addNumber(minutes);
        player.sendPacket(sm);
        show("scripts/events/MasterOfEnchanting/32599-scroll24.htm", player);
      }
      else if (minutes > 0)
      {
        final SystemMessage sm = new SystemMessage(SystemMessage.THERE_ARE_S1_MINUTES_REMAINING_UNTIL_THE_TIME_WHEN_THE_ITEM_CAN_BE_PURCHASED);
        sm.addNumber(minutes);
        player.sendPacket(sm);
        show("scripts/events/MasterOfEnchanting/32599-scroll24.htm", player);
      }
      else if (getItemCount(player, ADENA) >= TIMED_SCROLL_PRICE)
      {
View Full Code Here

TOP

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

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.