[AutoIt + 3.2] X,Y,Z,Rot Scanner menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  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)

    [AutoIt + 3.2] X,Y,Z,Rot Scanner

    I know I know... I need to learn a REAL language. I'm working on it but for those who are using AutoIt to graps the idea of memory reading and stuff, here is an X,Y,Z,Rotation scanner written in AutoIt. Credits are included in the code. The formatting is messed up a bit from my copy/paste into the post.

    Code:
    ; This script simply scans WoW for player X,Y,Z,Rotation
    
    ; Credits:	Nomad for the memory functions
    ;			Larry for the SETPRIVILEGE function
    ;			Static-X for the original teleporter script
    ;			The Memory Editing folks at www.mmowned.com
    ;				for the memory locations and great examples
    
    SETPRIVILEGE("SeDebugPrivilege", 1)
    
    ; Some Constants so I dont have to "include" them
    Global Const $WS_EX_TOPMOST 	= 8
    Global Const $GUI_EVENT_CLOSE	= -3
    
    ; Variable Declarations
    Global $UPDATE = False
    Global $Process, $WoWProcess
    Global $PlayerBase ; [[[0x012BEDB8]+0x34]+0x24]
    
    ; Set Process ID from WoW Window title
    If WinExists("World of Warcraft") Then
    	$Process = WinGetProcess("World of Warcraft")
    	$WoWProcess = _MemoryOpen($Process)
    ElseIf WinExists("WORLD OF WARCRAFT") Then
    	$Process = WinGetProcess("WORLD OF WARCRAFT")
    	$WoWProcess = _MemoryOpen($Process)
    Else
    	MsgBox(4096, "Error", "Unable to find WoW!")
    	Exit
    EndIf
    
    ; set player base
    $PlayerBase = _MemoryRead(_MemoryRead(_MemoryRead(0x012BEDB8, $WoWProcess, 'ptr') + 0x34, $WoWProcess, 'ptr') + 0x24, $WoWProcess, 'ptr')
    
    GUICreate("XYZR Info", 190, 120, -1, -1, -1, $WS_EX_TOPMOST)
    
    GUICtrlCreateLabel("X:", 5, 5, 15, 15)
    $LBL_X = GUICtrlCreateLabel("----", 25, 5, 160, 15)
    
    GUICtrlCreateLabel("Y:", 5, 25, 15, 15)
    $LBL_Y = GUICtrlCreateLabel("----", 25, 25, 160, 15)
    
    GUICtrlCreateLabel("Z:", 5, 45, 15, 15)
    $LBL_Z = GUICtrlCreateLabel("----", 25, 45, 160, 15)
    
    GUICtrlCreateLabel("R:", 5, 65, 15, 15)
    $LBL_R = GUICtrlCreateLabel("----", 25, 65, 160, 15)
    
    $BTN_GO = GUICtrlCreateButton("Start", 5, 90, 180, 25)
    
    
    GUISetState()
    
    While 1
        $msg = GUIGetMsg()
        Switch $msg
    		Case $GUI_EVENT_CLOSE
    			_MemoryClose($Process)
                Exit
            Case $BTN_GO
                If $UPDATE = False Then
    				$UPDATE = True
    				GUICtrlSetData($BTN_GO, "Stop")
    			Else
    				$UPDATE = False
    				GUICtrlSetData($BTN_GO, "Start")
    			EndIf
    	EndSwitch
    	
    	UPDATE()
    WEnd
    
    Func UPDATE()
    	If $UPDATE = True Then
    		; Set X data
    		GUICtrlSetData($LBL_X, _MemoryRead($PlayerBase + 0x798, $WoWProcess, "float"))
    		
    		; Set Y data
    		GUICtrlSetData($LBL_Y, _MemoryRead($PlayerBase + 0x79C, $WoWProcess, "float"))
    		
    		; Set Z data
    		GUICtrlSetData($LBL_Z, _MemoryRead($PlayerBase + 0x7A0, $WoWProcess, "float"))
    		
    		; Set Rotation data
    		GUICtrlSetData($LBL_R, _MemoryRead($PlayerBase + 0x7A8, $WoWProcess, "float"))
    	EndIf
    EndFunc
    
    #Region - Memory
    Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $iv_InheritHandle = 1)
        
        If Not ProcessExists($iv_Pid) Then
            SetError(1)
            Return 0
        EndIf
        
        Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
        
        If @Error Then
            SetError(2)
            Return 0
        EndIf
        
        Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $iv_InheritHandle, 'int', $iv_Pid)
        
        If @Error Then
            DllClose($ah_Handle[0])
            SetError(3)
            Return 0
        EndIf
        
        $ah_Handle[1] = $av_OpenProcess[0]
        
        Return $ah_Handle
        
    EndFunc
    
    Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
        
        If Not IsArray($ah_Handle) Then
            SetError(1)
            Return 0
        EndIf
        
        Local $v_Buffer = DllStructCreate($sv_Type)
        
        If @Error Then
            SetError(@Error + 1)
            Return 0
        EndIf
        
        DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
        
        If Not @Error Then
            Local $v_Value = DllStructGetData($v_Buffer, 1)
            Return $v_Value
        Else
            SetError(6)
            Return 0
        EndIf
        
    EndFunc
    
    Func _MemoryClose($ah_Handle)
        
        If Not IsArray($ah_Handle) Then
            SetError(1)
            Return 0
        EndIf
        
        DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
        If Not @Error Then
            DllClose($ah_Handle[0])
            Return 1
        Else
            DllClose($ah_Handle[0])
            SetError(2)
            Return 0
        EndIf
        
    EndFunc
    
    Func SetPrivilege( $privilege, $bEnable )
        Const $MY_TOKEN_ADJUST_PRIVILEGES = 0x0020
        Const $MY_TOKEN_QUERY = 0x0008
        Const $MY_SE_PRIVILEGE_ENABLED = 0x0002
        Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
        $nTokens = 1
        $LUID = DLLStructCreate("dword;int")
        If IsArray($privilege) Then    $nTokens = UBound($privilege)
        $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
        $NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
        $hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
        $SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0],   _
                "int",BitOR($MY_TOKEN_ADJUST_PRIVILEGES,$MY_TOKEN_QUERY),"int*",0)
        If $SP_auxret[0] Then
            $hToken = $SP_auxret[3]
            DLLStructSetData($TOKEN_PRIVILEGES,1,1)
            $nTokenIndex = 1
            While $nTokenIndex <= $nTokens
                If IsArray($privilege) Then
                    $priv = $privilege[$nTokenIndex-1]
                Else
                    $priv = $privilege
                EndIf
                $ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv,   _
                        "ptr",DLLStructGetPtr($LUID))
                If $ret[0] Then
                    If $bEnable Then
                        DLLStructSetData($TOKEN_PRIVILEGES,2,$MY_SE_PRIVILEGE_ENABLED,(3 * $nTokenIndex))
                    Else
                        DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
                    EndIf
                    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
                    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
                    DLLStructSetData($LUID,1,0)
                    DLLStructSetData($LUID,2,0)
                EndIf
                $nTokenIndex += 1
            WEnd
            $ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0,   _
                    "ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES),   _
                    "ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int*",0)
            $f = DLLCall("kernel32.dll","int","GetLastError")
        EndIf
        $NEWTOKEN_PRIVILEGES=0
        $TOKEN_PRIVILEGES=0
        $LUID=0
        If $SP_auxret[0] = 0 Then Return 0
        $SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
        If Not $ret[0] And Not $SP_auxret[0] Then Return 0
        return $ret[0]
    EndFunc  ;==>SetPrivilege
    
    #endregion

    [AutoIt + 3.2] X,Y,Z,Rot Scanner
  2. #2
    karliky's Avatar Contributor Authenticator enabled
    Reputation
    112
    Join Date
    Jun 2007
    Posts
    69
    Thanks G/R
    6/27
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  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)
    that is what I am learning now with some other apps.

  4. #4
    Chronos1337's Avatar Private
    Reputation
    1
    Join Date
    Oct 2009
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this still working?

  5. #5
    dealerchen's Avatar Member
    Reputation
    1
    Join Date
    Sep 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Chronos1337 View Post
    Is this still working?
    1. why dont you just try it? its actually faster tehn waiting for an answer
    2. to answer: i would say it works for 3.2.0 and if you update the memory addresses it should also work for 3.2.2a.

  6. #6
    Multitask's Avatar Contributor

    Reputation
    158
    Join Date
    Jan 2008
    Posts
    1,112
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Chronos1337 View Post
    Is this still working?
    dont bump old threads.

    also, you would know if this was "working" if you knew what you were going to do with it.....

Similar Threads

  1. AutoIT
    By ashkanesla in forum World of Warcraft Bots and Programs
    Replies: 5
    Last Post: 08-31-2006, 12:43 PM
  2. [Autoit help]Modify hotkey to rightclick(fishbot)
    By darknavi in forum World of Warcraft General
    Replies: 4
    Last Post: 07-01-2006, 09:31 PM
  3. No fall dmg (autoIT)
    By KuRIoS in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 06-19-2006, 12:22 PM
  4. autoIT question
    By Vel0city in forum World of Warcraft General
    Replies: 3
    Last Post: 06-18-2006, 02:54 PM
  5. AutoIt Macro for WoW AFK Bot
    By Matt in forum World of Warcraft Bots and Programs
    Replies: 8
    Last Post: 04-06-2006, 06:01 AM
All times are GMT -5. The time now is 01:04 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