This is just the basics of AutoIt. By the end of this tutorial you will be able to create your own little simple bot that can spam custom timed key strokes.
To download AutoIt just visit their website at and download the latest version (version 3.3.0.0 as of today). Download, run it, install it... you know what to do.
Section 1
Create a new folder
Create a new folder and call it "Scripts".
Create a .au3 file
Alright, now that you have AutoIt installed you should be able to create a new .au3(autoit script) file. Simply right click any where in the folder, then hit the new button, and then click AutoIt v3 Script. Name the file
Now name the file what ever you want, for example I named my "epoxgonewild".
Open the file
Open the autoit v3 script file, right click and press Edit.
Section 2
Adding proper header
Now that you have the .au3 file open lets begin to write shit in it. Before we do anything you should always add the proper header to your code. I usually use something pretty/fancy looking like this.
CS stands for comment start and indicates the beginning of a comment. You don't necessarily have to have all those dashes after it, just makes it look nice. CE if you haven't figured it out by now(shame on you), stands for comment end and is the last line of the comment (you can have text after it but only on that line).
Importing the GUI features
If you want to use GUI (graphical user interface) you must add this line so autoit recognizes and can import the GUI features you use.
The GUISetState statement basically tells the program once run that it should show the GUI, without adding this the program will not display GUI. Be sure to always have this piece the last part of your GUI section because the program is read from top to bottom once run.
Making the frame
Pew pew, first cool step. In AutoIt all you have to do is add GUICreate and define the window title and dimensions. Easy enough, right?
x = The windows title, it will appear in the window bar where you close and minimize the program.
y = The windows width, determines how wide/horizontal the program is.
z = The windows height, determines how high/vertical the program is.
If all was done correctly, once run your frame should look like this. ###NOTE: If you went on ahead and saved/ran the program it should have opened just for a second and then closed. That is fine, we will fix that later once we add some actual code.###
Add the code below to end of the script if you do want to preview it.
Code:
While 1
sleep(1)
WEnd
Section 3
Adding a label
Label, other wise known as text. For that we use GUICtrlCreateLabel.
x = What ever is put inside of the quotation marks will be printed in the frame you made.
y = This is the horizontal position of where the text will be placed, I am not sure but I believe it is measure in pixels.
z = This is the vertical position of where the text will be placed.
You should have something that looks like this now. ###NOTE: If you went on ahead and saved/ran the program it should have opened just for a second and then closed. That is fine, we will fix that later once we add some actual code.###
Add the code below to end of the script if you do want to preview it.
Code:
While 1
sleep(1)
WEnd
Adding Input box
Input are used to submit data (such as text, numbers, and symbols) from the user and store them. Using GUICtrlCreateLabel.
$key1 This is a variable/string. This stores what ever comes after it, which in this case would be what ever the user inputs into the input box we made. It allows you to reference back to it and use it. You can name this what ever you want (ex. $input $lol $epoxisgay $wtfsfsdf)
("", 35, 8, 120)
("x", y, z, s)
x= Leave this blank, unless you want default text there. It can be edited by user.
y = Horizontal position.
z = Vertical position.
s = Width of the input box.
If all is done correctly, it should look like this now. ###NOTE: If you went on ahead and saved/ran the program it should have opened just for a second and then closed. That is fine, we will fix that later once we add some actual code.###
Add the code below to end of the script if you do want to preview it.
Code:
While 1
sleep(1)
WEnd
Section 4
Duplicating code
Since this a very long tutorial already (we are only half way) I am just going to skip explaining step by step how to add more labels and input boxes because it's exactly the same method listed in section 3. All you have to do is change the positions and variable/string names.
I just added 1 more label and more input with the variable/string $time1.
Re-labeling
Okay, so this is almost the end of the GUI portion we just need to add start button. But first lets rename those labels to something that the user will understand.
###NOTE: If you went on ahead and saved/ran the program it should have opened just for a second and then closed. That is fine, we will fix that later once we add some actual code.###
Add the code below to end of the script if you do want to preview it.
Code:
While 1
sleep(1)
WEnd
Section 5
Adding a button
The button is what will start the botting. We will be using the GUICtrlCreateButton function to create the button.
$startbutton is the variable we assigned to the button so we can refrence back to it once we need it.
("Start", 190, 8, 60)
("x", y, z, s)
x= Button label.
y = Horizontal position.
z = Vertical position.
s = Width of the button.
###NOTE: If you went on ahead and saved/ran the program it should have opened just for a second and then closed. That is fine, we will fix that later once we add some actual code.###
Add the code below to end of the script if you do want to preview it.
While 1 indicates the begining of a while loop and WEnd stands for While End which signifies that the end of the while loop statement. If you run your code now the gui will not close nor can you close it yet using the exit button.
The GUIGetMsg used in $msg = GUIGetMsg() polls the GUI to see if any events have occurred. And will be used later on in the code.
Adding a Case statement
Now we will add a case or otherwise known as select statement inside of our while loop. The select statement gives the user the ability to decide what the program does next based on what the user clicks or does.
What we have done is added a Select statement with two options
Option 1: $msg = $startbutton, that means if the startbutton is pressed it will trigger what ever code is inside this case statement. ( we havent added the code inside yet)
Option 2: $msg = $GUI_EVENT_CLOSE, which means that if the exit button (the x button) is pressed it will trigger what ever code comes inside this case statement. ( we haven't added the code inside yet)
Startbutton event
Now lets tell the program what to do once the start button is pressed.
First it will declare all variables. This means it will read what the user input into our two input field $time1 and $key1, and make it usable in the code to follow.
$key1 is assigned the new variable $send1. When ever we refer to $send1 now will be what ever the user input into the $key1 input.
$time1 is assigned the new variable $sleep1. When ever we refer to $sleep1 now will be what ever the user input into the $time1 input.
Next we will add another while loop because we want to spam this part until the user says STOP.
We just added another while loop like you did before but we also added something new inside of it this time.
Send is the command that tell the computer to literally send a key stroke. You can do something like Send("hello") and the program will send out the word hello in any window.
Sleep is basically a pause. It pauses the program for the specified amount of time. Example, Sleep("10000") will pause the program from going on to the next line of code for 10 seconds (10x1000, milliseconds)
But in our case we substituted the "hello" and "10000" with variables that the user has defined. Buy putting in $sleep1 and $send1 instead, the program will automatically put in what ever the user put in the input boxes we created chapter 1. This gives the user the choice to easily choose which key is being sent and how long the pause will be with out editing the actual source code.
Exit button event
The $GUI_EVENT_CLOSE function will exit the loop and destroy the GUI, or exit/close the program
Okay so here we are part 3. Congratulations to the few who actually took the time read this. This section will teach you other useful tricks that can be used for gaming. This section will be updated constantly, so always check back to see new updates. Please press the Thanks button to keep the updates coming.
TimerInit and TimerDiff
The downfall to using Sleep(time) is that it pauses the entire code. Once in Sleep you can't do anything except wait. The alternative is to use the TimerInit() and TimerDiff() functions. With this you can continue on with your code while waiting for another chunk of code. We can do this by using these two functions in an if statement. Okay, so here is the code...
Code:
$timer = TimerInit()
While 1
$timed = TimerDiff($timer)
If $timed > 3000 Then ; we use greater than (>) because sometimes it might get skipped
MsgBox(1,"TimerDiff","TimerDiff : "&$timed)
$timer = TimerInit()
EndIf
WEnd
The first TimerInit() is placed outside loop or if statement. The code is executed in order from top to bottom. Once it reaches the line $timer = TimerInit() it will begin the timer then move on to the next line. Then next line would be our loop where it is constantly checking if $timed is greater then 3000 (3 seconds). The timerDiff returns the difference in time from a previous call to TimerInit(). If timerDiff is greater then 3000 then the code will be executed, which in this case is just a message box. Now after the message box we added another $timer = TimerInit() because the first $timer = TimerInit() is still counting up and it doesn't count down so $timed will never equal 3000 again. Adding another $timer resets the count so the if statement has a chance to pick it up again.
ControlSend
Send, sends key(s) to any window on top and this can get very sloppy at times. Using ControlSend we can send key(s) to specific window. This doesn't require the window to be active, on top, or even maximized. It will work as long as the window is opened.
ControlSend("Untitled - Notepad", "", "", "Hello world!")
Sleep("100")
ControlSend("Untitled - Notepad", "", "", "{ENTER}"
Sleep("100")
ControlSend("Untitled - Notepad", "", "", "This is the line after the ENTER key was pressed.")
This one is pretty simple and the code explains its self. You have to enter the exact window name for this to work. The rest explains itself.
Changing button text
Using GUICtrlSetData we can change anything on the GUI right there on the spot. All we have to do is add a Switch and If statement and we can get a working Start/Stop button.
Code:
#include <GUIConstantsEx.au3>
GUICreate("GUICtrlSetData", 200,100)
GUISetState(@SW_SHOW)
$button = GUICtrlCreateButton("Start",60, 30, 80, 20)
$count = 0
While 1
Switch GUIGetMsg()
Case $button
If $count = 1 Then
GUICtrlSetData($button, "Start")
$count = 0
ElseIf $count = 0 Then
GUICtrlSetData($button, "Stop")
$count = 1
EndIf
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
GUICtrlSetData($button, "Stop")
So $button would be what ever we are changing. In this case the variable $button is assigned to a button that contains the data "Start". The second part of the function is what we are changing the data to, which we will be changing it to "Stop".
In this part of the tutorial you will learn how to create a BOT that automatically uses HP/MP potions.
The HP/MP bar
Before we do anything we have to know how this will work and you need to get familiarized with the HP/MP bar we will be using as an example in this tutorial.
First lets take a look at this HP/MP bar below.
There is the color red and blue bars are full indicating that the character has maximum HP (health) and MP (manna).
Now look at this HP/MP bar.
From this HP/MP bar we can tell that the user has taken damage and no longer has full HP. There is an area with a dark background indicating the amount (%) of total HP lost.
So in order to auto HP pot we have to make a bot that checks for that dark color in that area.
GetMousePos
Retrieves the current position of the mouse cursor.
First thing we need to do is pick a spot on the HP/MP bar where the color changes from Red (HP) to the dark color (EMPTY/NO HP).
I picked this spot HERE. (see green dot)
We first have to figure out how to make the BOT focus on that position. We need to find the X and Y coordinates in order to do that. We will make a function for this first.
Code:
While 1
sleep("1")
WEnd
Func _getDefault()
EndFunc
Then we add 2 variables. One for the X coordinate and one for the Y.
Pixel Search
Next we have to add something that continuously checks that position for a change in color.
Before we do that, we have to get the color of the pixel at that position. Which should some shade of red.
I am going to add it to the _getDefault() function because it is easier but there are different ways to do it. You can also add in if statement in the main function to check if $x or $y are anything but 0 (default).
set a variable outside of the function for the color.
Next we need a hot key that will run the _getDefault() function and set the default/temporary variables to the real ones that you will use. This gives you as much time as you need to pick position on the HP bar. It wont automatically run when the program is started. We will use the HotKeySet() function.
Now when move your mouse to a position on the screen and press num pad - and it will set the $x, $y and $color for that spot.
Next we start the If statement. First we have to check the status. If the status is set to OFF, it will skip this code. If it is set to ON it will execute the code inside.
Next we have to add an if statement that checks that position to see if the $color has changed. We have to make a variable called $status and set its default value outside the loop to "off" so that the bot does not start.
Before we do the code inside the If statement we have to make a function llike _setDefault(). The only difference is that it will not get a new MousePos and it will save the Hex color to a new variable. We will use our current $x and $y positions. Don't forget to the declare $newColor outside of the function.
Now if the new color does not equal the old color it will execute the code. The code should be a Send() function. You should send the shorcut key for using your healing potion in-game. For this example we will use the number "1".
; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
I'll try to go into more details this weekend and make it so beginners can easily understand it.
[Video Tutorial] - Very Easy Tutorial How to make your Own Wallhack in C++ 09/01/2012 - Soldier Front Hacks, Bots, Cheats & Exploits - 16 Replies Hello Everyone!Hellow Philippines - Mabuhay Pinoy Cheaters!
Confidentials000 of GZP and Me Babyface21 ay iisa lang!
Today i Will Teach you on How to Make Your Own Wallhack in C++
Very Simple By Video Tutorials Step by Step Part 1 - 3
Dont Ask me to Release my Private Wallhack coz i Need it to still Undetected
[[Tutorial]] how to make your own hacks with VB 03/13/2011 - WarRock Hacks, Bots, Cheats & Exploits - 81 Replies ] : None Of the addresses work anymore, Current finding the updated ones. So the hacks will not work until me or someone else finds the new addresses!
Hey there. Are you getting sick of antiously waiting for someone to post a new hack for use, then in like one hour getting banned? Well thats over.
In this tutorial i will show you how to..
Designing and customizing your very own hacks
A few examples on how to add stuff such as Unlimited stamina or swimming
----------Getting...
[TUTORIAL] How To Make A UCE !!! 08/12/2010 - MapleStory - 23 Replies PART 1
UCE ToolsDDK (Driver Development Kit)- Used To Compile, Files For UCE
Delphi 7 - Compiling, And Editing UCE Files
Delphi 7 Keygen - To Crack Delphi so it's free
ASR (Actual Search and Replace) - Used To Search And Replace *Characters* To You Choice
My First tutorial How to make 20K GP in 5 Min 08/05/2010 - CrossFire - 26 Replies Sup Guys this is my First tutorial on how to make 20K GP in 5 min
And this is my video
Note: Dont say its bad video or anything ITS MY FIRST TIME MAKING VIDEO BTW
Program You will need
HotSpot Shield
[Tutorial] How To Make Around $50 A Day 01/30/2010 - Main - 4 Replies Site is called IMreportcard. You have to comment reviews on products/services/persons to gain points. You can exchange those points into money.
Sign-Up Here: *edited*
http://i46.tinypic.com/iqg67s.png
Now, 100 credits = $1. And as you can see, it's not hard to make 100 credits.
Commenting