Register for your free account! | Forgot your password?

You last visited: Today at 21:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Make your first bot!

Discussion on Make your first bot! within the CO2 Guides & Templates forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
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:


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:


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 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...
Attached Files
File Type: ibf post-108-1145651293.ibf (3.6 KB, 412 views)
toreddo is offline  
Old 04/22/2006, 01:47   #2
 
elite*gold: 0
Join Date: Apr 2005
Posts: 308
Received Thanks: 8
If you don't have VB PM me for link

+ karma
Rancid-Milk-Man is offline  
Old 04/22/2006, 01:58   #3
 
elite*gold: 0
Join Date: Mar 2006
Posts: 76
Received Thanks: 1
*** i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
Samm_br is offline  
Old 04/22/2006, 07:05   #4
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
Quote:
Originally posted by Samm_br@Apr 22 2006, 01:58
*** i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
what do you mean!?

to ranchid, ty
And i hope you are not giving vb 2005
toreddo is offline  
Old 04/22/2006, 10:52   #5
 
elite*gold: 0
Join Date: Mar 2006
Posts: 231
Received Thanks: 22
Quote:
Originally posted by Samm_br@Apr 22 2006, 01:58
*** i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
****, i lost 3, cuz of 2 :/
Fantastix is offline  
Old 04/22/2006, 11:04   #6
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
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
*** i have number 2 but not number 1 and 3 :O!!!!!11oneandahalf
****, i lost 3, cuz of 2 :/ [/b][/quote]
whahahaha *****!
Well VB6.0 isnt hard to get on the internet
toreddo is offline  
Old 04/22/2006, 15:38   #7
 
elite*gold: 0
Join Date: Dec 2005
Posts: 91
Received Thanks: 0
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
Doobs is offline  
Old 04/22/2006, 17:59   #8
 
elite*gold: 0
Join Date: Jun 2005
Posts: 162
Received Thanks: 1
maybe you could make one in delphi?
.:Suck2:. is offline  
Old 04/22/2006, 18:10   #9
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
Quote:
Originally posted by .:Suck2:.@Apr 22 2006, 17:59
maybe you could make one in delphi?
im not learning delphi yet.
toreddo is offline  
Old 04/23/2006, 02:05   #10
 
elite*gold: 0
Join Date: Mar 2006
Posts: 194
Received Thanks: 0
ok, what if i want to send a packet from the program instead of just a key

Edit: very nice tut btw simple but good.
ImSnobby is offline  
Old 04/23/2006, 08:41   #11
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
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 simple but good.
lol im worst on packet editing, someone else should help here..
toreddo is offline  
Old 04/23/2006, 10:39   #12
 
elite*gold: 0
Join Date: Apr 2006
Posts: 4
Received Thanks: 0
Love the tut but i really need to be able to do the same with mouse commands :S

i have found this for mousecontrol but i cant seem to make the mouse move and i cant seem to work out why :s
DrSpeedy is offline  
Old 04/23/2006, 10:59   #13
 
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
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?
toreddo is offline  
Old 04/23/2006, 12:25   #14
 
elite*gold: 0
Join Date: Apr 2006
Posts: 4
Received Thanks: 0
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
DrSpeedy is offline  
Old 04/24/2006, 06:30   #15
 
elite*gold: 0
Join Date: Aug 2005
Posts: 26
Received Thanks: 2
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.
wannabehacker is offline  
Reply


Similar Threads Similar Threads
Did any one can make Some thing to tell ppl here how make new item in Bin 5065
05/30/2009 - CO2 Private Server - 5 Replies
Did any one can make Some thing to tell ppl here how make new item in Bin 5065 pl pl pl p pl plz
a hard way to make a little money, and a way to make it easy(read before you juge!!)
04/16/2008 - Off Topic - 2 Replies
in this topic i will explain the only way to make so called "free money" on the internet. please note that my main target with this is mere profit and somewhere i want to teach what i got to learn to others so they can start at the nice part. To all mods: if you will delete this topic you will free space for topics with nothing but empty promises and lies! i try to be different if you will not condone it, so be it. (also prove not tricking people will help!) Intro: the way to make...
[Request] Can someone make a guild to make your own edits?
08/23/2007 - Conquer Online 2 - 2 Replies
Well basically I just wanna edit the dragonball and met icons so they are BIGGER than normal so i can see them easier ^_^ And i was just wondering if someone could write a guide on making your own edits? I tried to search but just random shit came up. Thanks =]



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


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.