Hey guys, so I haven't ever been much of a programmer, I took a few courses and read a few books - since then I've forgotten most of it. So I'd thought I'd start with autoit because it's so easy to write stuff.
So I'm just trying to read a pointer value from a game with 0 protection, just practicing before I try anything complex. I've actually read a whole bunch of tutorials including the tutorial here, but I can't seem to get it to work. Lemme just show you what I've got:
(the float pointer value is: MortalOnline.exe+0x032CCD24 with offsets 0xC, 0x4C, 0x1E0, 0xC, and 0x124)
So to test I would put 1 msg box after the line I thought it was messing up on, the spot where I have it now, it returns 0. The $pid returns the correct value, but it seems none of my $baseADDR return the right values, either in dec or hex.
Hopefully someone can give me some insight to what I'm doing wrong, thanks!
So I'm just trying to read a pointer value from a game with 0 protection, just practicing before I try anything complex. I've actually read a whole bunch of tutorials including the tutorial here, but I can't seem to get it to work. Lemme just show you what I've got:
(the float pointer value is: MortalOnline.exe+0x032CCD24 with offsets 0xC, 0x4C, 0x1E0, 0xC, and 0x124)
#include <NomadMemory.au3>
; Check if the game is going
If WinExists("Mortal Online") = 0 Then
TrayTip("Error", "Please start the game first", 1)
Sleep(3000)
Exit
EndIf
SetPrivilege("SeDebugPrivilege", 1)
Opt("OnExitFunc", "endscript")
; Simple main offset
Global $MainOffset[6]
$MainOffset[0] = 0 ;I was told this was always 0
$MainOffset[1] = Dec("C")
$MainOffset[2] = Dec("4C")
$MainOffset[3] = Dec("1E0")
$MainOffset[4] = Dec("C")
$MainOffset[5] = Dec("124")
; Main read
$pid = WinGetProcess("Mortal Online") ; PID
$openmem = _MemoryOpen($pid) ; Open the memory
$baseADDR = _MemoryGetBaseAddress($openmem, 0)
; Create 0x(Add base adress to the offset)
$baseADDR = "0x" & Hex($baseADDR + dec("032CCD24")) ; MortalOnline.exe+0x032CCD24 (I know I don't need the 0's before)
$baseADDR = _MemoryPointerRead($baseADDR, $openmem, $MainOffset, "float") ; Read offset
MsgBox(0, "Info", hex($baseADDR))
;Addresses
$P_xvalue = $baseADDR
; Main loop. Keep the script going
While 1
Sleep(500)
If WinExists("Mortal Online") = 0 Then Exit
WEnd
Func endscript()
_MemoryClose($openmem)
Exit
EndFunc
So to test I would put 1 msg box after the line I thought it was messing up on, the spot where I have it now, it returns 0. The $pid returns the correct value, but it seems none of my $baseADDR return the right values, either in dec or hex.
Hopefully someone can give me some insight to what I'm doing wrong, thanks!




MultiQuote