diff --git a/cheats/aimbot.py b/cheats/aimbot.py index 8c5476f..1470039 100644 --- a/cheats/aimbot.py +++ b/cheats/aimbot.py @@ -8,6 +8,12 @@ class Aimbot(Hack): def __init__(self) -> None: super().__init__() + # AimBot FOV, higher = more aggressive + self.__fov_range = 5. + + # Smoothing, more = less efficient + self.__smoothing = 3. + def aimbot(self) -> None: # Aliases mem = self.pm @@ -61,8 +67,7 @@ class Aimbot(Hack): local_player + offset["m_aimPunchAngle"] + offset["float"]) ).times(2.) # server multiple punch by 2 - # AimBot FOV, higher = more aggressive - best_fov = 5. + best_fov = self.__fov_range best_angle = Vec() # Loop all entities @@ -119,8 +124,8 @@ class Aimbot(Hack): # We found an ennemy to aim at if not best_angle.is_zero(): - # Smoothing, more = less efficient - best_angle = best_angle.div(3.) + if self.__smoothing > 0.: + best_angle = best_angle.div(self.__smoothing) final_angle = view_angles.plus(best_angle) diff --git a/cheats/chams.py b/cheats/chams.py index 23615c9..4cc90e2 100644 --- a/cheats/chams.py +++ b/cheats/chams.py @@ -1,11 +1,15 @@ -from hack import Hack from struct import pack +from hack import Hack +from utils import Color3i + class Chams(Hack): def __init__(self) -> None: super().__init__() + self.__color = Color3i(255, 255, 0) + def chams(self) -> None: # Aliases mem = self.pm @@ -45,10 +49,15 @@ class Chams(Hack): entity + offset["m_iGlowIndex"]) * offset["glow_obj_size"] # Change color - mem.write_uint( - entity + offset["m_clrRender"] + offset["render_R"], 255) - mem.write_uint( - entity + offset["m_clrRender"] + offset["render_G"], 255) + if self.__color.r > 0: + mem.write_uint( + entity + offset["m_clrRender"] + offset["render_R"], self.__color.r) + if self.__color.g > 0: + mem.write_uint( + entity + offset["m_clrRender"] + offset["render_G"], self.__color.g) + if self.__color.b > 0: + mem.write_uint( + entity + offset["m_clrRender"] + offset["render_B"], self.__color.b) brightness = 5. mem.write_int( diff --git a/cheats/fov.py b/cheats/fov.py index 00bb0af..4ffc7b2 100644 --- a/cheats/fov.py +++ b/cheats/fov.py @@ -1,6 +1,7 @@ -from hack import Hack from win32api import GetAsyncKeyState +from hack import Hack + class Fov(Hack): def __init__(self) -> None: diff --git a/cheats/glow.py b/cheats/glow.py index a60ac48..f479772 100644 --- a/cheats/glow.py +++ b/cheats/glow.py @@ -1,10 +1,13 @@ from hack import Hack +from utils import Color4f class Glow(Hack): def __init__(self) -> None: super().__init__() + self.__color = Color4f(1., 0., 0., .8) + def glow(self) -> None: # Aliases mem = self.pm @@ -47,10 +50,18 @@ class Glow(Hack): entity + offset["m_iGlowIndex"]) * offset["glow_obj_size"] # Change color glow - mem.write_float(glow_obj_manager + i + offset["glow_R"], 1.) - # mem.write_float(glow_obj_manager + i + offset["glow_G"], 0.) - # mem.write_float(glow_obj_manager + i + offset["glow_B"], 0.) - mem.write_float(glow_obj_manager + i + offset["glow_A"], .8) + if self.__color.r > 0.: + mem.write_float(glow_obj_manager + i + + offset["glow_R"], self.__color.r) + if self.__color.g > 0.: + mem.write_float(glow_obj_manager + i + + offset["glow_G"], self.__color.g) + if self.__color.b > 0.: + mem.write_float(glow_obj_manager + i + + offset["glow_B"], self.__color.b) + if self.__color.a > 0.: + mem.write_float(glow_obj_manager + i + + offset["glow_A"], self.__color.a) # Render when not visible mem.write_bool(glow_obj_manager + i + offset["GOM_wall"], True) diff --git a/cheats/noflash.py b/cheats/noflash.py index 01972a1..1d6ce12 100644 --- a/cheats/noflash.py +++ b/cheats/noflash.py @@ -5,6 +5,8 @@ class Noflash(Hack): def __init__(self) -> None: super().__init__() + self.__brightness = 30. + def noflash(self) -> None: # Aliases mem = self.pm @@ -17,7 +19,7 @@ class Noflash(Hack): local_player = self.find_uint(client, offset["dwLocalPlayer"]) def cheat(): - mem.write_float(local_player + offset["m_flFlashMaxAlpha"], 30.) + mem.write_float(local_player + offset["m_flFlashMaxAlpha"], self.__brightness) # Value only overrided on first flash or when server fullupdate sleep(10) diff --git a/utils.py b/utils.py index b0d999d..7292892 100644 --- a/utils.py +++ b/utils.py @@ -111,3 +111,22 @@ def angle_fixer(angle: Vec) -> Vec: angle.y += 360. return angle + + +class Color3i: + """Color RGB as integer""" + + def __init__(self, r: int, g: int, b: int) -> None: + self.r = r + self.g = g + self.b = b + + +class Color4f: + """Color RGBA as float""" + + def __init__(self, r: float, g: float, b: float, a: float) -> None: + self.r = r + self.g = g + self.b = b + self.a = a