Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Bots & Macros
You last visited: Today at 06:47

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

Advertisement



BotResourcePack (VB.net modules)

Discussion on BotResourcePack (VB.net modules) within the CO2 Bots & Macros forum part of the Conquer Online 2 category.

Reply
 
Old 01/08/2006, 02:48   #16
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
Oh well... here goes...
I rushed out this bot to show how to use the modules, etc.
It is NOT for public use but does work (Tested on Windows2000 & WindowsXP)

This bot is currently only "scripted" to kill BanditL97's & TombBats from safe ledges.

Features:
* Health check (If Im hurt, take snapshot of screen, exit CO & stop bot)
* Check to see if any locations have monster colors in & attack them
* Check stamina, if I need to sit... sit
* Check mana, if I need to meditate... meditate

Places you need to put stuff:
F2 = Meditate
F3 = Sit
F10 = Tornado / attacking spell

To start/stop bot is key F11 (global hotkey)

* Bot will create any missing dat files when it is ran
* ConquerOnline windows should be set to "BelowNormal" priority in TaskManager (Ctrl+Alt+Del)

* Most buttons dont work... and it doesn't save log (Im not gonna "finish" it).
* ConquerOnline window you wish it to use must stay as top window (open)
* Resolution must be 800x600 windowed (zoomed all the way out)
* This program moves the mouse, clicks the top window at set locations & sends keystrokes to the top window... Remember, F11 to turn it off

* Sourcecode is installed along with the .exe program... if you dont trust me, recompile it with VisualStudio... if you dont like the bot, look at how its made and make your own!

* "Screenshot" module has been changed into a stand-alone class. I have also modified the "mouseMovement" class and added a "fileIO" module.

*Partridge must be in the pair tree


If you dont like the bot / classes... say why here.
If you do like the bot / classes... gimme karma & say why here.


NOTE: Yet again, I remind people that this bot is NOT public use... but is working & tested... you may need to update your computers .net framework 1.1 on the microsoft update site though.


Updated download:
Fixed "colors.dat" (Caused constant sitting / meditating / no casting)
Please uninstall old version and delete files left in its folder before installing this one.

Added half-finished CryptoLib to encrypt/decrypt CO packets from server.
(Im working on it at leisurely pace)

I am stopping support & development of this "bot" as it was only a demo in how to use the modules / classes for other programers anyway. I am currently working on a different project while also developing the CryptoLib class.
Attached Files
File Type: ibf post-127-1140462364.ibf (276.8 KB, 439 views)
Lurker3 is offline  
Old 01/11/2006, 12:34   #17
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
Even though LurkBot was nowhere near finished when released (see post just above)....
...it would still be good to get some feedback on it
Lurker3 is offline  
Old 01/26/2006, 21:48   #18
 
elite*gold: 0
Join Date: Nov 2005
Posts: 360
Received Thanks: 39
oops my question was dumb so nvm this msg
ebilhacker is offline  
Old 01/27/2006, 02:11   #19
 
elite*gold: 0
Join Date: Jan 2006
Posts: 34
Received Thanks: 0
Quote:
Originally posted by DerVollNoob@Dec 27 2005, 03:13
hello lil question, i know i'm a noob in this part of coding, but is there any free programm with that i can code visual basic.net?

because that was the reason why i dont have look more for it to code anythign with programms like that...

it would be nice if anyone know programm and post it here, i like it more to learn the programm than click million times the same way in conquer

thx
It's called Visual Basic 2005 Express

it's free, and basically .NET without the perks of the extra Winforms 2.0 libraries.

EDIT: heres the link.

kpadmiral is offline  
Old 01/31/2006, 10:33   #20
 
elite*gold: 0
Join Date: Jan 2005
Posts: 296
Received Thanks: 12
Quote:
Originally posted by Lurker3@Jan 8 2006, 02:48
Oh well... here goes...
I rushed out this bot to show how to use the modules, etc.
It is NOT finished but does work (Tested on Windows2000 & WindowsXP)

This bot is currently only "scripted" to kill BanditL97's & TombBats from safe ledges.

Features:
* Health check (If Im hurt, take snapshot of screen, exit CO & stop bot)
* Check to see if any locations have monster colors in & attack them
* Check stamina, if I need to sit... sit
* Check mana, if I need to meditate... meditate

Places you need to put stuff:
F2 = Meditate
F3 = Sit
F10 = Tornado / attacking spell

To start/stop bot is key F11 (global hotkey)

* Bot will create files any missing files when it is ran
* ConquerOnline windows should be set to "BelowNormal" priority in TaskManager (Ctrl+Alt+Del)

* Most buttons dont work yet... and it doesn't save log.
* ConquerOnline window you wish it to use must stay as top window (open)
* Resolution must be 800x600 windowed (zoomed all the way out)
* This program moves the mouse, clicks the top window at set locations & sends keystrokes to the top window... Remember, F11 to turn it off

* Sourcecode is installed along with the .exe program... if you dont trust me, recompile it with VisualStudio... if you dont like the bot, look at how its made and make your own!

* "Screenshot" module has been changed into a stand-alone class. I have also modified the "mouseMovement" module and added a "fileIO" module.

*Partridge must be in the pair tree


Future revisions (if there are any) may contain:
* Better support for reading HP / MP (from memory)
* Working buttons to take you to editors for the bot
* Smaller "matches.dat" with better scripting engine
* Inventory scanner (from memory)


If you dont like the bot... say why here.
If you do like the bot... gimme karma & say why here.


NOTE: Yet again, I remind people that this bot is NOT finished... but is working & tested... you may need to update your computers .net framework 1.1 on the microsoft update site though.
still awaiting your updated
nickel is offline  
Old 02/11/2006, 01:02   #21
 
elite*gold: 0
Join Date: Jan 2005
Posts: 296
Received Thanks: 12
sorry about double posting but...

is there any better way to loop through the screenshot to detect the pixel.. coz currently its abit slow... thx
nickel is offline  
Old 02/11/2006, 02:26   #22
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
You set the priority of your ConquerOnline window to "Below normal" so that it dont take all the CPU?

...I made the "bot" only check a few pixels (about 1500) out of the whole screen and the scans complete within about 100ms (10 times a second) so I slowed it to once every second with a timer.

If you want it to scan faster than once a second... or check more pixels... then edit the "bot" or ask a friend to edit it for you
I dont support the bot... its just a demo of how to use the modules for VB.net programmers

I've been informed of a problem that stops the "Bot" casting & puts it into a sit/meditate loop... and will update the installer with a new colors.dat to fix that when I get the time & can be bothered.
Lurker3 is offline  
Old 02/16/2006, 00:59   #23
 
elite*gold: 0
Join Date: Aug 2004
Posts: 166
Received Thanks: 4
Lurker can u just post the source for the bot you did? Your first post says they are on the second page... I guess you packaged them in the install can you post the files seperate. I wanna look at your pixel scan routine
tester is offline  
Old 02/18/2006, 06:37   #24
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
Sure... I hacked-up the LurkerBot to play with adding a packet encryption/decryption class/module but will post the source-code files without the installer in the next few days (and update the color.dat's init section).

Basically though to grab a pixel, you just ask my screenshot module for an image of the window (by name)... then use GetPixel(x,y) to get the color information for all pixels you wanna check.

It doesn't use any image/shape recognition or anything... just pixel colors
Lurker3 is offline  
Old 02/20/2006, 20:24   #25
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
Quote:
Originally posted by tester@Feb 16 2006, 00:59
Lurker can u just post the source for the bot you did? Your first post says they are on the second page... I guess you packaged them in the install can you post the files seperate. I wanna look at your pixel scan routine
Here you go.

These files are source-code and source materials only... no installer!
DO NOT download this unless you can program in VB.net!

If your a normal user... check further up for the version with compiled program and installer!

This download is NOT for the general public -=- PROGRAMMERS ONLY !!!
Attached Files
File Type: ibf post-127-1140463468.ibf (137.7 KB, 186 views)
Lurker3 is offline  
Old 02/27/2006, 16:46   #26
 
elite*gold: 0
Join Date: Aug 2004
Posts: 166
Received Thanks: 4
Quote:
Originally posted by Lurker3+Feb 20 2006, 20:24--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Lurker3 @ Feb 20 2006, 20:24)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--tester@Feb 16 2006, 00:59
Lurker can u just post the source for the bot you did?* Your first post says they are on the second page... I guess you packaged them in the install can you post the files seperate.* I wanna look at your pixel scan routine
Here you go.

These files are source-code and source materials only... no installer!
DO NOT download this unless you can program in VB.net!

If your a normal user... check further up for the version with compiled program and installer!

This download is NOT for the general public -=- PROGRAMMERS ONLY !!! [/b][/quote]
Thanks

I had a little mess around with your code, I thought the original idea was to make these as a lib resource for programmers? I see its turning more into a CO specific macro script engine hehe

Things I have modified so far (If your interested)
is move the classes to a class lib (this is for me really I prefer working in an n-tier style).
changed you FileIO module to a class and modified the ReadFile function to use the StringBuilder object instead of a string (Performance and memory optomisations [wow bad spelling ])
Changed some lines of code to be more .net, e.g adding 1 to a variable you use vTemp += 1 instead of VB6 way of vTemp = vTemp + 1

And last thing
Created a Class to act as a wrapper to File, mouse, ss and cryto classes. Although the only thing I have got in this so far is a full screen scan, for use when finding mobs.

I may do some more when i get chance or am bored

Hopefully you finish the Crypto class then there should be no need for the screen scans
tester is offline  
Old 03/01/2006, 13:30   #27
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
All the code in the classes/modules works with almost any games/applications, but yes, the encrypt/decrypt class would only work with ConquerOnline (Hence why Im thinking the port-bounce should be separate).

Im considering bouncing the CO connection to server through my own class in order to read/write it as Im not familiar with WinPcap functions though.

If you made changes to the modules then feel free to PM me a link, making sure to add your name to any modules you edited (with a quick note on changes you made). Even if you didn't add any classes/functions; clean-up of my code is still helping

I will review changes to the code (making sure it safe) and then post the updated files on this forum.

Thanks for your input
Lurker3 is offline  
Old 03/02/2006, 11:14   #28
 
elite*gold: 0
Join Date: Aug 2004
Posts: 166
Received Thanks: 4
I will just post here as the changes a pretty basic.

Make the FileIO module into a class
Change the ReadFile to this:

Code:
'Modified to make use of the Stringbuilder object, and change your OnError GOTO to a TRY CATCH
Public Shared Function ReadFile&#40;ByVal Path As String&#41; As String
    Try
      Dim strbFile As New System.Text.StringBuilder

      Dim s1 = New FileStream&#40;Path, FileMode.Open, FileAccess.Read&#41;
      Dim br = New BinaryReader&#40;s1&#41;

      Dim byteIn As Byte
      Dim j As Integer
      For j = 0 To br.BaseStream.Length&#40;&#41; - 1
        byteIn = br.ReadByte
        strbFile.Append&#40;Chr&#40;byteIn&#41;&#41;

      Next
      br.Close&#40;&#41;
      Return strbFile.ToString
    Catch ex As System.IO.IOException
      'Raise an error.
    End Try
  End Function
Made a new Class to encompass your other classes did a quick routine todo a full screenscan (Its not perfect and can prolly use a lot of optomisation). It uses slightly modified versions of your existing code and can be called as follows:
Code:
'Declarations
Public mMacro As New Functions.Macro

'intX and intY are returned as the location within the window that the pixel appears &#40;ByRef Variables.&#41;
'Functions.color is your existing structure
Sub ScanForColor&#40;tmpColor as Functions.color&#41;
Dim intX As Integer = 2
Dim intY As Integer = 2
    tmpColor.name = &#34;Test&#34;
    tmpColor.r = 187
    tmpColor.g = 159
    tmpColor.b = 82
    tmpColor.rgbFlag = 255
    tmpColor.fuzzy = 10
    If mMacro.checkAll&#40;tmpColor, intX, intY&#41; Then
      MessageBox.Show&#40;&#34;Found&#58; &#34; & intX.ToString & &#34;,&#34; & intY.ToString&#41;
    Else
      MessageBox.Show&#40;&#34;Missing&#34;&#41;
    End If
end sub
[SEE ATTACHED] for Macro Class

Something I forgot to mention last time, dont use the TIMER CONTROL use the Timers.Timer object in code and add the WITHEVENTS option to the declaration, this will spawn each Timer and any functions associated with in in its own thread
Attached Files
File Type: ibf post-127-1141294464.ibf (5.7 KB, 72 views)
tester is offline  
Old 03/18/2006, 03:38   #29
 
(GAME)Master's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 568
Received Thanks: 43
search on
download visualbasic express2005
(GAME)Master is offline  
Old 04/08/2006, 02:10   #30
 
elite*gold: 0
Join Date: Apr 2006
Posts: 1
Received Thanks: 0
Quote:
Originally posted by Lurker3@Dec 15 2005, 23:42
I was bored so I decided to try the level-bot for taos in BanditL97 cave.

I noticed it lagged the system alot and didnt sit/meditate or auto-disconnect when attacked so thought "I should make a better one!" ...which I did.

The bot was almost finished when I decided to change what it did... modularisation was then needed so I spilt functions off into their own self-contained modules.

This download is what resulted.
These modules can be used with any Bot-making in VB.net so far and I may add some more later. If there is any interest in it.

NOTE: This is NOT a bot, its merely a few classes & functions VB.net programmers can use for AutoIT-like functions within their programs (but faster & more efficient)

I have purposefully removed the "Bot" part of the program so that these modules can be used within other peoples programs more easily. If anyone wants to help build a small BotMaking library of modules with me then please feel free to contact me via PM. I am especially interested modules (or info) on decrypting CO packets, memory-pointers for HP, Mob life, etc.

Modules included:
Screenshot.vb
Module to allow capturing a screenshot of any window, either to file or an image variable for processing with getPixel.
* Function ssScreen() As Image
* Function ssTitle(ByVal target_title As String) As Image
* Function ssWindow(ByVal handle As IntPtr) As Image
* Sub ssWindowToFile(ByVal handle As IntPtr, ByVal filename As String, ByVal format As ImageFormat)
* Sub ssScreenToFile(ByVal filename As String, ByVal format As ImageFormat)

MouseStuff.vb
Module to allow controlling of mouse functions.
* Sub mouseRClick()
* Sub mouseRDown()
* Sub mouseRUp()
* Sub mouseLClick()
* Sub mouseLDown()
* Sub mouseLUp()
* Sub mouseMClick()
* Sub mouseMDown()
* Sub mouseMUp()
* Function mouseMove(ByVal loc As POINTAPI) As Boolean
* Function mouseMove(ByVal loc As POINTAPI, ByVal hwnd As IntPtr) As Boolean


[Edit]
Attached file removed.
Please check in 2nd page for updated version with demo bot & module/class source-code
[/Edit]
uuuum where the link to download??
whodamanme is offline  
Reply


Similar Threads Similar Threads
Fatal errror: failed to load platform modules
05/02/2011 - Counter-Strike - 9 Replies
ja ich kann kein CS:S mehr spielen/starten denn bei steam is irgendetwas kaputt, naja immer kommt die fehler meldung "Fatal errror: failed to load platform modules" kann mir da jemand weiter helfen? mfg
Question about modules
10/13/2007 - Conquer Online 2 - 0 Replies
This might not be the right part of the forum to ask, But i tried search so dont say use search =P I was wondering if theres a VB module around to allow editting memory adresses, this is to make a trainer in VB for SV :) So if anyone can point me to the right direction it would be very apreciated.



All times are GMT +1. The time now is 06:47.


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.