Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.Say2


        effect.get(0).exit();
      }
      skill.getEffects(actor, player, false, false);
      if (animation)
      {
        actor.broadcastPacket(new MagicSkillUse(actor, player, skill.getId(), skill.getLevel(), skill.getHitTime(), 0));
      }
    }
  }
View Full Code Here


      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
        {
          player.setTarget(null);
          player.setTarget(actor);
          player.sendPacket(su);
View Full Code Here

   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
View Full Code Here

      return;
    }
    L2GameServerPacket packet = null;
    if (_sysString != null)
    {
      packet = new Say2(0, _chatType, _sysString, _systemMsg);
    }
    else
    {
      packet = new Say2(0, _chatType, _how, _text);
    }
    player.sendPacket(packet);
  }
View Full Code Here

    List<Player> knownPlayers = GameObjectsStorage.getAllPlayers();
    if ((knownPlayers == null) || knownPlayers.isEmpty())
    {
      return;
    }
    Say2 sm = new Say2(0, ChatType.SHOUT, getName(), msg);
    for (Player player : knownPlayers)
    {
      if (player == null)
      {
        continue;
View Full Code Here

   * @param messageText String
   * @return boolean
   */
  public boolean sendActivePetitionMessage(Player player, String messageText)
  {
    Say2 cs;
    for (Petition currPetition : getPendingPetitions().values())
    {
      if (currPetition == null)
      {
        continue;
      }
      if ((currPetition.getPetitioner() != null) && (currPetition.getPetitioner().getObjectId() == player.getObjectId()))
      {
        cs = new Say2(player.getObjectId(), ChatType.PETITION_PLAYER, player.getName(), messageText);
        currPetition.addLogMessage(cs);
        currPetition.sendResponderPacket(cs);
        currPetition.sendPetitionerPacket(cs);
        return true;
      }
      if ((currPetition.getResponder() != null) && (currPetition.getResponder().getObjectId() == player.getObjectId()))
      {
        cs = new Say2(player.getObjectId(), ChatType.PETITION_GM, player.getName(), messageText);
        currPetition.addLogMessage(cs);
        currPetition.sendResponderPacket(cs);
        currPetition.sendPetitionerPacket(cs);
        return true;
      }
View Full Code Here

  {
    Petition newPetition = new Petition(petitioner, petitionText, petitionType);
    int newPetitionId = newPetition.getId();
    getPendingPetitions().put(newPetitionId, newPetition);
    String msgContent = petitioner.getName() + " has submitted a new petition.";
    GmListTable.broadcastToGMs(new Say2(petitioner.getObjectId(), ChatType.HERO_VOICE, "Petition System", msgContent));
    return newPetitionId;
  }
View Full Code Here

        Player player = World.getPlayer(args[0]);
        if (player == null)
        {
          return "Player not found.\n";
        }
        Say2 cs = new Say2(0, ChatType.TELL, "[Admin]", args[1]);
        player.sendPacket(cs);
        return "Message sent.\n";
      }
    });
  }
View Full Code Here

   * Method say.
   * @param text String
   */
  public void say(String text)
  {
    Say2 cs = new Say2(0, ChatType.SHOUT, "Arena", text);
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
    {
      if (!player.isBlockAll() && player.isInRange(_zone.getSpawn(), 4000))
      {
        player.sendPacket(cs);
View Full Code Here

   * @param text String
   * @param type ChatType
   */
  public static void shout(Creature activeChar, String text, ChatType type)
  {
    Say2 cs = new Say2(activeChar.getObjectId(), type, activeChar.getName(), text);
    int rx = MapUtils.regionX(activeChar);
    int ry = MapUtils.regionY(activeChar);
    int offset = Config.SHOUT_OFFSET;
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
    {
View Full Code Here

TOP

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

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.