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.
[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.
[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.
I hop this tutorial will help you :) Thanks from me
Have a nice day
You Will need this programs:
- [Only registered and activated users can see links. Click Here To Register...]
- [Only registered and activated users can see links. Click Here To Register...]
Lets start to make the program window we will use GUICreate form.
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 thisQuote:
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)
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 <WindowsConstants.au3>
GUICreate("My First Bot", 264, 175)
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>
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 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)
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)
So for now the bot looks something like this for you.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
[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.
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.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
[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.
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
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)
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:
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
Remember too make a new folder and add the picture bg.jpg to it so it will work.Quote:
GUICtrlCreatePic("img/bg.jpg", 0, 0, 264, 175, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
I hop this tutorial will help you :) Thanks from me
Have a nice day