From 155833bf28226caf7d49e096f7d2f6534090c8da Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 30 Mar 2023 14:20:03 +0200 Subject: [PATCH] can now force close --- main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 73344fd..747b88c 100644 --- a/main.py +++ b/main.py @@ -93,7 +93,7 @@ class Cheat(Hack): # Reduce CPU usage sleep(self.wait_time) - # Space bar detection + # Pressing space bar if not GetAsyncKeyState(ord(" ")): continue @@ -126,10 +126,12 @@ class Cheat(Hack): # Reduce CPU usage sleep(self.wait_time) + size_entity_object = 0x10 + # Show ennemies for i in range(1, 64): # 0 is world entity = mem.read_uint( - client + offset["dwEntityList"] + i * 0x10) + client + offset["dwEntityList"] + i * size_entity_object) if not entity: continue @@ -166,9 +168,11 @@ if __name__ == "__main__": raise IndexError case _ as i: c_id = i - 1 + except KeyboardInterrupt: + print("??\nBye.") + exit(1) except: print("Invalid ID.") - pass # Run cheat getattr(c, c.cheats_list[c_id])()