Package com.l2jfrozen.gameserver.network.serverpackets

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


      if(player.getFirstEffect(skill) == null)
      {
        int objId = _caster.getObjectId();
        skill.getEffects(_caster, player,false,false,false);
        broadcastPacket(new MagicSkillUser(_caster, player, skillId, skillLevel, Config.PROTECTOR_SKILLTIME, 0));
        broadcastPacket(new CreatureSay(objId, 0, String.valueOf(getName()), Config.PROTECTOR_MESSAGE));

        skill = null;
        return true;
      }
View Full Code Here


            String val = _usrCommand.substring(4);
            StringTokenizer st = new StringTokenizer(val);
            String name = st.nextToken();
            String message = val.substring(name.length() + 1);
            L2PcInstance reciever = L2World.getInstance().getPlayer(name);
            CreatureSay cs = new CreatureSay(0, Say2.TELL, "Telnet Priv", message);
            if (reciever != null)
            {
              reciever.sendPacket(cs);
              _print.println("Telnet Priv->" + name + ": " + message);
              _print.println("Message Sent!");
            }
            else
            {
              _print.println("Unable To Find Username: " + name);
            }
          }
          catch (StringIndexOutOfBoundsException e)
          {
            _print.println("Please Enter Some Text!");
          }
        }
        else if (_usrCommand.startsWith("gmchat"))
        {
          try
          {
            _usrCommand = _usrCommand.substring(7);
            CreatureSay cs = new CreatureSay(0, Say2.ALLIANCE, "Telnet GM Broadcast from " + _cSocket.getInetAddress().getHostAddress(), _usrCommand);
            GmListTable.broadcastToGMs(cs);
            _print.println("Your Message Has Been Sent To " + getOnlineGMS() + " GM(s).");
          }
          catch (StringIndexOutOfBoundsException e)
          {
View Full Code Here

            if(Config.IRC_TO_GAME_DISPLAY.equals("trade"))
              ChatType = 8;
            if(Config.IRC_TO_GAME_DISPLAY.equals("hero"))
              ChatType = 17;
           
            CreatureSay cs = new CreatureSay(0, ChatType, "[IRC] "+u.getNick(), sendmsg);

                  for (L2PcInstance player : L2World.getInstance().getAllPlayers())
                  {
                        player.sendPacket(cs);
                  }
View Full Code Here

              return;

            if(text.contains("%player_cabal_loser%") || text.contains("%player_cabal_winner%") || text.contains("%player_random%"))
              return;

            CreatureSay cs = new CreatureSay(chatNpc.getObjectId(), 0, creatureName, text);

            for(L2PcInstance nearbyPlayer : nearbyPlayers)
            {
              nearbyPlayer.sendPacket(cs);
            }
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_BUY + 1);
      player.sendPacket(new PrivateStoreManageListBuy(player));
View Full Code Here

   */
  public void say(int i)
  {

    Collection<L2PcInstance> knownPlayers = getKnownList().getKnownPlayers().values();
    CreatureSay sm;
    PlaySound ps;
    switch(i)
    {
      case 10:
        if(_cycle == 1)
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t1.npc1, _t1.sysmess10_1);
        }
        else
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t2.npc1, _t2.sysmess10_1);
        }
        ps = new PlaySound(0, "itemsound.ship_arrival_departure", 1, getObjectId(), getX(), getY(), getZ());
        if(knownPlayers == null || knownPlayers.isEmpty())
          return;
        for(L2PcInstance player : knownPlayers)
        {
          player.sendPacket(sm);
          player.sendPacket(ps);
        }
        break;
      case 5:
        if(_cycle == 1)
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t1.npc1, _t1.sysmess5_1);
        }
        else
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t2.npc1, _t2.sysmess5_1);
        }
        ps = new PlaySound(0, "itemsound.ship_5min", 1, getObjectId(), getX(), getY(), getZ());
        if(knownPlayers == null || knownPlayers.isEmpty())
          return;
        for(L2PcInstance player : knownPlayers)
        {
          player.sendPacket(sm);
          player.sendPacket(ps);
        }
        break;
      case 1:

        if(_cycle == 1)
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t1.npc1, _t1.sysmess1_1);
        }
        else
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t2.npc1, _t2.sysmess1_1);
        }
        ps = new PlaySound(0, "itemsound.ship_1min", 1, getObjectId(), getX(), getY(), getZ());
        if(knownPlayers == null || knownPlayers.isEmpty())
          return;
        for(L2PcInstance player : knownPlayers)
        {
          player.sendPacket(sm);
          player.sendPacket(ps);
        }
        break;
      case 0:

        if(_cycle == 1)
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t1.npc1, _t1.sysmess0_1);
        }
        else
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t2.npc1, _t2.sysmess0_1);
        }
        if(knownPlayers == null || knownPlayers.isEmpty())
          return;
        for(L2PcInstance player : knownPlayers)
        {
          player.sendPacket(sm);
          //player.sendPacket(ps);
        }
        break;
      case -1:
        if(_cycle == 1)
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t1.npc1, _t1.sysmessb_1);
        }
        else
        {
          sm = new CreatureSay(0, Say2.SHOUT, _t2.npc1, _t2.sysmessb_1);
        }
        ps = new PlaySound(0, "itemsound.ship_arrival_departure", 1, getObjectId(), getX(), getY(), getZ());
        for(L2PcInstance player : knownPlayers)
        {
          player.sendPacket(sm);
View Full Code Here

    if(msg == null || msg.isEmpty())
      return;// wrong usage
    Collection<L2PcInstance> knownPlayers = L2World.getInstance().getAllPlayers();
    if(knownPlayers == null || knownPlayers.isEmpty())
      return;
    CreatureSay sm = new CreatureSay(0, 1, getName(), msg);
    for(L2PcInstance player : knownPlayers)
    {
      if(player == null)
      {
        continue;
View Full Code Here

  }

  public static void announceAllPlayers(String text)
  {
    CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", text);

    for(L2PcInstance player : L2World.getInstance().getAllPlayers())
    {
      player.sendPacket(cs);
    }
View Full Code Here

  public void setPlayerToKill(L2PcInstance ptk)
  {
    if(Rnd.nextInt(100) <= 80)
    {
      CreatureSay cs = new CreatureSay(getObjectId(), Say2.ALL, getName(), "mmm your bait was delicious");
      this.broadcastPacket(cs);
      cs = null;
    }
    _ptk = ptk;
    addDamageHate(ptk, 10, 10);
View Full Code Here

    if(!super.doDie(killer))
      return false;

    if(Rnd.nextInt(100) <= 75)
    {
      CreatureSay cs = new CreatureSay(getObjectId(), Say2.ALL, getName(), "I will tell fishes not to take your bait");
      this.broadcastPacket(cs);
      cs = null;
    }
    return true;
  }
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.