[Tut]How to change DISREGARD THAT I......
First open your GeneralchatHandler and inside is
Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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 = "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));
}
}
}
}
Changed the red area to whatever you want but if you want to remove the message do this, thank you xazerrx:
Quote:
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));
}
}
}
}
Compile when you're done and if you don't know how to compile I found a guide for you :kisss:
http://forum.ragezone.com/f428/guide...s-odin-406097/ - How to compile with netbeans
Re: [Guide] How to change the message for @@@@@
WOOOOHOOOOOOOOOO UR THE BEST <3
great release :D
Re: [Guide] How to change the message for @@@@@
nice release :P
Lol i will not change it btw xD
Re: [Guide] How to change the message for @@@@@
lol but you can change it to something like "Bow down to xelkin" xD
Re: [Guide] How to change the message for @@@@@
I changed and it didnt change in the game still says disregard that i suck cok O.O
Re: [Guide] How to change the message for @@@@@
Re: [Guide] How to change the message for @@@@@
Yes i changed all O.o maby cuz i did ! sighn wont work?
Re: [Guide] How to change the message for @@@@@
Quote:
Originally Posted by
UrKiller1
Yes i changed all O.o maby cuz i did ! sighn wont work?
What do you mean ! sighn?
Re: [Guide] How to change DISREGARD THAT I......
i can't when this text apear? what u must do ? :)
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
seryi
i can't when this text apear? what u must do ? :)
This text happens when you spam symbols, eg: @@@@@@ = Disregarded that I suck cock!
Re: [Guide] How to change DISREGARD THAT I......
Re: [Guide] How to change DISREGARD THAT I......
Great guide. but, I think the Developer's added it in to prevent spam, which can be a good thing.
Re: [Guide] How to change DISREGARD THAT I......
thanks
im gonna change the text to something
Re: [Guide] How to change DISREGARD THAT I......
butt i tryed and in game it doesnt works >.<
Re: [Guide] How to change DISREGARD THAT I......
Code:
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";
I'm not a coder myself but, see the red text above?
Change the 4's and the 6's to like 500 if you don't want the "DISREGARD THAT I" to pop up. Don't blame me if it doesn't work. I'm simply guessing.