Examples of CreatureSay


Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

    int newPetitionId = newPetition.getId();
    getPendingPetitions().put(newPetitionId, newPetition);

    // Notify all GMs that a new petition has been submitted.
    String msgContent = petitioner.getName() + " has submitted a new petition."; //(ID: " + newPetitionId + ").";
    GmListTable.broadcastToGMs(new CreatureSay(petitioner.getObjectId(), 17, "Petition System", msgContent));

    return newPetitionId;
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

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

                for (L2PcInstance participant : _participants)
                {
                  try {
                    participant.sendPacket(cs);
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

  public void showAnnouncements(L2PcInstance activeChar)
  {
    for (int i = 0; i < _announcements.size(); i++)
    {
      CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, activeChar.getName(), _announcements.get(i));
      activeChar.sendPacket(cs);
    }

    for (int i = 0; i < _eventAnnouncements.size(); i++)
    {
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

      _log.warning("saving the announcements file has failed: " + e);
    }
  }

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

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

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

    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 = new CreatureSay(_duskChatGuide.getObjectId(), 1, senderName, message);
        _duskChatGuide.broadcastPacket(cs);
    }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

                        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, 9, "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

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

                LogRecord record = new LogRecord(Level.INFO, ar3);
                record.setLoggerName("chat");
                record.setParameters(new Object[]{"TELL", "[" + activeChar.getName() + " to "+receiver.getName()+"]"});
                _logChat.log(record);
        }
              CreatureSay cs = new CreatureSay(activeChar.getObjectId(), Say2.TELL, activeChar.getName(), ar3);
              if (!BlockList.isBlocked(receiver, activeChar))
        {
                if (!receiver.getMessageRefusal())
                {
                  receiver.sendPacket(cs);
                  activeChar.sendPacket(new CreatureSay(activeChar.getObjectId(), Say2.TELL, "->" + receiver.getName(), ar3));
                  htmlCode.append("Message Sent<br><button value=\"Back\" action=\"bypass _bbsloc;playerinfo;"+receiver.getName()+"\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
                  htmlCode.append("</td></tr></table></body></html>");
                  separateAndSend(htmlCode.toString(),activeChar;
          }
                else
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

  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);
    }
    _ptk = ptk;
    addDamageHate(ptk, 10, 10);
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

    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);
    }
    return true;
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CreatureSay

    }

    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
TOP
Copyright © 2018 www.massapi.com. 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.