can now force close
This commit is contained in:
parent
a59fd07a08
commit
155833bf28
1 changed files with 7 additions and 3 deletions
10
main.py
10
main.py
|
@ -93,7 +93,7 @@ class Cheat(Hack):
|
||||||
# Reduce CPU usage
|
# Reduce CPU usage
|
||||||
sleep(self.wait_time)
|
sleep(self.wait_time)
|
||||||
|
|
||||||
# Space bar detection
|
# Pressing space bar
|
||||||
if not GetAsyncKeyState(ord(" ")):
|
if not GetAsyncKeyState(ord(" ")):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -126,10 +126,12 @@ class Cheat(Hack):
|
||||||
# Reduce CPU usage
|
# Reduce CPU usage
|
||||||
sleep(self.wait_time)
|
sleep(self.wait_time)
|
||||||
|
|
||||||
|
size_entity_object = 0x10
|
||||||
|
|
||||||
# Show ennemies
|
# Show ennemies
|
||||||
for i in range(1, 64): # 0 is world
|
for i in range(1, 64): # 0 is world
|
||||||
entity = mem.read_uint(
|
entity = mem.read_uint(
|
||||||
client + offset["dwEntityList"] + i * 0x10)
|
client + offset["dwEntityList"] + i * size_entity_object)
|
||||||
|
|
||||||
if not entity:
|
if not entity:
|
||||||
continue
|
continue
|
||||||
|
@ -166,9 +168,11 @@ if __name__ == "__main__":
|
||||||
raise IndexError
|
raise IndexError
|
||||||
case _ as i:
|
case _ as i:
|
||||||
c_id = i - 1
|
c_id = i - 1
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("??\nBye.")
|
||||||
|
exit(1)
|
||||||
except:
|
except:
|
||||||
print("Invalid ID.")
|
print("Invalid ID.")
|
||||||
pass
|
|
||||||
|
|
||||||
# Run cheat
|
# Run cheat
|
||||||
getattr(c, c.cheats_list[c_id])()
|
getattr(c, c.cheats_list[c_id])()
|
||||||
|
|
Reference in a new issue