how do u patch or check if a person is using miss godmode?
how do u patch or check if a person is using miss godmode?
code from CheatInspector.java in moople
credits 2 kevintjuh93 (moopledev)PHP Code:private int misses = 0;
private int lastmisses = 0;
private int samemisscount = 0;
public void addMiss() {
this.misses++;
}
public void resetMisses() {
if (lastmisses == misses && misses > 6) {
samemisscount++;
}
if (samemisscount > 4) {
chr.autoban("Autobanned for : " + misses + " Miss godmode", 1, false);
} else if (samemisscount > 0) {
this.lastmisses = misses;
}
this.misses = 0;
}
pretty much if you don't have cheatinspector you could place that into AutobanFactory or whatever instances upon MapleCharacter in Odin, and add those methods/variables. Then, somewhere in TakeDamageHandler (forgot where nexon calls/checks so i guess you can place it anywhere) get the player's cheat tracker or whatever it is in odin and call addMiss from it. You'll have to make a check so that if they get hit (attack was NOT a miss) that it will call "resetMisses".
is there any better method? wouldnt u get banned with this from regular misses?
you are supposed to check if a certain player exceeds the amount of possible consecutive misses.
this can be done by counting the misses like displayed above.
do note, however, that with high avoid and level, this can be triggered by weak monsters. so level and avoid ability should probably be taken into consideration