From efc46fbc0fab0efcf8fa4ab210f377fc6f25ab26 Mon Sep 17 00:00:00 2001 From: Tryfle Date: Sun, 19 Nov 2023 18:53:12 -0500 Subject: [PATCH] :heart: Seperate tick setting in new KA --- .../stormy/client/module/modules/combat/Killaura.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/stormy/client/module/modules/combat/Killaura.java b/src/main/java/dev/stormy/client/module/modules/combat/Killaura.java index 266742c..16aa5b8 100644 --- a/src/main/java/dev/stormy/client/module/modules/combat/Killaura.java +++ b/src/main/java/dev/stormy/client/module/modules/combat/Killaura.java @@ -21,7 +21,7 @@ public class Killaura extends Module { static Optional target = Optional.empty(); public static SliderSetting range, frequency, hurtTimeAmt, rotRand; - public static TickSetting shouldBlock, targetESP, testSetting, alwaysAB, rots; + public static TickSetting shouldBlock, targetESP, testSetting, alwaysAB, rots, whenLooking; public TimerUtils timer = new TimerUtils(); public boolean delaying, isAttacking = false; long lastClickTime = 0; @@ -35,6 +35,7 @@ public Killaura() { this.registerSetting(hurtTimeAmt = new SliderSetting("Ignore before hurt time", 0, 0, 20, 1)); this.registerSetting(rotRand = new SliderSetting("Rotation Randomization", 2, 0, 3, .01)); this.registerSetting(rots = new TickSetting("Rotations (for bypassing)", false)); + this.registerSetting(whenLooking = new TickSetting("Only when looking at player", false)); this.registerSetting(shouldBlock = new TickSetting("Autoblock (Hold RMB)", false)); this.registerSetting(alwaysAB = new TickSetting("Autoblock", false)); this.registerSetting(targetESP = new TickSetting("ESP", false)); @@ -51,12 +52,12 @@ public void setTarget(TickEvent.Pre e) { } } public boolean aBooleanCheck() { - if (!rots.isToggled()) return false; + if (!whenLooking.isToggled()) return false; MovingObjectPosition result = mc.objectMouseOver; if (result != null && result.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && result.entityHit instanceof EntityPlayer targetPlayer) { - return rots.isToggled() && Utils.Player.lookingAtPlayer(mc.thePlayer, targetPlayer, range.getInput()); + return whenLooking.isToggled() && Utils.Player.lookingAtPlayer(mc.thePlayer, targetPlayer, range.getInput()); } - return false; + else return false; } @SubscribeEvent public void experiMental(UpdateEvent.Pre e) { @@ -67,7 +68,7 @@ public void experiMental(UpdateEvent.Pre e) { if (timer.hasReached(1000 / frequency.getInput() + Utils.Java.randomInt(-3, 3)) && mc.thePlayer.hurtTime < hurtTimeAmt.getInput() && mc.currentScreen == null) { if (target.isPresent()) { if (mc.thePlayer.isBlocking() || mc.thePlayer.isEating()) return; - if (rots.isToggled() && !aBooleanCheck()) return; + if (whenLooking.isToggled() && !aBooleanCheck()) return; mc.thePlayer.swingItem(); mc.playerController.attackEntity(mc.thePlayer, target.get()); timer.reset();