MMOElites: Trying To Read Mem In Autoit - MMOElites

Jump to content

Neverwinter Comet BETA is now available for MMOElites/Aion subscribers. [Download]
We've added a Neverwinter section. You can expect to see some tools for it in the coming weeks.
All Subscriber Tools are up to date with the Gameforge and NCSoft Aion Clients. (Subscribe)

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Trying To Read Mem In Autoit help!

#1 User is offline   Atmosk  Icon

  • Biochemist
  • Group: Subscriber
  • Posts: 178
  • Joined: 11-February 10
  • Thanked: 12
  • LocationRossland, BC, Canada

Posted 29 March 2012 - 11:39 PM

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)

        #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!


#2 User is offline   hounder  Icon

  • Group: Subscriber
  • Posts: 13
  • Joined: 12-February 12
  • Thanked: 8

Posted 30 March 2012 - 12:57 AM

_MemoryPointerRead returns an array, so try this instead,

        ;Addresses
        $P_xvalue = $baseADDR[1]


other than that, make sure your offsets are in the correct order.

This post has been edited by hounder: 30 March 2012 - 12:58 AM


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users