clicker detect test

This commit is contained in:
kirillsaint 2024-01-01 18:11:15 +06:00
parent 27f5e1082c
commit 19e7562f2f
2 changed files with 29 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import net.silentclient.client.Client;
import net.silentclient.client.event.EventManager;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.ClientTickEvent;
import net.silentclient.client.skillissue.detections.AutoClicker;
import net.silentclient.client.skillissue.detections.Detection;
import net.silentclient.client.skillissue.detections.Reach;
import net.silentclient.client.utils.Requests;
@ -23,6 +24,7 @@ public class SkillIssue {
EventManager.register(this);
Client.logger.info(String.format("[SkillIssue]: Initialising (v%s)", VERSION));
detections.add(new Reach(this));
detections.add(new AutoClicker(this));
timer = new TimerUtils();
}

View File

@ -0,0 +1,27 @@
package net.silentclient.client.skillissue.detections;
import net.silentclient.client.Client;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EntityAttackEvent;
import net.silentclient.client.skillissue.SkillIssue;
import net.silentclient.client.utils.PlayerUtils;
import org.lwjgl.input.Mouse;
public class AutoClicker extends Detection {
private long lastHit = 0;
public AutoClicker(SkillIssue skillIssue) {
super(skillIssue, "AutoClicker");
}
@EventTarget
public void onHit(EntityAttackEvent event) {
if(System.currentTimeMillis() - lastHit < 500 || !PlayerUtils.isSurvival()) {
return;
}
this.lastHit = System.currentTimeMillis();
if(!Mouse.isButtonDown(0) && Client.getInstance().getCPSTracker().getLCPS() > 10) {
this.detect(String.format("lmb is not pressed when hitting, %s cps", Client.getInstance().getCPSTracker().getLCPS()));
}
}
}