mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 06:41:31 +01:00
clicker detect test
This commit is contained in:
parent
27f5e1082c
commit
19e7562f2f
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user