Autoit wow bot menu

These ads disappear when you log in.

Results 1 to 12 of 12
  1. #1
    00162's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)

    Autoit wow bot

    I took some codes from various anti afk bots and wanted to tweak it for my own use but for some reason am running into an issue.


    The two bolded parts are what is not working i want it to press 1 then twho then 3 then reset back to the Join function.

    Can anyone help?

    Code:
    HotKeySet("{F5}", "TogglePause")
    HotKeySet("{F6}", "ExitBot")
    $txt = 'All credits:\nMe'
    $txt = stringreplace($txt,'\n',@LF) 
    
    $Key_PvPWindow = "h"
    $Key_joinQueue = "{4}" ; /script JoinBattlefield(0);
    $Key_Confirm = "{1}" ; /script AcceptBattlefieldPort(1,1);
    $Key_Idle = "1"
    $Key_Target = "[2}" 
    $Key_Attack = "[3}"
    
    Global $Paused, $WinTitle ='World of Warcraft'
    TogglePause()
    
    Msgbox(262144, "Thank You", $txt)
    
    SetPrivilege("SeDebugPrivilege", 1)
    
    $Process = WinGetProcess("World of Warcraft")
    $hWnd = WinGetHandle("[CLASS:GxWindowClassD3d]")
    
    $WoWProcess = mem_open($Process)
    
    
    While NOT $Paused
    ToolTip('Running, F5 to pause, F6 to exit.',0,0)
    While True
    	$status = mem_read(0x00B6DFD8, $WoWProcess, "int")
    
    	switch $status
    	Case 0
    		joinQueue()
    	Case 1
    		idle()
    	Case 2
    		confirm()
    	case 3
    		idle()
    	EndSwitch
    WEnd
    WEnd
    
    Func joinQueue()
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_PvPWindow)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_joinQueue)
    	Sleep(500)
    	ControlSend($hWnd, "", "", "{ESC}")
    	Sleep(10000)
    EndFunc
    
    Func idle()
    	Sleep(10000)
    	ControlSend($hWnd, "", "", $Key_Idle)
    EndFunc
    
    Func confirm()
    	ControlSend($hWnd, "", "", $Key_Confirm)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_Target)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_Attack)
    	Sleep(500)
    EndFunc
    
    
    Func mem_open($iv_Pid)
    	Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
    	Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $iv_Pid)
    	$ah_Handle[1] = $av_OpenProcess[0]
    	Return $ah_Handle
    EndFunc
    
    Func mem_read($iv_Address, $ah_Handle, $sv_Type = 'dword')
    	Local $v_Buffer = DllStructCreate($sv_Type)
    	DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    	Local $v_Value = DllStructGetData($v_Buffer, 1)
    	Return $v_Value
    EndFunc
    
    Func mem_close($ah_Handle)
    	DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    	DllClose($ah_Handle[0])
    	Return 1
    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
    
    
    Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
    sleep(100)
    ToolTip('PAUSED!   Your welcome for the bot Chris, F5 to resume\start, F6 to exit.',0,0)
    WEnd
    ToolTip("")
    While NOT $Paused
    ToolTip('Running, F5 to pause, F6 to exit.',0,0)
    WEnd
    
    EndFunc
    
    Func ExitBot()
    $exit = MsgBox(262144, "Pvp Bot", "Exit?")
    
    
    If $exit = 1 Then
    EndIf
    If Msgbox(48, "Thank You", "How many levels did u get this time?") Then
    Exit 
    Endif
    EndFunc
    
    Func Terminate()
    Exit 0
    EndFunc
    /edit: Also the green part seems to flash when it is up

    These ads disappear when you log in.

  2. #2
    Zeroi9's Avatar Banned
    Reputation
    285
    Join Date
    Aug 2008
    Posts
    913
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Maybe becuse its [2}? not [2]? I dont know.

  3. #3
    XC4T4LY5TX's Avatar Banned
    Reputation
    136
    Join Date
    Jul 2007
    Posts
    835
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    i wish i could help :/ cause i need one of these lol

  4. #4
    maclone's Avatar / CoreCoins User Authenticator enabled
    Reputation
    2399
    Join Date
    Nov 2007
    Posts
    6,172
    Thanks G/R
    0/1017
    Trade Feedback
    0 (0%)
    Originally Posted by Zeroi9 View Post
    Maybe becuse its [2}? not [2]? I dont know.
    This, but it doesn't work because it's not {2}.
    Zomfg. And no, don't ask. - Dombo did it.

  5. #5
    00162's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Originally Posted by maclone View Post
    This, but it doesn't work because it's not {2}.
    I changed it to {2}, but are you saying thats not what it needs to be for the key set?

  6. #6
    drunreal's Avatar Master Sergeant
    Reputation
    0
    Join Date
    Jul 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    As maclone and Zeroi9 above mentioned

    Code:
    $Key_Target = "[2}" 
    $Key_Attack = "[3}"
    This is from your code please notice the parentheses !
    $Key_Attack = " [ 3 } "

    You see where is the problem ?

    {} - mean absolute value in autoit i think basically heres a more detailed explanation of usage

    [] - are mostly used for setting the closer destription of an array and such stuff !

    So simply it should be like this

    Code:
    $Key_Target = "{2}" 
    $Key_Attack = "{3}"
    Gl & Hf
    Last edited by drunreal; 04-05-2010 at 04:37 PM.

  7. #7
    00162's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Ya i did that still am having no luck it wont get past the tooltip (part in green)


    /edit remove the part in green but it is only doing the

    Code:
    Func joinQueue()
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_PvPWindow)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_joinQueue)
    	Sleep(500)
    	ControlSend($hWnd, "", "", "{ESC}")
    	Sleep(10000)
    EndFunc

    never gets to

    Code:
    Func confirm()
    	ControlSend($hWnd, "", "", $Key_Confirm)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_Target)
    	Sleep(500)
    	ControlSend($hWnd, "", "", $Key_Attack)
    	Sleep(500)
    EndFunc
    Last edited by 00162; 04-05-2010 at 05:48 PM.

  8. #8
    drunreal's Avatar Master Sergeant
    Reputation
    0
    Join Date
    Jul 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    How do you know ? tryed some debugging ?

  9. #9
    maclone's Avatar / CoreCoins User Authenticator enabled
    Reputation
    2399
    Join Date
    Nov 2007
    Posts
    6,172
    Thanks G/R
    0/1017
    Trade Feedback
    0 (0%)
    Your offset is wrong.
    Zomfg. And no, don't ask. - Dombo did it.

  10. #10
    00162's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Originally Posted by maclone View Post
    Your offset is wrong.


    And... i can do what to fix this? why would it not be pressing keys?

  11. #11
    drunreal's Avatar Master Sergeant
    Reputation
    0
    Join Date
    Jul 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Originally Posted by 00162 View Post
    And... i can do what to fix this? why would it not be pressing keys?
    Maybe because the event was not registred due to the bad offset ?

  12. #12
    00162's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    63
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Originally Posted by drunreal View Post
    Maybe because the event was not registred due to the bad offset ?
    k?....?????

Similar Threads

  1. [guide] how to create a wow bot using autoit (memory reading)
    By zamba1587 in forum WoW Memory Editing
    Replies: 17
    Last Post: 01-23-2017, 03:27 PM
  2. Lures & The Autoit Fishing Bot
    By Sydok in forum World of Warcraft General
    Replies: 6
    Last Post: 07-11-2006, 05:04 AM
  3. [WoW Bot] WoW Glider Full Version 0.6.8
    By Matt in forum World of Warcraft Bots and Programs
    Replies: 39
    Last Post: 05-08-2006, 12:15 AM
  4. World of Warcraft WoW!Bot (GetALifeBot) 0.61 for WoW 1.9.4 + FishBot
    By Matt in forum World of Warcraft Bots and Programs
    Replies: 43
    Last Post: 04-18-2006, 04:55 AM
All times are GMT -5. The time now is 08:30 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search