Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

auto ban smega UPDATED

Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
not sure if this work for PE (i dun have PE to test)

but it ban ppl who can smega very fast(3 sec between smega)
and this give a warning if the offender spam 4 consecutive smega of any type
the 5th will trigger autoban

in CheatTracker.java
add this import if its not there
PHP:
import net.sf.odinms.tools.MaplePacketCreator;

add this in the variable declare part
PHP:
        private long lastSmegaTime;
        private int sMegaSpamCount=0;
EDIT forgot this step
find
PHP:
	public CheatTracker(MapleCharacter chr) {
		this.chr = new WeakReference<MapleCharacter>(chr);
		invalidationTask = TimerManager.getInstance().register(new InvalidationTask(), 60000);
		takingDamageSince = attackingSince = regenMPSince = regenHPSince =  System.currentTimeMillis();                
	}

change it to
PHP:
	public CheatTracker(MapleCharacter chr) {
		this.chr = new WeakReference<MapleCharacter>(chr);
		invalidationTask = TimerManager.getInstance().register(new InvalidationTask(), 60000);
		takingDamageSince = attackingSince = regenMPSince = regenHPSince = lastSmegaTime = System.currentTimeMillis();                
	}

EDIT now it should send the warning to the spamer only
below what u just replaced, add this
PHP:
        public synchronized void checkSMega()
        {
            long oldLastSmegaTime = lastSmegaTime;
            lastSmegaTime=System.currentTimeMillis();
            if (lastSmegaTime - oldLastSmegaTime > 3000) {//if time between smega is more then 3 sec
                    sMegaSpamCount = 0;//reset count
            }
            else
            {//time between smega is within 3 sec
                sMegaSpamCount++;
            }
            if(sMegaSpamCount==3 && !(chr.get().isGM()))//4 consecutive spam
            {
                //chr.get().getClient().getChannelServer().broadcastPacket(MaplePacketCreator.serverNotice(1, "one more consecutive SMEGA from "+charname+", autoban will trigger"));
                chr.get().getClient().getSession().write(MaplePacketCreator.serverNotice(1, "one more consecutive SMEGA from you, you will be autoban"));
            }
            if(sMegaSpamCount>3 && !(chr.get().isGM()))
            {                
                this.registerOffense(CheatingOffense.DENIAL_OF_SERVICE_ATTACK);
            }
        }

in CheatingOffense.java
add to those enum
PHP:
DENIAL_OF_SERVICE_ATTACK(50,300000,0,true),//actually is Smega_spam

in UseCashItemHandler.java
find
PHP:
if (megaType == 2) {

EDIT:no longer need the character name
add this below that
PHP:
                                        c.getPlayer().getCheatTracker().checkSMega();//autoban for smega

find
PHP:
		for (int i = 0; i < 4; i++) {
					lines.add(slea.readMapleAsciiString());
				}

EDIT no longer need the character name
add this below that
PHP:
c.getPlayer().getCheatTracker().checkSMega();//autoban for smega

EDITS:forgot to add import
 
Last edited:
Skilled Illusionist
Joined
Apr 12, 2008
Messages
397
Reaction score
0
Re: [Release]auto ban smega

Nice but i can smega twice w/o hacks in less hen 3 seconds )=
Anyway to change the 3 seconds to 2?
 
Junior Spellweaver
Joined
Apr 3, 2008
Messages
156
Reaction score
1
Re: [Release]auto ban smega

Code:
            if (lastSmegaTime - oldLastSmegaTime > 3000) {//if time between smega is more then 3 sec

Not hard to find out what to change huh?
 
Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
Re: [Release]auto ban smega

Nice but i can smega twice w/o hacks in less hen 3 seconds )=
Anyway to change the 3 seconds to 2?

u can finish a proper sentence in less then 3 sec?
anyway u have 4 tries. it will give a warning as well so dun have worry abt innocent ppl getting ban

u can change the 3 sec to any time u want to, just see the comments in the code
 
Skilled Illusionist
Joined
Apr 12, 2008
Messages
397
Reaction score
0
Re: [Release]auto ban smega

Im kinda doing something so i didn't have time to look, haven't even put in to my server yet >.>
 
LeviathanStory
Joined
Apr 21, 2007
Messages
251
Reaction score
0
Re: [Release]auto ban smega

I'm sensing alot of unnecessary autobans with thiso_o.
 
Newbie Spellweaver
Joined
Apr 14, 2008
Messages
94
Reaction score
0
Re: [Release]auto ban smega

I didnt releaze this step :

"add this below the constructor"

which constructor do u mean and what is it ?
 
Experienced Elementalist
Joined
Jul 20, 2008
Messages
221
Reaction score
3
Re: [Release]auto ban smega

anyone test it yet?
 
Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
more realistic?
such as?

i dun think it will have unnecessary autobans problems since it has a warning (a popup warning in fact)

it will auto ban when a person spam 5 consecutive smega and time between each successive smega is less then 3 seconds

i have no idea how to tell u wads a constructor is. anyway just add it in that file will do.
 
Junior Spellweaver
Joined
Jun 25, 2008
Messages
166
Reaction score
0
Re: [Release]auto ban smega

hmm instead of ban, can i change it to dc and send him auto message why he dc?
 
Newbie Spellweaver
Joined
Apr 14, 2008
Messages
94
Reaction score
0
Re: [Release]auto ban smega

Can you give a prepared 2 files because i don't understand some steps.
 
Newbie Spellweaver
Joined
Jul 12, 2008
Messages
55
Reaction score
0
Re: [Release]auto ban smega

Can you give a prepared 2 files because i don't understand some steps.

for the constructor thingy erm
this is the constructor im talking abt
PHP:
	public CheatTracker(MapleCharacter chr) {
		this.chr = new WeakReference<MapleCharacter>(chr);
		invalidationTask = TimerManager.getInstance().register(new InvalidationTask(), 60000);
		takingDamageSince = attackingSince = regenMPSince = regenHPSince = lastSmegaTime = System.currentTimeMillis();                
	}

EDIT i miss out something, check the 1st post
 
Newbie Spellweaver
Joined
Apr 14, 2008
Messages
94
Reaction score
0
Re: [Release]auto ban smega

Edit: I done almost all only no the last file because i dont understand where to add codes u didnt say below or above
 
Newbie Spellweaver
Joined
Apr 10, 2008
Messages
98
Reaction score
0
Re: [Release]auto ban smega

Why not just...

Add in the negative NX ban, this is predominantly how the hackers spam SMegas ;)

Nice release btw, xD
 
Elite Diviner
Joined
Apr 7, 2008
Messages
494
Reaction score
66
Re: [Release]auto ban smega

Hey Nice 0.0 Would You Mind Release Horntail Death And Summon Animation Cause Something Summon 2 Horntail O.O I Remember You Posted In OdinMS,Ahh Request You Know Nulled Zakum Body Skill Before Arms Are Down
So Body 1 Does Not Use Any Attack 0.0 >_> I Cant Do It
 
Junior Spellweaver
Joined
Apr 12, 2008
Messages
105
Reaction score
0
Re: [Release]auto ban smega

There are a few flaws with this. Though, megaphones were initially created in MapleStory to SELL things. :X
 
Newbie Spellweaver
Joined
Apr 14, 2008
Messages
94
Reaction score
0
Re: [Release]auto ban smega

Lol WTF when I tested this it gave the ban warning to every one not only to the char that spammed
 
Experienced Elementalist
Joined
Jul 10, 2006
Messages
235
Reaction score
0
Re: [Release]auto ban smega

When you packet edit, it works just like your sending the real SMEGA, so yes, this will block us packet editors also.

Thanks for ruining my fun, jerk =(
 
Back
Top