add chams
This commit is contained in:
parent
c29e165cd2
commit
a26b625336
2 changed files with 47 additions and 3 deletions
45
cheat.py
45
cheat.py
|
@ -268,9 +268,50 @@ class Cheat(Hack):
|
||||||
self.hack_loop(cheat)
|
self.hack_loop(cheat)
|
||||||
|
|
||||||
def chams(self) -> None:
|
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():
|
def cheat():
|
||||||
print("WIP")
|
# Loop all entities
|
||||||
exit(2)
|
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)
|
self.hack_loop(cheat)
|
||||||
|
|
||||||
|
|
5
hack.py
5
hack.py
|
@ -30,7 +30,10 @@ class Hack():
|
||||||
"glow_B": 0x10,
|
"glow_B": 0x10,
|
||||||
"glow_A": 0x14,
|
"glow_A": 0x14,
|
||||||
"GOM_wall": 0x27,
|
"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:
|
def _find_process(self, verbose: bool = False) -> Pymem:
|
||||||
|
|
Reference in a new issue