async def chaos_setup(self, ctx):
     if ctx.author.is_mod:
         try:
             self.toggles = ''
             p = Pymem('Game.exe')
             base = p.process_base.lpBaseOfDll
             pointer = base + 0x2F9464
             val = p.read_int(pointer)
             for i in (0x54, 0x688, 0x4, 0x44):
                 val = p.read_int(val + i)
             reactions = p.read_float(val + 0x658) / 0.7
             aggressivity = p.read_float(val + 0x660) / 0.6
             intelligence = p.read_float(val + 0x664) / 0.8
             sight = p.read_float(val + 0x66C)
             for i in (reactions, aggressivity, intelligence, sight):
                 self.toggles += bin(int(round(i)))[2:].zfill(16)[::-1]
             hearing = p.read_float(val + 0x670)
             self.cooldown = floor(hearing / 1000)
             self.duration = hearing - self.cooldown * 1000 - 100
             if self.duration < 0:
                 print(
                     f'[ERROR] Chaos mod is disabled in-game, turn it on and run !csetup again'
                 )
             else:
                 print(f'[INFO] Toggles set to: {self.toggles}')
                 print(f'[INFO] Cooldown set to: {self.cooldown}')
                 print(f'[INFO] Base duration set to: {self.duration}')
         except ProcessNotFound:
             print('[ERROR] Game is not running')
             return
Exemple #2
0
def data_from_game(pm: Pymem, module_offset: int):
    """Return x,z,confirmation, sin and cos values read from game memory"""
    plahka = pm.read_bool(module_offset + 0x54C2F9)
    x = pm.read_float(pm.base_address + 0x10493C)
    z = pm.read_float(pm.base_address + 0x104944)
    view_sin = pm.read_float(pm.base_address + 0x104950)
    view_cos = pm.read_float(pm.base_address + 0x104968)
    return (x, z, view_cos, view_sin, plahka)
Exemple #3
0
    def update(self, memory: Pymem, player_address: int) -> None:
        self.horizontal_position = memory.read_float(
            player_address + Player.HORIZONTAL_POSITION_OFFSET
        )
        self.vertical_position = memory.read_float(
            player_address + Player.VERTICAL_POSITION_OFFSET
        )

        self.horizontal_velocity = memory.read_float(
            player_address + Player.HORIZONTAL_VELOCITY_OFFSET
        )
        self.vertical_velocity = memory.read_float(
            player_address + Player.VERTICAL_VELOCITY_OFFSET
        )
Exemple #4
0
    def update(self, memory: Pymem, match_address: int) -> None:
        # Prelimnarily using the 1 player for all
        for player in self.players:
            player.update(memory, Address.BASE_PLAYER.value)

        self.current_time = memory.read_float(
            Address.CURRENT_TIME.value
        )
Exemple #5
0
"""

from pymem import Pymem
import time
import keyboard
import mouse
import json

for i in range(5):
    print(i)
    time.sleep(1)
if "__main__" == __name__:
    pm = Pymem('XR_3DA.exe')
    module_offset = None
    for i in list(pm.list_modules()):
        if (i.name == "xrGame.dll"):
            module_offset = i.lpBaseOfDll
    holder = []
    plashka = False
    print("started")
    for i in range(0, 25):
        z = pm.read_float(pm.base_address + 0x104944)
        x = pm.read_float(pm.base_address + 0x10493C)
        j = keyboard.is_pressed('space')
        r = mouse.is_pressed('right')
        plashka = pm.read_bool(module_offset + 0x54C2F9)
        holder.append([x, z, j, r])
        time.sleep(0.5)
    with open("dataclean", mode="w") as file:
        json.dump(holder, file)