From 44d19f15a3e90176270610d12b28bd3dbf8c871b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 30 Mar 2023 13:47:28 +0200 Subject: [PATCH] add radar hack --- main.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 559c53d..58dbc80 100644 --- a/main.py +++ b/main.py @@ -54,8 +54,8 @@ class Hack(): else: raise MemoryError - def find_variable(self, base, offset: int) -> int: - """Find element in memory""" + def find_int(self, base, offset: int) -> int: + """Find integer in memory""" local_element = None while not local_element: local_element = self.pm.read_uint(base + offset) @@ -85,7 +85,7 @@ class Cheat(Hack): client = self.find_module("client") # Get player - local_player = self.find_variable(client, offset["dwLocalPlayer"]) + local_player = self.find_int(client, offset["dwLocalPlayer"]) # Hack loop while True: @@ -106,6 +106,52 @@ class Cheat(Hack): sleep(0.01) # maybe reduce ban rate? mem.write_uint(client + offset["dwForceJump"], 4) + def radar_hack(self) -> None: + # Aliases + mem = self.pm + offset = self.offsets + + # Get module address + client = self.find_module("client") + + # Get local player + print("Looking for player...") + local_player = self.find_int(client, offset["dwLocalPlayer"]) + + # Get local team + print("Looking for team...") + local_team = self.find_int(local_player, offset["m_iTeamNum"]) + + print("Looking for entities...") + # idx 0 == world + ennemies = [] + for i in range(1, 64): + entity = self.find_int( + client, offset["dwEntityList"] + i * 0x10) + + # Ignore allies + print("Check entity team...", end=" ") + if self.find_int(entity, offset["m_iTeamNum"] == local_team): + print("ally found...") + continue + + print("ennemy found...") + ennemies.append(entity) + + # Hack loop + print("Running...") + while True: + # Reduce CPU usage + sleep(self.wait_time) + + # Show ennemies + for ennemy in ennemies: + # Check if ennemy is alive + if not self.find_int(ennemy, offset["m_iHealth"]): + continue + + mem.write_bool(ennemy + offset["m_bSpotted"], True) + if __name__ == "__main__": # Cheat