add chams

This commit is contained in:
Mylloon 2023-03-30 23:44:52 +02:00
parent c29e165cd2
commit a26b625336
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 47 additions and 3 deletions

View file

@ -268,9 +268,50 @@ class Cheat(Hack):
self.hack_loop(cheat)
def chams(self) -> None:
# Aliases
mem = self.pm
offset = self.offsets
# Get module addresses
client = self.find_module("client")
engine = self.find_module("engine")
# Get local player
local_player = self.find_uint(client, offset["dwLocalPlayer"])
# Get local team
local_team = self.find_uint(local_player, offset["m_iTeamNum"])
def cheat():
print("WIP")
exit(2)
# Loop all entities
for i in range(1, 32): # 0 is world
entity = mem.read_uint(
client + offset["dwEntityList"] + i * offset["entity_size"])
# Ignore if entity doesn't exist
if not entity:
continue
# Ignore allies
if mem.read_uint(entity + offset["m_iTeamNum"]) == local_team:
continue
# Check if ennemy is alive
if not mem.read_uint(entity + offset["m_iHealth"]):
continue
# Space between values
i = mem.read_int(
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)
# mem.write_uint(
# entity + offset["m_clrRender"] + offset["render_B"], 0)
sleep(10)
self.hack_loop(cheat)

View file

@ -30,7 +30,10 @@ class Hack():
"glow_B": 0x10,
"glow_A": 0x14,
"GOM_wall": 0x27,
"GOM_visible": 0x28
"GOM_visible": 0x28,
"render_R": 0x0,
"render_G": 0x1,
"render_B": 0x2
}
def _find_process(self, verbose: bool = False) -> Pymem: