result (0.77)Ġ19: if WinExist("ahk_exe ac_client.exe")Ġ21: PlayerObjectPointer := ( ReadCubeMem(baseAddress) + offsetToPlayerObjectPointer ) Result += *(&memVal + (A_Index-1)) << 8*(A_Index-1)Ġ05: offsetToPlayerObjectPointer := 0x10F4F4Ġ08: if WinExist("ahk_exe ac_client.exe")Ġ60: if (AcHwnd := WinExist("ahk_exe ac_client.exe"))Ġ62: MsgBox,"We've made it at least as far as line ". You can uncomment the loop and remove this line if it fails. I'll leave it here in case it's important lol, but normally memVal should be readable by now. , "UInt", ( PROCESS_VM_OPERATION := 0x8 | PROCESS_VM_READ := 0x10 | PROCESS_VM_WRITE := 0x20 ) DWORD dwProcessId the PID of the process we're opening the handle for DWORD dwDesiredAccess, we want ( 0x8 | 0x10 | 0x20) Retrieve a handle to the AssaultCube process so we can operate within its memory space MsgBox, % "We've made it at least as far as line ". If (AcHwnd := WinExist("ahk_exe ac_client.exe")) In reality, it will be near instant if the exe is running Waits up to 1 second to get the PID of the program. Static AcPID, AcHwnd, hProcess, remoteMemAddress, bytes := 4 ReadCubeMem(-1) call function and pass -1 to close any previously open handles MsgBox, % "Memory address PlayerObjectPointer = ". Result := ReadCubeMem(PlayerObjectPointer) PlayerObjectPointer := ( ReadCubeMem(baseAddress) + offsetToPlayerObjectPointer ) Obviously, I do not really understand how to interact with the memory of the game. If some can help me, for the moment with the step 2. Step 3: WriteProcessMemory ()! I should complete the step 2 We'll see after. Then, with f6, add an offset to find lhealth for example. Result += *(&MVALUE + A_Index-1) I would like for the moment, by pressing f4, to display the same value of Player object pointer as cheat engine. If (ProcessHandle) & DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",BYTES,"UInt *",0) ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess" ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle" ReadMemory(MADDRESS=0x15B29DD0,PROGRAM="AssaultCube",BYTES=4) SetWorkingDir %A_ScriptDir% Ensures a consistent starting directory. SendMode Input Recommended for new scripts due to its superior speed and reliability. #Warn Enable warnings to assist with detecting common errors. The game is 32bits.ĭo not think I'm lazy, I really spent a lot of time searching, and I did my homework look:Ĭode: Select all #NoEnv Recommended for performance and compatibility with future AutoHotkey releases. I tried a lot of things, besides it seems that some things only work in 32bit other 64bits,Īnd that according to the version of the OS some things do not work either. Only there is not a single tutorial for beginners and I do not understand the code that I find here and there. I did some research and apparently I need to use : Rifle ammo in mag: ac_client.exe + 10F4F4 + offset 150 Health: ac_client.exe + 10F4F4 + offset F8Īrmor: ac_client.exe + 10F4F4 + offset FC This is what I call the "player object pointer": ac_client.exe + 10F4F4Īnd here are some other addresses like this: )Īll these values are in solo mode (not online, so I can learn and it's not for ez kill guys who did not ask anything). I have the addresses of the health, the armor, the ammunition (the stock and in the magazine, grenades, the activation of the double gun etc. With the help of cheat engine, I could find the pointers. I chose the AssaultCube game because it is not protected by an anticheat. That's it, I'm a beginner and I have a project: to create a trainer with AHK! For that, I need to access the memory of the game.Īnd I do not know how to do it despite the fact that I read a lot of threads on it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |