Gaming Community
Forum
 
Go Back   D3scene > Hot Games > Warcraft 3 forum
Register Blogs Live view Downloads Marketplace FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Bobbert's LossBot Tutorial

This is a discussion on Bobbert's LossBot Tutorial within the Warcraft 3 forum forum part of the Hot Games category; For this tutorial you will need AutoIt . Also, Scite will be useful. Scite is the editor, which make life ...


Welcome on D3scene.com! Make sure to register - it's free and very quick! You have to register before you can post and participate in our discussions with 70000 other registered members. Downloads, user profiles and some forums can only be seen by registered members. After you create your free account you will be able to customize many options, you will have the full access to new hacks, latest cheats and last but not least will see no advertisements at all. We would love to see you around in our community!
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-15-2007, 07:24 PM
Addict

 
Join Date: Jul 2007
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 51
Rep Power: 3
Bobbert will become famous soon enough
Bobbert's LossBot Tutorial

For this tutorial you will need AutoIt.
Also, Scite will be useful. Scite is the editor, which make life easer.

Well, we all know that we can search for a game using Alt+Q (when in a chat channel). Also when you are in a game, you can press F10 to bring up the options menu, E for end game and Q for quit mission and finally Enter lets you leave the score screen. With this in mind we can create this:

Code:
Send("{!Q") ; to search a game
  Send("{F10}") ; options menu
  Send(“E”) ; end game
  Send(“Q”) ; quit
  Send(“{Enter}”) ; leaves score screen
The above will send these keys very quickly, and will not do much good. So lets add a loop, which will send these keys over and over again.

Code:
While 1
  Send("!Q") ; to search a game
  Send("{F10}") ; options menu
  Send(“E”) ; end game
  Send(“Q”) ; quit
  Send(“{Enter}”) ; leaves score screen
  Sleep(10)
  WEnd
Sleep(1000) is equal to 1 second so the added sleep will make it wait .001 of a second before it sends the keys again. Although this is a relatively small time, it will reduce your CPU usage greatly.
Now, we don’t want they keys to be sent all the time without stopping, and it would also be handy to be able to start and stop easily.

Code:
Dim $stop = 0 ; We will make this start off, so it doesn’t send keys without being ready.

HotKeySet("{F4}", "toggel") ; Whenever you press F4 it will call the function "toggel" aka turn on and off
HotKeySet("{F5}", "off") ;when you press F5 it will call the off function and Quit.

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then ; Will make sure the window is acitctive before sending the keys
            Send("!Q") ; to search a game
            Send("{F10}") ; options menu
            Send("!E") ; end game
            Send("!Q") ; quit
            Send("{Enter}") ; leaves the scores screen
            Sleep(10) ; reduces CPU usage
        EndIf
    EndIf
WEnd


Func toggel()
    If $stop = 0 Then
        $stop = 1 ; change the bot to on
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0 ; change the bot to off
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit ; will quit the bot
EndFunc
Now we have a function lossbot congrats! Notice this lossbot will leave the game automatically. To make this bot leave at different times we can use the pixel search.


#Important note: The colours used in pixel search could vary between machines, so your bot might not work on someone else’s computer.
Now, how do we use the pixel search command? Fortunately AutoIt has a handy tool to help us out with this. In the AutoIt folder there is a program called Au3Info.exe. I would suggest familiarizing yourself with the tool. In the summary tab you will find info about the window, as well as info about your mouse. Also you will notice you can freeze the window with a hotkey (under the options menu). So now we go into warcraft, join a chat channel and find a point on you screen that is always the same colour. For this tutorial, I will pick the lions head. Move you mouse there and press the freeze hotkey (for me it is Ctrl+Alt+F). Now minimize, and check the Au3.info tool. You will be able to see a location and colour. Now we can make our first pixel search check. With this information, lets get back to our script.
We will notice the when we use the PixelSearch() option, there are various requirements to make it work. Basically it will check a square (using given co-ordinates) for the specified colour. With this knowledge we can add this to our script. Notice how we only have 2 points and not 4, also we don’t want to search a square, just a point. To do this we will put the co-ordinates twice, so the top left corner and bottom right corner are the same point. (You will find the co-ordinates that were under you mouse in the summary tab). Now we need a colour. We will also use the colour that was under our mouse (makes sense? ) When you are done it should look something like this. PixelSearch(34, 145, 34, 145, 0xE3E3E3). Note: yours might be different co-ordinates and colour. Now when you are in a game we can use one of the minimap signals. I got 217, 590 and 0x977B10 coming out with PixelSearch(217, 590, 217, 590, 0x977B10). Now we are ready to add this to our script. When done it should look something like this:

Code:
Dim $stop = 0 ; We will make this start off, so it doesn’t send keys without being ready.

HotKeySet("{F4}", "toggel") ; Whenever you press F4 it will call the function "toggel" aka turn on and off
HotKeySet("{F5}", "off") ;when you press F5 it will call the off function and Quit.

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then ; Will make sure the window is acitctive before sending the keys
            $coord = PixelSearch(34, 145, 34, 145, 0xE3E3E3) ; checks to see if in a chat channel
            If Not @error Then
                Send("!Q") ; to search a game
            EndIf
            $coord = PixelSearch(217, 590, 217, 590, 0x977B10) ; checks to see if in the game
            If Not @error Then
                Send("{F10}") ; options menu
                Send("!E") ; end game
                Send("!Q") ; quit
                Send("{Enter}") ; leaves the scores screen
            EndIf
            Sleep(10) ; reduces CPU usage
        EndIf
    EndIf
WEnd


Func toggel()
    If $stop = 0 Then
        $stop = 1 ; change the bot to on
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0 ; change the bot to off
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit ; will quit the bot
EndFunc
What happens if we don’t want to leave right away? What happens if we want to wait 3 mins, to get wins from other lossbotters? Now we can do that! After the bot sees it is in the game, we can just add a sleep(time), which will make the script idol. We also need to make sure that if we want to wait a long time before leaving, and the opponent kills us, we want the bot to keep going. For this we will add another pixel search on the end game screen. I got PixelSearch(199, 497, 199, 497, 0xC19E74). The final product is now below.

Code:
Dim $stop = 0 ; We will make this start off, so it doesn’t send keys without being ready.

HotKeySet("{F4}", "toggel") ; Whenever you press F4 it will call the function "toggel" aka turn on and off
HotKeySet("{F5}", "off") ;when you press F5 it will call the off function and Quit.

While 1
    If $stop = 1 Then
        If WinActive("Warcraft III") Then ; Will make sure the window is acitctive before sending the keys
            $coord = PixelSearch(34, 145, 34, 145, 0xE3E3E3) ; checks to see if in a chat channel
            If Not @error Then
                Send("!Q") ; to search a game
            EndIf
            $coord = PixelSearch(217, 590, 217, 590, 0x977B10) ; checks to see if in the game
            If Not @error Then
                Sleep(5000) ; this sleeps 5 seconds. So 60000 is 1 minute. CHANGE THIS TO SET THE DELAY!!!!
                Send("{F10}") ; options menu
                Send("!E") ; end game
                Send("!Q") ; quit
            EndIf
            $coord = PixelSearch(199, 497, 199, 497, 0xC19E74) ; This will make sure that if your opponent kills you before you quit, it will still keep going
            If Not @error Then
                Send("{Enter}") ; leaves the scores screen
            EndIf
            Sleep(10) ; reduces CPU usage
        EndIf
    EndIf
WEnd


Func toggel()
    If $stop = 0 Then
        $stop = 1 ; change the bot to on
        ToolTip("LossBot = ON", 0, 0)
    Else
        $stop = 0 ; change the bot to off
        ToolTip("LossBot = OFF", 0, 0)
    EndIf
EndFunc

Func off()
    Exit ; will quit the bot
EndFunc


I will add a section later on how to make a minimized lossbot, or a lossbot that works while warcraft is minimized.
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!


The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
  #2  
Old 08-15-2007, 07:35 PM
Banned User

 
Join Date: Jun 2007
Location: USA
Posts: 1,258
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 25
Rep Power: 0
KaMiKaZe is on a distinguished road
Send a message via AIM to KaMiKaZe Send a message via MSN to KaMiKaZe Send a message via Skype™ to KaMiKaZe
You should add being able to make the hotkeys customizeable since there are many different languages of WC3 with different hotkeys.
Reply With Quote
  #3  
Old 08-15-2007, 07:52 PM
Addict

 
Join Date: Jul 2007
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 51
Rep Power: 3
Bobbert will become famous soon enough
When you make your own lossbot using the tutorial, you can easily replace them.
Reply With Quote
  #4  
Old 08-16-2007, 12:37 PM
xiN xiN is offline
The Almighty Frenchie

 
Join Date: Feb 2007
Location: Six feet under
Posts: 1,688
Thanks: 8
Thanked 12 Times in 9 Posts
Reputation: 314
Rep Power: 4
xiN is a jewel in the roughxiN is a jewel in the roughxiN is a jewel in the roughxiN is a jewel in the rough
can u make a at lossbot tutorial plz ?
Reply With Quote
  #5  
Old 08-16-2007, 04:36 PM
Addict

 
Join Date: Jul 2007
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Reputation: 51
Rep Power: 3
Bobbert will become famous soon enough
Haut-krebs wan'ts to make an at lossbot tutorial, so I will let him

Last edited by Bobbert; 08-16-2007 at 04:48 PM.
Reply With Quote
  #6  
Old 08-16-2007, 04:44 PM
OMFG H4X!!!


 
Join Date: Feb 2007
Location: Germany
Posts: 1,090
Thanks: 1
Thanked 9 Times in 4 Posts
Reputation: 338
Rep Power: 4
zReapeR is a jewel in the roughzReapeR is a jewel in the roughzReapeR is a jewel in the roughzReapeR is a jewel in the rough
Send a message via ICQ to zReapeR Send a message via MSN to zReapeR
FreeLoOse, when u have some phantasy u could make it urself, but if u want I can make it

+ Nice tut Phil!
Reply With Quote
  #7  
Old 08-16-2007, 10:27 PM
xiN xiN is offline
The Almighty Frenchie

 
Join Date: Feb 2007
Location: Six feet under
Posts: 1,688
Thanks: 8
Thanked 12 Times in 9 Posts
Reputation: 314
Rep Power: 4
xiN is a jewel in the roughxiN is a jewel in the roughxiN is a jewel in the roughxiN is a jewel in the rough
i dont know something at lossbot making

Last edited by xiN; 08-17-2007 at 12:31 AM.
Reply With Quote
D3scene
Welcome to D3scene - probably the best location for all Gamers.

To participate in our friendly environment you have to register. After completing registration you will have full access to all threads and features. We care about members and try to make your stay as pleasant as possible. We are unique with the following feature for members - you will not see a single Advertisement!


The best: registration is completely free. It will not cost you a single penny or harm you in any way. You will lose nothing except 1 minute of your time. So why not register? We would be happy to see you around!
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
vBulletin style developed by Transverse Styles