- Joined
- Jul 21, 2008
- Messages
- 124
- Reaction score
- 47
First open your GeneralchatHandler and inside is
Changed the red area to whatever you want but if you want to remove the message do this, thank you xazerrx:
http://forum.ragezone.com/f428/guide-compiling-netbeans-odin-406097/ - How to compile with netbeans
Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.odinms.net.channel.handler;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.CommandProcessor;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.StringUtil;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
public class GeneralchatHandler extends AbstractMaplePacketHandler {
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
String text = slea.readMapleAsciiString();
if (!CommandProcessor.processCommand(c, text)) {
if (StringUtil.countCharacters(text, '@') > 4 || StringUtil.countCharacters(text, '%') > 4 ||
StringUtil.countCharacters(text, '+') > 6 || StringUtil.countCharacters(text, '$') > 6 ||
StringUtil.countCharacters(text, '&') > 6 || StringUtil.countCharacters(text, '~') > 6 ||
StringUtil.countCharacters(text, 'W') > 6) {
text = "[COLOR="Red"]DISREGARD THAT I SUCK COCK[/COLOR]";
}
if(!c.getPlayer().isHidden())
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), text, c.getPlayer().isGM() ? 1 : 0));
else {
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(2, c.getPlayer().getName() + " : " + text));
}
}
}
}
Changed the red area to whatever you want but if you want to remove the message do this, thank you xazerrx:
Compile when you're done and if you don't know how to compile I found a guide for you :kisss:if (!CommandProcessor.processCommand(c, text)) {
/*
if (StringUtil.countCharacters(text, '@') > 4 || StringUtil.countCharacters(text, '%') > 4 ||
StringUtil.countCharacters(text, '+') > 6 || StringUtil.countCharacters(text, '$') > 6 ||
StringUtil.countCharacters(text, '&') > 6 || StringUtil.countCharacters(text, '~') > 6 ||
StringUtil.countCharacters(text, 'W') > 6) {
text = "DISREGARD THAT I SUCK COCK";
}
*/
if(!c.getPlayer().isHidden())
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), text, c.getPlayer().isGM() ? 1 : 0));
else {
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(2, c.getPlayer().getName() + " : " + text));
}
}
}
}
http://forum.ragezone.com/f428/guide-compiling-netbeans-odin-406097/ - How to compile with netbeans
Last edited: