Guest User

Shynd

a guest
Apr 20th, 2009
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.05 KB | None | 0 0
  1. #include "WoWAmeliorator.au3"
  2.  
  3. _BMInitialize()
  4.  
  5. Global $hWnd = WinGetHandle("World of Warcraft")
  6. If @error Or $hWnd = 0 Then
  7.     MsgBox(0x10, "Window Not Found", "Could not find World of Warcraft game window.")
  8.     Exit
  9. EndIf
  10.  
  11. Global $hProcess = _BMOpenProcess($hWnd, False)
  12. If @error Or $hProcess = 0 Then
  13.     MsgBox(0x10, "OpenProcess Error", "Could not open process for read/write.")
  14.     Exit
  15. EndIf
  16.  
  17. Global $ObjectManager = 0
  18. Global $CurObject = 0, $NextObject = 0
  19. Global $PlayerGUID, $CurGUID
  20. Global $CurName, $CreatedBy
  21. Global $NumObjects = 0, $CurOutputString = ""
  22.  
  23. While $ObjectManager = 0
  24.     $ObjectManager = _WoWGetObjManager($hProcess)
  25.    
  26.     If $ObjectManager = 0 Then
  27.         Sleep(100)
  28.     EndIf
  29. WEnd
  30.  
  31. While $CurObject = 0
  32.     $CurObject = _WoWGetFirstObject($hProcess, $ObjectManager)
  33.    
  34.     If $CurObject = 0 Then
  35.         Sleep(100)
  36.     EndIf
  37. WEnd
  38.  
  39. $PlayerGUID = _WoWGetLocalGUID($hProcess)
  40.  
  41. ConsoleWrite(StringFormat("Player GUID: 0x%08X", $PlayerGUID) & @CR)
  42.  
  43. ;--------------------------------------------------
  44. ; OBJECT DUMP LOOP
  45. ;--------------------------------------------------
  46. ConsoleWrite(@CR & "WoW AutoIt Object Dump" & @CR)
  47.  
  48. While ($CurObject <> 0 And BitAND($CurObject, 1) = 0)
  49.     $NumObjects += 1
  50.    
  51.     $CurGUID = _WoWGetObjectGUID($hProcess, $CurObject)
  52.     $CurType = _WoWGetObjectType($hProcess, $CurObject)
  53.    
  54.     $CurOutputString = StringFormat("% 3i: 0x%08X | %13s | %s", $NumObjects, $CurGUID, _WoWGetTypeString($CurType), _WoWGetName($hProcess, $CurObject))
  55.    
  56.     If $CurType = $OT_GameObject Then
  57.         $CreatedBy = _WoWGetKnownField($hProcess, $CurObject, $OBJECT_FIELD_CREATED_BY)
  58.         If $CreatedBy <> 0 Then
  59.             $CurOutputString &= StringFormat(" | Created By: 0x%08X", $CreatedBy)
  60.             If $CreatedBy = $PlayerGUID Then
  61.                 $CurOutputString &= " -- THIS OBJECT WAS CREATED BY YOUR PLAYER (Fishing Bobber?)"
  62.             EndIf
  63.         EndIf
  64.     EndIf
  65.    
  66.     If $CurGUID = $PlayerGUID Then
  67.         $CurOutputString &= " <<<<<<<<<< YOU"
  68.     EndIf
  69.    
  70.     ConsoleWrite($CurOutputString & @CR)
  71.    
  72.     $CurObject = _WoWGetNextObject($hProcess, $CurObject)
  73. WEnd
  74.  
  75. _BMCloseHandle($hProcess)
  76. _BMDispose()
Advertisement
Add Comment
Please, Sign In to add comment