Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
squishybubs
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.
Did you try it firstly? Maybe I may try.
Re: [Guide] How to change DISREGARD THAT I......
Re: [Guide] How to change DISREGARD THAT I......
Great guide
You should add that you have to compile after for all those noobs.
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
squishybubs
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.
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));
}
}
}
}
If you REALLY wanted to get rid of the message entirely you would just have to take out the red section. Then compile of course =jD
Re: [Guide] How to change DISREGARD THAT I......
thx...I seriously need it! xD
Re: [Guide] How to change the message for @@@@@
Quote:
Originally Posted by
get31720
did you compile?
What compiler do you use?
Re: [Guide] How to change the message for @@@@@
Quote:
Originally Posted by
Inifekt
What compiler do you use?
most likely netbeans...
Re: [Guide] How to change DISREGARD THAT I......
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
HydroBenZ
Great guide
You should add that you have to compile after for all those noobs.
Added. Thank you!
Quote:
Originally Posted by
I3eatz
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));
}
}
}
}
If you REALLY wanted to get rid of the message entirely you would just have to take out the red section. Then compile of course =jD
Added thanks =D
Re: [Guide] How to change DISREGARD THAT I......
This is helpful for many noobs that dont know how.
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
Sonny Rocks!
This is helpful for many noobs that dont know how.
my money is on you didnt know either
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
Clysse
my money is on you didnt know either
lol :basketball:
Re: [Guide] How to change DISREGARD THAT I......
You know you could have just done this.
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";
}
*/
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));
}
}
}
}
Re: [Guide] How to change DISREGARD THAT I......
Quote:
Originally Posted by
xazerrx
You know you could have just done this.
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";
}
*/
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));
}
}
}
}
Is that what you tested and it worked?
PS going to add this xD
Re: [Guide] How to change DISREGARD THAT I......
I already changed it to "Carter is the nigga, the next Lil Wayne".