[3.1.2] Object Created By Help [AutoIT] menu

Shout-Out

User Tag List

Results 1 to 15 of 15
  1. #1
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [3.1.2] Object Created By Help [AutoIT]

    First off, awesome community... but deep stuff for a real newbie like me. Credits go out to members of this forum. I've copy and pasted so much from here trying to learn that I don't remember who did what, but none of it is mine! And yeah, AutoIT isn't really programming, but it's something I am familiar with so I wanted to try and get the concepts of this stuff down first.

    This is a little script that I think should work, and not sure if I just have offsets wrong or not. All it does is dump the fishing bobber objects to my console. That works. But I want to find which bobber is MINE! So I know that is where my problem is.

    Code:
    #include "BMmemory.au3"
    
    _BMInitialize()
    
    Const $ObjectTypeOffset = 0x14
    Const $ObjectGUIDOffset = 0x30
    Const $ObjectNextOffset = 0x3C
    
    Dim $hWOW = WinGetHandle("World of Warcraft")
    Global $WoWProcess = _BMOpenProcess($hWOW, False)
    Global $ObjDescriptorOffset = 0x8
    Global $OBJECT_FIELD_CREATED_BY = 0x6
    Global $aPlayerGUID = 0x011110E0
    Global $PlayerGUID = WoWGetLocalGUID($WoWProcess)
    
    
    ; Starting here!
    ConsoleWrite("Starting Dump...." & @CR)
    Sleep(2000)
    ConsoleWrite("Player: " & _BMReadASCIIString($WoWProcess, 0x01139FB8, 12) & @CR)
    
    ConsoleWrite("dumping now..." & @CR)
    ConsoleWrite("---------------------------" & @CR)
    ConsoleWrite("---------------------------" & @CR)
    
    FindObjects()
    
    _BMCloseHandle($WoWProcess)
    _BMDispose()
    
    ConsoleWrite("Done" & @CR & @CR)
    
    ; The End!
    
    ; Iterate through objects
    Func FindObjects()
    	Local $curobj, $nextobj
    	
    	; Get current object [[[0x01139F80] + 0x2C34] + 0xAC]
    	$curobj = _BMReadUint($WoWProcess, _BMReadUint($WoWProcess, _BMReadUint($WoWProcess, 0x01139F80) + 0x2C34) + 0xAC)
    	
    	While ($curobj <> 0 And BitAND($curobj, 1) = 0)
    		
    		; output to console
    		PrintInfo($curobj)
    		
    		; Get next object [curobj + 0x3C]
    		$nextobj = _BMReadUint($WoWProcess, $curobj + $ObjectNextOffset)
    		
    		If $nextobj = 0 AND $nextobj = $curobj Then ExitLoop
    		
    		$curobj = $nextobj
    	
    	WEnd
    
    EndFunc
    
    ; Print Object info to console bsed on object type
    Func PrintInfo($uBASE)
    	Local $uTYPE = _BMReadUint($WoWProcess, $uBASE + $ObjectTypeOffset)
    	Select
    		#cs
    		Case $uTYPE = 3
    			;;
    		Case $uTYPE = 4
    			;;
    		Case $uTYPE = 5 ; bobber is of this type
    			; I just want to look at bobbers!
    			If GetGameObjectName($uBASE) = "Fishing Bobber" Then
    				ConsoleWrite("Current object: " & $uBASE & @CR)
    				ConsoleWrite("Type: Game Object"& @CR)
    				ConsoleWrite("Name: " & GetGameObjectName($uBASE) & @CR)
    				
    				$CreatedBy = WoWGetKnownField($WoWProcess, $uBASE, $OBJECT_FIELD_CREATED_BY)
    				If $CreatedBy <> 0 Then
    					If $CreatedBy = $playerGUID Then 
    						ConsoleWrite("YOU created this bobber!"& @CR)
    					EndIf
    				EndIf
    				ConsoleWrite("---------------------------" & @CR)
    			EndIf
    	EndSelect
    EndFunc
    
    
    
    ; excerpt from WOWfuncs.au3
    
    Func WoWGetLocalGUID($Handle)
    	Return _BMReadInt($Handle, $aPlayerGUID)
    EndFunc
    
    Func WoWGetKnownField($Handle, $ObjectBase, $FieldIndex, $Type = "dword")
    	
    	Return _BMReadMemory($Handle, (_BMReadUint($Handle, ($ObjectBase + $ObjDescriptorOffset)) + ($FieldIndex * 4)), $Type)
    	
    EndFunc
    
    Func GetObjectGUID($Handle, $ObjectBase)
    	
    	Return _BMReadUInt($Handle, ($ObjectBase + $ObjectGUIDOffset))
    	
    EndFunc
    
    ; returns name of object
    Func GetGameObjectName($uBASE)
      
      Return _BMReadASCIIString($WoWProcess, _BMReadUint($WoWProcess, _BMReadUint($WoWProcess, $uBASE + 0x1A4) + 0x88), 256)
      
    EndFunc
    
    ; returns name of unit
    Func GetUnitName($uBASE)
    	
    	Return _BMReadASCIIString($WoWProcess, _BMReadUint($WoWProcess, _BMReadUint($WoWProcess, $uBASE + 0x968) + 0x54), 256)
    	
    EndFunc

    [3.1.2] Object Created By Help [AutoIT]
  2. #2
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the bobber's owner guid from it's descriptor fields.

  3. #3
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought this was supposed to do it:

    Code:
    $CreatedBy = WoWGetKnownField($WoWProcess, $uBASE, $OBJECT_FIELD_CREATED_BY)
    oper the function:

    Code:
    Func WoWGetKnownField($Handle, $ObjectBase, $FieldIndex, $Type = "dword")
    	
    	Return _BMReadMemory($Handle, (_BMReadUint($Handle, ($ObjectBase + $ObjDescriptorOffset)) + ($FieldIndex * 4)), $Type)
    	
    EndFunc

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh. I didn't see that you were using that. Are you comparing it to your guid? Also, you need to read it as ulong or w/e it is in auto-it(64-bits). Is it saying that you created the bobber or not? I won't bother checking to see if that offset for created_by is right. That code should be working. Also, are you setting debug privs?

  5. #5
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way that AutoIt handles int64s is all ****ed up, which is why he's reading GUIDs as dwords, though it may have been fixed in one of the latest betas (I know it was rumored to be in the works). Looks like most of this comes from http://www.mmowned.com/forums/wow-me...ct-dumper.html which, at least in 3.1.0, worked just fine for finding the player's bobber.

  6. #6
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that and a C# console code are what I am using as my references. The object dumper worked in 3.1.0 but not now. I am just going to start over with the dumper and make sure everything is up to date first. I think that is my problem, I have picked around so much that I am missing something easy.

  7. #7
    Overon's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...
    Func WoWGetKnownField($Handle, $ObjectBase, $FieldIndex, $Type = "dword")
    ...
    You can simply use $Type = "Uint64" and AutoIT reads 8bytes. If you write the Value to Console or GUI it can be negative, but it woks fine.


    edit:
    you can read this in the Help File. Search for "DllStructCreate".


    Type -> Details
    byte -> 8bit(1byte) signed char
    ubyte -> 8bit(1byte) unsigned char
    char -> 8bit(1byte) ASCII char
    wchar -> 16bit(2byte) Wide char
    short -> 16bit(2bytes) signed integer
    ushort -> 16bit(2bytes) unsigned integer
    int -> 32bit(4bytes) signed integer
    uint -> 32bit(4bytes) unsigned integer
    long -> 32bit(4bytes) signed integer
    ulong -> 32bit(4bytes) unsigned integer
    dword -> 32bit(4bytes) unsigned integer
    ptr -> 32bit(4bytes) integer
    hwnd -> 32bit(4bytes) integer
    float -> 32bit(4bytes) floating point
    double -> 64bit(8bytes) floating point
    int64 -> 64bit(8bytes) signed integer
    uint64 -> 64bit(8bytes) unsigned integer
    int_ptr -> 32 or 64bit signed integer (depending on if the x86 or x64 version of AutoIt is used)
    uint_ptr -> 32 or 64bit signed integer (depending on if the x86 or x64 version of AutoIt is used)
    long_ptr -> 32 or 64bit unsigned integer (depending on if the x86 or x64 version of AutoIt is used)
    ulong_ptr -> 32 or 64bit unsigned integer (depending on if the x86 or x64 version of AutoIt is used)
    Last edited by Overon; 06-05-2009 at 03:31 AM.

  8. #8
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is this right then for finding the playerGUID in 3.1.2?

    playerGUID = [[0x1139F80 + 0x2C34] + 0xC0]

  9. #9
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. (filler)

  10. #10
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kk... thought so, wanted a confirmation, thanks... so my next step is to find the object's owner(created by). And that would be?

    [[object base + 0x8] + (0x6 * 4)]

    I think my values are wrong though.

  11. #11
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, if that's what the descriptor offsets are.
    [[obj + 0x8]+(CREATED_BY*0x4)]

  12. #12
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks... think my offsets are wrong then... cuz it aint doing it right. I look around more, but thanks again for the reconfirmation!

  13. #13
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it'll be a GUID, not the unit base. I'm not sure how you could get this wrong =/ the newest descriptor dumps are in the 3.1.3 thread.

  14. #14
    xwinterx's Avatar Member
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah... was using the object's base, not the GUID for the object. so then for the GUID I need?

    [ObjectBase + 0x30]

  15. #15
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. (filler)

Similar Threads

  1. Mangos Making objects unclickble plox help
    By lorht in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 06-11-2009, 11:57 AM
  2. [help][autoit][general programming]
    By personinquestion in forum WoW Memory Editing
    Replies: 13
    Last Post: 05-07-2009, 12:05 PM
  3. WoW error: Cant create socket. Help pls.
    By milvan in forum World of Warcraft General
    Replies: 0
    Last Post: 11-30-2008, 03:07 PM
  4. My first helpful AutoIt program
    By jdismeuc in forum World of Warcraft Bots and Programs
    Replies: 21
    Last Post: 05-14-2008, 10:14 AM
  5. How do I keep game objects forever. PLZ HELP!
    By chocodog in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 10-01-2007, 09:20 PM
All times are GMT -5. The time now is 06:11 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search