Jump to content

_MemoryRead, mem functions, and addresses


_Kurt
 Share

Recommended Posts

Hey guys,

Been a while since I posted on the General Help and Support subforum, but I've run into a problem that I cannot solve. Please, keep in mind I am no expert when dealing with Memory.

Okay, I've been playing around with Malu's function (originally w0uter's) and Cheat Engine, and I can't get this working..

I know that the address I want to read is 6FBACE09 (taken from cheat engine), but in the function it says that I need to have the address in hex format, so here's what I got:

Const $AddressMaxLife = "6FBACE09"
;Const $AddressMaxLife = Hex("6FBACE09")
;Const $AddressMaxLife = 0x6FBACE09

$MemOpen = OpenProcess()
If $MemOpen = 0 Then MsgBox(0,"","Error opening memory")
$MaxLife = _MemoryRead($AddressMaxLife, $MemOpen, "short")
;$MaxLife = _MemoryRead($AddressMaxLife, $MemOpen, "ushort")
MsgBox(0,"",$MaxLife)


Func OpenProcess()
    Global $ProcessID = WinGetProcess("Diablo II")
    $MemOpen = _MemoryOpen($ProcessID)
    Return $MemOpen
EndFunc

I'm almost certain I'm doing something wrong with the address, can someone help me out or give me a push in the right direction?

Thanks,

Kurt

EDIT: Also want to add in that the value type of the address is 2bytes

Edited by _Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...