diff --git a/config.py b/config.py index 17cb2e7..43985c4 100644 --- a/config.py +++ b/config.py @@ -2,8 +2,9 @@ screenShotHeight = 320 screenShotWidth = 320 -# For use in games that are 3rd person and character model interferes with the autoaim +# Use "left" or "right" for the mask side depending on where the interfering object is, useful for 3rd player models or large guns useMask = False +maskSide = "left" maskWidth = 80 maskHeight = 200 @@ -32,4 +33,4 @@ centerOfScreen = True # 1 - CPU # 2 - AMD # 3 - NVIDIA -onnxChoice = 2 \ No newline at end of file +onnxChoice = 1 \ No newline at end of file diff --git a/main.py b/main.py index 10d414c..016dc0a 100644 --- a/main.py +++ b/main.py @@ -41,8 +41,15 @@ def main(): # Getting Frame npImg = np.array(camera.get_latest_frame()) + from config import maskSide # "temporary" workaround for bad syntax if useMask: - npImg[-maskHeight:, :maskWidth, :] = 0 + maskSide = maskSide.lower() + if maskSide == "right": + npImg[-maskHeight:, -maskWidth:, :] = 0 + elif maskSide == "left": + npImg[-maskHeight:, :maskWidth, :] = 0 + else: + raise Exception('ERROR: Invalid maskSide! Please use "left" or "right"') # Normalizing Data im = torch.from_numpy(npImg) @@ -169,5 +176,5 @@ if __name__ == "__main__": except Exception as e: import traceback traceback.print_exception(e) - print(str(e)) - print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") + print("ERROR: " + str(e)) + print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") \ No newline at end of file diff --git a/main_onnx.py b/main_onnx.py index e53d701..ed20be0 100644 --- a/main_onnx.py +++ b/main_onnx.py @@ -49,8 +49,15 @@ def main(): # Getting Frame npImg = np.array(camera.get_latest_frame()) + from config import maskSide # "temporary" workaround for bad syntax if useMask: - npImg[-maskHeight:, :maskWidth, :] = 0 + maskSide = maskSide.lower() + if maskSide == "right": + npImg[-maskHeight:, -maskWidth:, :] = 0 + elif maskSide == "left": + npImg[-maskHeight:, :maskWidth, :] = 0 + else: + raise Exception('ERROR: Invalid maskSide! Please use "left" or "right"') # If Nvidia, do this if onnxChoice == 3: @@ -192,5 +199,5 @@ if __name__ == "__main__": except Exception as e: import traceback traceback.print_exception(e) - print(str(e)) - print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") + print("ERROR: " + str(e)) + print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") \ No newline at end of file diff --git a/main_tensorrt.py b/main_tensorrt.py index 4edbd20..a8e0719 100644 --- a/main_tensorrt.py +++ b/main_tensorrt.py @@ -1,4 +1,3 @@ -from unittest import result import torch import numpy as np import cv2 @@ -13,7 +12,7 @@ import cupy as cp # Could be do with # from config import * # But we are writing it out for clarity for new devs -from config import aaMovementAmp, useMask, maskHeight, maskWidth, aaQuitKey, confidence, headshot_mode, cpsDisplay, visuals, centerOfScreen +from config import aaMovementAmp, useMask, maskHeight, maskWidth, aaQuitKey, confidence, headshot_mode, cpsDisplay, visuals, centerOfScreen, screenShotWidth import gameSelection def main(): @@ -32,7 +31,7 @@ def main(): # Used for colors drawn on bounding boxes COLORS = np.random.uniform(0, 255, size=(1500, 3)) - # Main loop Quit if Q is pressed + # Main loop Quit if exit key is pressed last_mid_coord = None with torch.no_grad(): while win32api.GetAsyncKeyState(ord(aaQuitKey)) == 0: @@ -42,8 +41,15 @@ def main(): # If the image has an alpha channel, remove it npImg = npImg[:, :, :, :3] + from config import maskSide # "temporary" workaround for bad syntax if useMask: - npImg[:, -maskHeight:, :maskWidth, :] = 0 + maskSide = maskSide.lower() + if maskSide == "right": + npImg[:, -maskHeight:, -maskWidth:, :] = 0 + elif maskSide == "left": + npImg[:, -maskHeight:, :maskWidth, :] = 0 + else: + raise Exception('ERROR: Invalid maskSide! Please use "left" or "right"') im = npImg / 255 im = im.astype(cp.half) @@ -161,5 +167,5 @@ if __name__ == "__main__": except Exception as e: import traceback traceback.print_exception(e) - print(str(e)) - print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") + print("ERROR: " + str(e)) + print("Ask @Wonder for help in our Discord in the #ai-aimbot channel ONLY: https://discord.gg/rootkitorg") \ No newline at end of file