Hi, i read this tutorial and it's amazing. Thank you for that. +
But i have a Problem, if i want to read out my players health, i get 0 returned. here is my code:
Code:
#include <NomadMemory.au3>
;The first 2 are you create you manager from the baseaddress wow
Global Const $ClientConnection = 0x8BF1A8
Global Const $CurMgrOffset = 0x462C
;The next one is to get the address of your first object ONLY
Global Const $FirstObjectOffset = 0xB4
;To cycle through the object you need this offset
Global Const $NextObjectOffset = 0x3C
Global Const $PlayerGUID = 0xB8
;This next one is to find the objects type : 1 to 7
Global Const $GameObjTypeOffset = 0x14
;And this one is to find the objects GUID
Global Const $GameObjGUIDOffset = 0x30
Global Const $UnitPosXOffset = 0x898
Global Const $UnitPosYOffset = 0x898 + 0x4
Global Const $UnitPosZOffset = 0x898 + 0x8
Global Const $UnitRotationOffset = 0x8A8
Global Const $PlayerHealthOffset = 0x68
Global Const $DescriptorsOffset = 0x8
$PID = 0
$PID = ProcessExists("wow.exe")
if $PID = 0 Then
msgBox(1,"Error", "WoW has to be running.")
Exit
Else
$WoWBase = GetWoWBaseAddress($PID)
$Handle = _MemoryOpen($PID)
EndIf
$currMgr_pre = _MemoryRead("0x" & Hex($WoWBase + $ClientConnection), $Handle, "dword")
$currMgr = _MemoryRead("0x" & Hex($currMgr_pre + $CurMgrOffset), $Handle, "dword")
$pGUID = _MemoryRead("0x" & Hex($currMgr + $PlayerGUID), $Handle, "UINT64")
$pObjectMemLoc = GetMemLocByGUID($pGUID)
$pDescriptor = _MemoryRead("0x" & Hex($pObjectMemLoc + $DescriptorsOffset), $Handle, "dword")
$pHealth = _MemoryRead("0x" & Hex($pDescriptor + $PlayerHealthOffset), $Handle, "dword")
MsgBox(1,"Spieler-Status", "Gesundheit :" & $pHealth)
Func GetMemLocByGUID($guid)
$NextObject = _MemoryRead("0x" & Hex($currMgr + $FirstObjectOffset), $Handle , "dword")
$ObjType = _MemoryRead("0x" & Hex($NextObject + $GameObjTypeOffset), $Handle , "dword")
while (($ObjType <= 7) And ($ObjType > 0))
IF (_MemoryRead("0x" & Hex($NextObject + $GameObjGUIDOffset), $Handle , "UINT64") = $guid) Then
Return $NextObject ;found what we wanted.
EndIf
$NextObject = _MemoryRead("0x" & Hex($NextObject + $NextObjectOffset), $Handle , "dword")
$ObjType = _MemoryRead("0x" & Hex($NextObject + $GameObjTypeOffset), $Handle , "dword")
Wend
Return 0;
EndFunc
I hope someon can help me.
greez