Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;--------------------------------------------------------------------------------
- ;Getting My Player GUID
- ;--------------------------------------------------------------------------------
- #include <NomadMemory.au3>
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- ;--------------------------------------------------------------------------------
- ; Offsets Object Manager
- ; Offset and Pointer for Wow 4.2.0 14333 (Rebase 06-28-2011)
- ;--------------------------------------------------------------------------------
- Global Const $ClientConnection = 0x97DA48 ;The first 2 are you create you manager from the baseaddress wow
- Global Const $CurrMgrOffset = 0x463C
- Global Const $FirstObjectOffset = 0xB4 ;The next one is to get the address of your first object ONLY
- Global Const $NextObjectOffset = 0x3C ;To cycle through the object you need this offset
- Global Const $localPlayerGUIDOffset = 0xB8
- Global Const $GameObjGUIDOffset = 0x30 ;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 $DescriptorOffset = 0x8
- ;Open WoW Process to enable Memory Reading and Get the WoW Base Address
- $ProcessID = ProcessExists("wow.exe")
- $WowProcess = _MemoryOpen($ProcessID)
- ;Getting WoWBase Address
- $WowBase = GetWoWBaseAddress($ProcessID)
- ;1) Getting CurrentManager_Pre
- $currMgr_pre = _MemoryRead("0x" & Hex($WowBase + $ClientConnection), $WowProcess , "dword")
- ;2) Getting CurrentManager
- $currMgr = _MemoryRead("0x" & Hex($currMgr_pre + $CurrMgrOffset), $WowProcess , "dword")
- ;Getting My Player GUID (Player Global Unique ID)
- $pGUID = _MemoryRead("0x" & Hex($currMgr + $localPlayerGUIDOffset), $WowProcess , "UINT64") ;Player Guid
- $msgbox_text = "";
- $msgbox_text &= "$ProcessID: " & $ProcessID & @CRLF;
- $msgbox_text &= "$WowProcess: " & $WowProcess & @CRLF;
- $msgbox_text &= "$WowBase: " & $WowBase & @CRLF;
- $msgbox_text &= "$currMgr_pre: " & $currMgr_pre & @CRLF;
- $msgbox_text &= "$currMgr: " & $currMgr & @CRLF;
- $msgbox_text &= "$pGUID: " & $pGUID & @CRLF;
- MsgBox(1,"Test",$msgbox_text)
- ;MsgBox(4096,"Player Name", "PLAYER HEALTH ---> " & $pGUID)
- Func GetWoWBaseAddress($ProcessID)
- $HSNAP = DllCall("Kernel32.dll", "HANDLE", "CreateToolhelp32Snapshot", "DWORD", 8, "DWORD", $ProcessID)
- $STMODULE = DllStructCreate("DWORD dwSize;DWORD th32ModuleID;DWORD th32ProcessID;" & "DWORD GlblcntUsage;DWORD ProccntUsage;ptr modBaseAddr;" & "DWORD modBaseSize;HANDLE hModule;WCHAR szModule[256];" & "WCHAR szExePath[260]")
- DllStructSetData($STMODULE, "dwSize", DllStructGetSize($STMODULE))
- $RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32FirstW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE))
- IF ($RET[0] = False) Then
- DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0])
- Return 0
- Else
- $RET[0] = True
- Do
- If DllStructGetData($STMODULE, "szModule") = "Wow.exe" Then
- DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0])
- Return DllStructGetData($STMODULE, "modBaseAddr")
- EndIf
- $RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32NextW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE))
- Until $RET[0] = False
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement