[Autoit] AFK BGbot learning problems menu

Shout-Out

User Tag List

Results 1 to 8 of 8
  1. #1
    Sealteams's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Autoit] AFK BGbot learning problems

    I've been trying to make a little personal afk bgbot with autoit. (I've never really done any code at all ever and this is the result of an hour or two on their forums/reading the helpfile)

    I've tried two different things to get it to work.

    My first try(I originally used ControlSend() with wow minimized but that didn't work at all:
    Code:
    $startup = MsgBox(0x41, "AFKer", "F5 to start and F6 to cancel")
    
    If $startup = 2 Then
    	MsgBox(0, "Seal's Afker", "Bot Closed")
    	Exit
    EndIf
    
    HotKeySet("{F5}", "hide")
    HotKeySet("{F6}", "show")
    
    While 1
       Sleep(1000)
    WEnd
    
    Func hide()
       Global $Show = 0
       WinSetState( "World of Warcraft", "", @SW_MINIMIZE)
       WinActivate("World of Warcraft")
       If @error Then
          MsgBox(0, "error", "Start WoW Please")
       Else
          While 1
    		  $unique = Random(1, 5, 1)
    			 Do
    			  Sleep(6000000 + Random(40000, 60000, 1))
    			  ControlSend( "World of Warcraft", "", "", "{Enter}/camp{Enter}")
    			  Sleep(31000 + Random(10000, 70000, 1))
    			  ControlSend( "World of Warcraft", "", "", "{Enter}")
    		  Until $unique = 6
    		     Do
    			  ControlSend( "World of Warcraft", "", "", "9", 1)
    			  Sleep(18000 + Random(1, 1000, 1))
    		  Until $unique = 6
    		 Sleep(100) 
             If $unique = 1 Then
                ControlSend( "World of Warcraft", "", "", "{UP DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{UP UP}")
                ControlSend( "World of Warcraft", "", "", "{DOWN DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{DOWN UP}")
                Sleep(200000 + Random(5000, 15000, 1))
             ElseIf $unique = 2 Then
                ControlSend( "World of Warcraft", "", "", "{RIGHT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{RIGHT UP}")
                ControlSend( "World of Warcraft", "", "", "{LEFT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{LEFT UP}")
                Sleep(200000 + Random(5000, 15000, 1))
             ElseIf $unique = 3 Then
                ControlSend( "World of Warcraft", "", "", "{DOWN DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{DOWN UP}")
                ControlSend( "World of Warcraft", "", "", "{UP DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{UP UP}")
                Sleep(200000 + Random(5000, 15000, 1))
             ElseIf $unique = 4 Then
                ControlSend( "World of Warcraft", "", "", "{LEFT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{LEFT UP}")
                ControlSend( "World of Warcraft", "", "", "{RIGHT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{RIGHT UP}")
                Sleep(200000 + Random(5000, 15000, 1))
    		ElseIf $unique = 5 Then
                ControlSend( "World of Warcraft", "", "", "{LEFT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{LEFT UP}")
                ControlSend( "World of Warcraft", "", "", "{RIGHT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                ControlSend( "World of Warcraft", "", "", "{RIGHT UP}")
                Sleep(200000 + Random(5000, 15000, 1))
             EndIf
             If $Show > 0 Then ExitLoop
          WEnd
       EndIf
    EndFunc   ;==>hide
    
    Func show()
       Global $Show = 1
       WinSetState("World of Warcraft", "", @SW_SHOW)
       WinSetState("World of Warcraft", "", @SW_MAXIMIZE)
       WinActivate( "World of Warcraft", "")
    EndFunc   ;==>show
    Second try(tried other stuff):
    Code:
    $startup = MsgBox(0x41, "AFKer", "F5 to start and F6 to cancel")
    
    If $startup = 2 Then
    	MsgBox(0, "Seal's Afker", "Bot Closed")
    	Exit
    EndIf
    
    HotKeySet("{F5}", "hide")
    HotKeySet("{F6}", "show")
    
    While 1
       Sleep(1000)
    WEnd
    
    Func hide()
       Global $Show = 0
       AutoItSetOption( "SendKeyDelay", 50)
       WinActivate("World of Warcraft")
       WinSetOnTop("World of Warcraft", "", 0)
       WinWaitActive("World of Warcraft")
       If ProcessExists("Wow.exe") Then
    		   $unique = Random(1, 5, 1)
    		ElseIf $unique = 1 Then
                Send("{UP DOWN}")
                Sleep(100 + Random(1, 50, 1))
                Send("{UP UP}")
                Send("{DOWN DOWN}")
                Sleep(100 + Random(1, 50, 1))
                Send("{DOWN UP}")
                Sleep(200000 + Random(5000, 15000, 1))
    		ElseIf $unique >= 2 Then
                Send("{RIGHT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                Send("{RIGHT UP}")
                Send("{LEFT DOWN}")
                Sleep(100 + Random(1, 50, 1))
                Send("{LEFT UP}")
                Sleep(200000 + Random(5000, 15000, 1))
    		EndIf
    	While 1
    			 Do
    			  Sleep(6000000 + Random(40000, 60000, 1))
    			  Send("{Enter}/camp{Enter}")
    			  Sleep(31000 + Random(10000, 70000, 1))
    			  Send("{Enter}")
    		  Until $unique = 6
    		     Do
    			  Send("9")
    			  Sleep(18000 + Random(1, 1000, 1))
    		  Until $unique = 6	
    	WEnd
    EndFunc   ;==>hide
    
    Func show()
       Global $Show = 1
       WinSetState("World of Warcraft", "", @SW_SHOW)
       WinSetState("World of Warcraft", "", @SW_MAXIMIZE)
       WinActivate( "World of Warcraft", "")
    EndFunc   ;==>show
    In both instances, the bot is completely unresponsive in wow. I can't get anything to work. Oh and btw, the 9 key is a join/leave bg macro I made. I just want it to press 9, randomly move, and logout every 10 mins (preferably while minimized, but we'll see).

    Can anyone who is experienced spot my errors? I'm not sure if I have any rep to give, but any help would be extremely appreciated.:waveI know I'm probably one of the biggest leechers on this site i dont do anything lol)

    sorry about my engrish, I don't think it's the best.
    Last edited by Sealteams; 10-07-2009 at 09:44 PM.

    [Autoit] AFK BGbot learning problems
  2. #2
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    136
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont have a clue about AutoIt. But to me it seems like you just want to be able to send keycommands to wow? I pasted a 10 liner code that does just this in c# in another thread yesterday.

    So if you can consider learing a "real" language. Have a look at this thread.
    http://www.mmowned.com/forums/wow-me...blem-keys.html

  3. #3
    Sealteams's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why is Autoit not a real language? I read your thread and did the thing you wanted with Autoit in 30 secs.

    Code:
    $answer = MsgBox(4, "World of Warcraft", "Run World of Warcraft?")
    
    If $answer = 7 Then
    	MsgBox(0, "Not Now?", "You'll be back")
    	Exit
    EndIf
    
    Run( "E:\Games\3.22 Client\Wow.exe")
    
    WinActivate("World of Warcraft")
    WinSetOnTop("World of Warcraft", "", 0)
    
    Sleep(10000)
    
    If ProcessExists("Wow.exe") Then
    	AutoItSetOption( "SendKeyDelay", 50)
    	Send( "PASSWORD{ENTER}")
    	Sleep(1000)
    Endif
    That opens wow and logs in automatically for me. Now, I don't know very much about other codes but, autoit seems to satisfy all the things that I'm looking for. The problem lies with my code, not the language.

  4. #4
    complxor's Avatar Member
    Reputation
    1
    Join Date
    Aug 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think he meant autoit is not a real language by the definition of what a language is, autoit is considered more of a script.

    I personally think theres room for autoit for certain quick tasks, but most of the time c++ or c# is best for this kind of things.

    Can you post the login part of your autoit script, I was thinking about doing something in autoit and this would be really useful. Thanks.

  5. #5
    Sealteams's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its in my second post, just change the directory of your wow and be sure to use the actual wow.exe and not the launcher. Also where is says PASSWORD in the code enter your real password. You can modify the sleep(10000) to a shorter time, too. (I use on an external HDD and I have to wait 5 or 6 seconds for wow to launch.)

  6. #6
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    136
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im sorry if I misunderstood your question. I thought you just wanted to be able to send commands to wow minimized.

    Doing more advanced things later on, which you most likely want, is a pain in the ass with AutoIt.
    At least that's what I've heard. But as I said earlier, I don't understand AutoIt so I might be wrong.

  7. #7
    Creepwalker's Avatar Active Member
    Reputation
    39
    Join Date
    Oct 2008
    Posts
    202
    Thanks G/R
    19/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using autoit to send keystrokes to WoW while minimized is rather simple

    Code:
    DIM $PROCESS= WINGETPROCESS("World of Warcraft")
    GLOBAL $HWND= WINGETHANDLE("[CLASS:GxWindowClassD3d]")
    
    ..
    ....
    .......
    
    Func Yahoo()
    CONTROLSEND($HWND, "", "", "yahoo")
    Endfunc
    Should work




    Code:
    FUNC CHECKPROCESS()
    IF PROCESSEXISTS("wow.exe")= 0 THEN
    SLEEP(100)
    MSGBOX(0, "Error", "WoW is Not Running")
    SLEEP(100)
    TERMINATE()
    ELSEIF PROCESSEXISTS("wow.exe") THEN
    SLEEP(200)
    TRAYTIP("World Of Warcraft Window Found", "Good to go", 1)
    ENDIF
    ENDFUNC


    And if you're running the shitbag that is Vista, run your stuff as admin
    Last edited by Creepwalker; 10-08-2009 at 03:32 PM.

  8. #8
    Sealteams's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a million

Similar Threads

  1. How To: Learn Basic AutoIt
    By Glynbeard in forum Community Chat
    Replies: 25
    Last Post: 04-07-2011, 07:19 AM
  2. [Autoit][3.1.3] Problem with interact with npcs
    By grigitokarz in forum WoW Memory Editing
    Replies: 1
    Last Post: 08-19-2009, 03:40 PM
  3. Making an anti-afk bot with AutoIT the easy way.
    By Tsai in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 10-02-2007, 04:22 PM
  4. AutoIt Secure AFK Bot
    By Nightfel in forum World of Warcraft Bots and Programs
    Replies: 7
    Last Post: 07-24-2007, 10:50 AM
  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:23 AM. 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