/* * $Header: /cvsroot/l2j/L2_Gameserver/java/net/sf/l2j/gameserver/ clientpackets/Say2.java,v 1.4 2004/07/04 11:09:02 l2chef Exp $ * * $Author: l2chef $ * $Date: 2004/07/04 11:09:02 $ * $Revision: 1.4 $ * $Log: Say2.java,v $ * Revision 1.4 2004/07/04 11:09:02 l2chef * commands removed. * say is now only local * shout and trade is global * * Revision 1.3 2004/06/29 22:55:35 l2chef * tell and say works now. say is actually a server broadcast now * * Revision 1.2 2004/06/27 08:51:42 jeichhorn * Added copyright notice * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.clientpackets;
public final static int ALL = 0; public final static int SHOUT = 1; public final static int TELL = 2; public final static int PARTY = 3; public final static int CLAN = 4; public final static int PRIVATE_CHAT_PLAYER = 6; // used for petition public final static int PRIVATE_CHAT_GM = 7; // used for petition public final static int TRADE = 8; public final static int GM_MESSAGE = 9;
/** * packet type id 0x38 * format: cSd (S) * @param decrypt */ public Say2(byte[] decrypt, ClientThread client) throws IOException { super(decrypt); String text = readS(); int type = readD(); String target = null; if (type == TELL) { target = readS(); }
_log.fine("Say type:"+type);
L2PcInstance activeChar = client.getActiveChar(); Connection con = client.getConnection();
try{ //if is not special command,it will be catch (to be a normal talk) if (text.equals(".help")) { NpcHtmlMessage adminCommands = new NpcHtmlMessage(5); StringBuffer html1 = new StringBuffer("<html><title>AdminCommands</title>"); html1.append("<body>"); html1.append("<br><a action=\"bypass -h spawn_monster\">spawn monster</a>"); // -> causes a 0x21 packet html1.append("<br><a action=\"bypass -h come_here\">force target to move here</a>"); html1.append("<br><a action=\"bypass -h attack_me\">force target to attack</a>"); html1.append("<br><a action=\"bypass -h stats\">show statistics</a>"); html1.append("</body></html>");