Make your first bot!

04/21/2006 22:28 toreddo#1
Ok, this bot is VERY Simple and i find you should learn the basic of VB6 first!
Ok what do you need:
1. Visual Basic 6
2. Co2
3. A brain!

The first bot you are gonna make is an AutoHealer.
We are gonna set a color and a coordinate.
If that color changes do an action.
So, if the Heal(RED) isn't full anymore at that coordinate press F8 or some.

Ok Start Visual Basic.
Make a new project.exe

Now you see a Visual Template of a program,
Programming looks simple now but it is not!
ok, Add a timer, and add a command button from the left toolbox.

click on the timer and you will see all the propeteries of the timer in the right.
Set the interval to 1, and change enabled to False.

Now click on the command button and you will see the propeterie menu of the command button.
Set Caption to "Start".

if you did everything ok you will see this:
[Only registered and activated users can see links. Click Here To Register...]

Now double click on the COmmand Button.
"Welcom in the coding place" We want if someone press the button, the timer will be enabled.
and if the timer is enabled the timer should stop, k?

Well, Place the following code in the "Private Sub Command1_Click()" section and try to understand what i wrote.
Code:
If Timer1.Enabled = True Then ''Do action if timer is on
Timer1.Enabled = False '' Switch timer off
Command1.Caption = "Start" '' Make the button caption Start again.
Else '' if the timer isnt enabled then...
Timer1.Enabled = True ''put on the timer
Command1.Caption = "Stop" '' change the command caption to stop
End If '' now test it!
If you paste this, you will see green comments after each action.
Now we made a button that activates the timer and deactivates with the second press!

Ok, Now a pixel view function in VB needs to be declared and added to a module.
You have to add a module by doing this:
left above in the menu go to Project > Add Module > select the icon module and press open.

Now you have a module in your forum this is an very nifty place to store your functions and declarations.
Double click on Module1 in the right menu and paste this:
Code:
Declare Function CreateDC& Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, _
ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As Any)
Declare Function DeleteDC& Lib "gdi32" (ByVal hdc As Long)
Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, _
ByVal y As Long) As Long
Ok leave that as it is and go back to your form.
to store the color code we are watching, we need a textbox.
(i dont know why but it doesnt store in a string) so add a textbox to your form.
klick on it go to the propeteries and make visible False.
Done.

Ok now we are gonna put a code in the timer that is watching the same pixel every 1 millisecond.
double click on the timer and put this after the "Private Sub Timer1_Timer()":
Code:
Dim x, y As Integer
x = 28 'what does X contain?
y = 734 '' what does Y contain?
  screendc = CreateDC("DISPLAY", "", "", 0&) '' Call the function from module
  text1 = GetPixel(screendc, x, y) '' store the color code to text 1
  DeleteDC (screendc) '' close function
  
  If text1.Text <> 1050772 Then '' What do we do if that pixel is somerhing else then red!
  SendKeys "{F8}" '' Then we press F8 you can make that from 1 to 10&#59;)
  End If
Take a little second to watch the green commands when you pasted it in your timer.

Under the DIM command you see X and y you can change the numbers after it.
but HOW did i find that X and Y?
Well i made a pixel viewer for that and is free download able add the bottom,
lets post a screenie:
[Only registered and activated users can see links. Click Here To Register...]

You also see a color code, you need that one to, because in the screenie you'll see a green littrle round thing at the HP bar. thats around the pixel where he is watching (full hp) so if that hp disapears at that pixel thew color changes to.
and if the color changes we need to take action right?
Well this part of the above code:
Code:
 If text1.Text <> 1050772 Then
will check if it isnt the same.
Look at the number its the same as my screenie right? that is the color code for RED, if it isnt red anymore he will send the SENDKEY.

Ok now we are gonna finish the project, try to find out how to change the caption of your form by yourself! Its also in the propeterie menu.
Now save it, you can press play and open conqeur ALT+TAB to YOUR bot.
and press start :D IT WORKS!

Now final step, press stop again or CTRL + BREAK.
GoTO peject and do: Make Project.exe save it and you made your bot!

Ok before you place reactions:
1. IM BAD ENGLISH MAN, im dutch....
2. You can use this for many things like: whisper alert, and xp activator.
3. Dont post your work, we beleive you did it.
4. Its for people to learn something not for good programmers...
04/22/2006 01:47 Rancid-Milk-Man#2
If you don't have VB PM me for link

+ karma
04/22/2006 01:58 Samm_br#3
fuk i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
04/22/2006 07:05 toreddo#4
Quote:
Originally posted by Samm_br@Apr 22 2006, 01:58
fuk i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
what do you mean!?

to ranchid, ty :cool:
And i hope you are not giving vb 2005
04/22/2006 10:52 Fantastix#5
Quote:
Originally posted by Samm_br@Apr 22 2006, 01:58
fuk i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
damn, i lost 3, cuz of 2 :/
04/22/2006 11:04 toreddo#6
Quote:
Originally posted by Fantastix+Apr 22 2006, 10:52--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Fantastix @ Apr 22 2006, 10:52)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--Samm_br@Apr 22 2006, 01:58
fuk i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
damn, i lost 3, cuz of 2 :/ [/b][/quote]
whahahaha LMFAO!
Well VB6.0 isnt hard to get on the internet:rolleyes:
04/22/2006 15:38 Doobs#7
Quote:
Originally posted by Rancid-Milk-Man@Apr 22 2006, 01:47
If you don't have VB PM me for link

+ karma
Can you post the link in this thread?

Its alot easyer...and ever VB i get these days is corupt :(
04/22/2006 17:59 .:Suck2:.#8
maybe you could make one in delphi? :(
04/22/2006 18:10 toreddo#9
Quote:
Originally posted by .:Suck2:.@Apr 22 2006, 17:59
maybe you could make one in delphi? :(
im not learning delphi yet.
04/23/2006 02:05 ImSnobby#10
ok, what if i want to send a packet from the program instead of just a key

Edit: very nice tut btw :D simple but good.
04/23/2006 08:41 toreddo#11
Quote:
Originally posted by ImSnobby@Apr 23 2006, 02:05
ok, what if i want to send a packet from the program instead of just a key

Edit: very nice tut btw :D simple but good.
lol im worst on packet editing, someone else should help here..
04/23/2006 10:39 DrSpeedy#12
Love the tut but i really need to be able to do the same with mouse commands :S

i have found [Only registered and activated users can see links. Click Here To Register...] this for mousecontrol but i cant seem to make the mouse move and i cant seem to work out why :s
04/23/2006 10:59 toreddo#13
Quote:
Originally posted by DrSpeedy@Apr 23 2006, 10:39
Love the tut but i really need tobe able to do the same with mouse commands :S
You mean you want me to explain how mouse events work?
04/23/2006 12:25 DrSpeedy#14
Yes a similar tutorial for mouse events would have me sorted

and ty very much you've been very quick to reply and very helpful
04/24/2006 06:30 wannabehacker#15
Don't have VB 6.0. but i do have .net. would it be the same basic idea, or different. I was told that .net is a lot different, but am unsure as to how different.