Autoit Bot Tutorial 1 for Noobies

01/30/2010 17:08 ax5#1
Wheal today i am bord so i will make a easy autoit bot tutorial. Easy bot program 2010

You Will need this programs:


Lets start to make the program window we will use GUICreate form.
Quote:
GUICreate("My First Bot", 264, 175)
That was easy to make so now we need to add include files so the GUICreate from will works so add this codes on top of GUICreate. Like this
Quote:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

GUICreate("My First Bot", 264, 175)
Now we made the bot`s design bot we need 1 thing more to make the design work. we need to add a GUISetState code. So it will look like this.
Quote:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("My First Bot", 264, 175)
GUISetState(@SW_SHOW)
Now we need something to display a nice text to your bot like a description, So we will add a Label using GUICtrlCreateLabel and StaticConstants.au3. So it will look something like this.
Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
GUICreate("My First Bot", 264, 175)
GUICtrlCreateLabel("Discription here. Discription here. Discription here. Discription here. Discription here. Hmm", 30, 40, 200, 50)
GUISetState(@SW_SHOW)
Now that we have made the form of the bot and a description label we still have to add a button to run the program or like start it. So we will add ButtonConstants.au3 and GUICtrlCreateButton. Something like this.
Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("My First Bot", 264, 175)
GUICtrlCreateLabel("Discription here. Discription here. Discription here. Discription here. Discription here. Hmm", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
GUISetState(@SW_SHOW)
Now before starting to script we will need to add Opt that stands for AutoitSetOption,Opt will make so the game you are making this bot for will send the keys you want, some games has blocked Macros for sending keys so this will send even if your game has block scripts. So add Opt. It Will Look Something like this.
Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("My First Bot", 264, 175)
GUICtrlCreateLabel("Discription here. Discription here. Discription here. Discription here. Discription here. Hmm", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 100)
OK. now we need to add While and GUIGetMsg whit Switch and case. Case will send the script to the special place you told it to send it to. So it will look something like this.
Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("My First Bot", 264, 175)
GUICtrlCreateLabel("Discription here. Discription here. Discription here. Discription here. Discription here. Hmm", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 100)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd
So for now the bot looks something like this for you.
[Only registered and activated users can see links. Click Here To Register...]

OK so lets start whit the bot scripting now. So we will add something names sleep the sleep code will sleep for have long you tell it to sleep so we will add sleep(2000) that makes it sleep for 2 sec so lets make a case and add sleep mode.
Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("My First Bot", 264, 175)
GUICtrlCreateLabel("Discription here. Discription here. Discription here. Discription here. Discription here. Hmm", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 100)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Sleep(2000)

EndSwitch
WEnd
Now that we have added sleep we need to the skills or attack spells on the game so the bot can use them. heres a exampel of a skill bar of a game.
[Only registered and activated users can see links. Click Here To Register...]

OK now we have a skill bar. So for evry skill on the last picture we have from 1 to 9. So every skill has a number to press so we only need to send every number.Something Like this.
Quote:
Case $Button1
Sleep(2000)
Send("1")
Sleep(1000)
Send("2")
Sleep(1000)
Send("3")
Sleep(1000)
Send("4")
Sleep(1000)
Send("5")
Sleep(1000)
Send("6")
Sleep(1000)
Send("7")
Sleep(1000)
Send("8")
Sleep(1000)
Send("9")
Sleep(700)
Ok, Now if you Press F5 in autoit your program will start and you can try your bot. BUT the bot will only do the script 1 time so we need to add so it will loop for ever.So we can add simpel While 1 and WEnd for loop for ever. lets try that.
Quote:
Case $Button1
While 1
Sleep(2000)
Send("1")
Sleep(1000)
Send("2")
Sleep(1000)
Send("3")
Sleep(1000)
Send("4")
Sleep(1000)
Send("5")
Sleep(1000)
Send("6")
Sleep(1000)
Send("7")
Sleep(1000)
Send("8")
Sleep(1000)
Send("9")
Sleep(700)
WEnd
Wheal now it works. Easy way ha?. Ok now you can style your program like adding a background or adding more buttons. I Will add background picture so we need to add GUICtrlCreatePic. Something like this. (Add this code over GUISetState(@SW_SHOW))
Quote:
GUICtrlCreatePic("img/bg.jpg", 0, 0, 264, 175, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
Remember too make a new folder and add the picture bg.jpg to it so it will work.

I hop this tutorial will help you :) Thanks from me

Have a nice day
01/30/2010 21:10 Cholik#2
Is this a joke ?
01/31/2010 19:31 ax5#3
Quote:
Originally Posted by Walter Sobchak View Post
Is this a joke ?
Its edit :)
02/14/2010 23:59 .$am#4
Hahaha^^
This bot push only 1-9 ,and you cant moved with this bot ^^
AutoIT Bot for very very very very very very very very very noobies^^
02/15/2010 16:43 ax5#5
Quote:
Originally Posted by Andy56 View Post
Hahaha^^
This bot push only 1-9 ,and you cant moved with this bot ^^
AutoIT Bot for very very very very very very very very very noobies^^
yes this is very simple hehe you can also add the attack button on the top. :mofo:

Like this
Quote:
While1
Send("v")
WEnd
:)
09/22/2010 21:18 gothixxx12#6
thanks so so so so much i been lookinge verywhere for a way to send mouse and keyboard commands without it being blocked by games antihack.
plz go more into this for me as i wuld like to know how the block works also
explain more on how to bypass it plz.
im really chuffed i found this, all my bots get blocked :(
09/22/2010 21:50 gothixxx12#7
this bot is blocked :( i tried it with nostale and it still blocks the macros plz help
09/23/2010 16:50 ax5#8
This code makes so you can send keys to the game window but don't know if it works to all games.

Quote:
Opt("SendKeyDelay", 50)
Opt("SendKeyDownDelay", 100)
BTW: REMEMBER TO PRESS THANKS ON THE FIRST POST
09/23/2010 17:03 lolkop#9
Quote:
Originally Posted by ax5 View Post
This code makes so you can send keys to the game window but don't know if it works to all games.



BTW: REMEMBER TO PRESS THANKS ON THE FIRST POST
its not just that the tutorial is one of the worst ones i've ever seen... now i've noticed that you've got no idea of scripting at all...

the code you've just posted, is just to reset the build in delays of sending operations, with your own values.