Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.CreatureSay


      {
        offset = 13;
      }
     
      text = command.substring(offset);
      CreatureSay cs = new CreatureSay(0, 9, activeChar.getName(), text);
      GmListTable.broadcastToGMs(cs);
     
      text = null;
      cs = null;
    }
View Full Code Here


      }
    }

    if (Config.PM_MESSAGE_ON_START)
    {
      activeChar.sendPacket(new CreatureSay(2, Say2.HERO_VOICE,Config.PM_TEXT1,Config.PM_SERVER_NAME));
      activeChar.sendPacket(new CreatureSay(15, Say2.PARTYROOM_COMMANDER,activeChar.getName(),Config.PM_TEXT2));
    }
   
    if (Config.SERVER_TIME_ON_START)
      activeChar.sendMessage("SVR time is " + fmt.format(new Date(System.currentTimeMillis())));
  }
View Full Code Here

  public void sendMessageToAll(String senderName, String message)
  {
    if(_dawnChatGuide == null || _duskChatGuide == null)
      return;

    CreatureSay cs = new CreatureSay(_dawnChatGuide.getObjectId(), 1, senderName, message);
    _dawnChatGuide.broadcastPacket(cs);
    cs = null;

    cs = new CreatureSay(_duskChatGuide.getObjectId(), 1, senderName, message);
    _duskChatGuide.broadcastPacket(cs);
    cs = null;
  }
View Full Code Here

     */
    public void sendMessageToParticipants(String message)
    {
      if(_participants.size() > 0)
      {
        CreatureSay cs = new CreatureSay(_witchInst.getObjectId(), 0, "Festival Witch", message);

        for(L2PcInstance participant : _participants)
        {
          try
          {
View Full Code Here

      String name = saymode.getName();
      int actor = saymode.getObjectId();
      _type = 0;
      Collection<L2Object> list = saymode.getKnownList().getKnownObjects().values();

      CreatureSay cs = new CreatureSay(actor, _type, name, _text);
      for(L2Object obj : list)
      {
        if(obj == null || !(obj instanceof L2Character))
        {
          continue;
        }
        L2Character chara = (L2Character) obj;
        chara.sendPacket(cs);
      }
      return;
    }
   
    CreatureSay cs = new CreatureSay(activeChar.getObjectId(), _type, activeChar.getName(), _text);
    switch(_type)
    {
      case TELL:
        L2PcInstance receiver = L2World.getInstance().getPlayer(_target);
       
        if(receiver == null){
         
          SystemMessage sm = new SystemMessage(SystemMessageId.S1_IS_NOT_ONLINE);
          sm.addString(_target);
          activeChar.sendPacket(sm);
          sm = null;
          return;
         
        }
       
        if (!receiver.getBlockList().isInBlockList(activeChar.getName())
          || activeChar.isGM())
        {
          if(receiver.isAway())
          {
            activeChar.sendMessage("Player is Away try again later.");
          }

          if(Config.JAIL_DISABLE_CHAT && receiver.isInJail())
          {
            activeChar.sendMessage("Player is in jail.");
            return;
          }

          if(receiver.isChatBanned() && !activeChar.isGM())
          {
            activeChar.sendMessage("Player is chat banned.");
            return;
          }

         
          if (receiver.isOffline())
          {
            activeChar.sendMessage("Player is in offline mode.");
            return;
          }
         
         
          if(!receiver.getMessageRefusal())
          {
            receiver.sendPacket(cs);
            activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), _type, "->" + receiver.getName(), _text));
          }
          else
          {
            activeChar.sendPacket(new SystemMessage(SystemMessageId.THE_PERSON_IS_IN_MESSAGE_REFUSAL_MODE));
          }
View Full Code Here

        player.standUp();
      }
     
      if (Config.SELL_BY_ITEM)
      {
        CreatureSay cs11 = new CreatureSay(0, 15, "", "ATTENTION: Store System is not based on Adena, be careful!"); // 8D
        player.sendPacket(cs11);
      }
     
      player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_SELL + 1);
      player.sendPacket(new PrivateStoreManageListSell(player));
View Full Code Here

          activeChar.sendPacket(sm);
          sm = null;

          // Notify all GMs that the player's pending petition has been cancelled.
          String msgContent = activeChar.getName() + " has canceled a pending petition.";
          GmListTable.broadcastToGMs(new CreatureSay(activeChar.getObjectId(), 17, "Petition System", msgContent));
        }
        else
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.FAILED_CANCEL_PETITION_TRY_LATER));
        }
View Full Code Here

    }
  }
 
  public static void announceToOnlinePlayers(String text, boolean isCritical)
   {
    CreatureSay cs;
   
    if (isCritical)
      cs = new CreatureSay(0, Say2.CRITICAL_ANNOUNCE, "", text);
    else
      cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", text);
   
    toAllOnlinePlayers(cs);
   }
View Full Code Here

    }

    //we send message to known players only!
    if(_knownPlayers.size() > 0)
    {
      CreatureSay cs = new CreatureSay(getObjectId(), 0, getName(), chat);

      //we interact and list players here
      for(L2PcInstance players : _knownPlayers.values())
      {
        //finally send packet :D
View Full Code Here

        return;

      if(!_activeChar.isVisible())
        return;

      broadcastPacket(new CreatureSay(getObjectId(), 0, getName(), "forgive me!!"));
    }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.serverpackets.CreatureSay

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.