Register for your free account! | Forgot your password?

You last visited: Today at 14:21

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

Advertisement



simple co bot

Discussion on simple co bot within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
simple co bot

i created a smal programm for autositting

i wrote this programm
Code:
using System;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Windows.Forms;

namespace SimulateKeyPress
{
    class Form1 : Form
    {
        private Button button1 = new Button();

        [STAThread]
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.Run(new Form1());
        }

        public Form1()
        {
            button1.Location = new Point(10, 10);
            button1.TabIndex = 0;
            button1.Text = "Click to Find co";
            button1.AutoSize = true;
            button1.Click += new EventHandler(button1_Click);

            this.DoubleClick += new EventHandler(Form1_DoubleClick);
            this.Controls.Add(button1);
        }

        // Get a handle to an application window.
        [DllImport("USER32.DLL", CharSet = CharSet.Unicode)]
        public static extern IntPtr FindWindow(string lpClassName,
            string lpWindowName);

        // Activate an application window.
        [DllImport("USER32.DLL")]
        public static extern bool SetForegroundWindow(IntPtr hWnd);

        // Send a series of key presses to the co application.
        private void button1_Click(object sender, EventArgs e)
        {

            IntPtr coHandle = FindWindow(null, "[Conquer Online]");

            // Verify that co is a running process.
            if (coHandle == IntPtr.Zero)
            {
                MessageBox.Show("CO is not running.");
                return;
            }

            // Make co the foreground application and send it 
            // a set of calculations.
            SetForegroundWindow(coHandle);
            SendKeys.SendWait("^"+"s");
        }

        // Send a key to the button when the user double-clicks anywhere 
        // on the form.
        private void Form1_DoubleClick(object sender, EventArgs e)
        {

            SendKeys.Send("{ENTER}");
        }
    }
}
my problem is that the programm sends the key to all programms that are active. If i chose now the conquer window nothing happens. can someone help me how to send the key to the conquer window
koio is offline  
Thanks
1 User
Old 12/02/2010, 14:48   #2
 
elite*gold: 0
Join Date: Jan 2006
Posts: 158
Received Thanks: 20
why u don t use autoit .. is much easy to use and if u know vb.net are sooo similar )



autostig is simple to use and is made to send key press and all kind of similar event
gorgone is offline  
Old 12/02/2010, 16:34   #3
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
with autoit i have the same problem
koio is offline  
Old 12/02/2010, 23:56   #4
 
elite*gold: 0
Join Date: Jan 2006
Posts: 158
Received Thanks: 20
in autoit .. use

SEND to send key

the special key like RETURN use {RETURN} the {

u can detect mouse positions and coordinate of windows

try to look

$coordinate_conquer = WinGetPos("[active]")

and send

send("{F6}")
MouseClick('Right')
gorgone is offline  
Old 12/03/2010, 06:59   #5
 
elite*gold: 0
Join Date: Sep 2010
Posts: 7
Received Thanks: 0
is this c++?
lilmhakz123 is offline  
Old 12/03/2010, 13:42   #6
 
elite*gold: 0
Join Date: Jan 2006
Posts: 158
Received Thanks: 20
no is autoit more easy to program then normal c# or borland c++
gorgone is offline  
Old 12/03/2010, 23:28   #7
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
is it workinf with you??
i tryed it with send("{F1}") and nothing happens
koio is offline  
Old 12/06/2010, 14:00   #8
 
elite*gold: 0
Join Date: Jan 2006
Posts: 158
Received Thanks: 20
first u need to focus the process and windows where u want press F1

then u need a good debugs on ur application i fixed all skill of my fire taos

with f1 and Right click .. sleep(500) or more meanwhile a press ond click to cast a spell

show me the code i ll help u

sample

Func UseHPskill()
if $SpecialHP = 100 then
send("{F6}")
MouseClick('Right')
sleep(400)
send("{F5}")
MouseClick('Right')
sleep(400)
send("{F5}")
MouseClick('Right')
sleep(600)
send("{F4}")
; MouseClick('Right')
endif
EndFunc
gorgone is offline  
Old 12/07/2010, 14:28   #9
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
Reportet at 12.07.2010 - 2:30 PM
-multiple post (please use the "Edit-Button")
Quote:
doubleposting, or pushing up really old topics is not allowed and ends up in an infraction / a warning
Please read the
janvier123 is offline  
Old 12/07/2010, 17:56   #10
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Quote:
Originally Posted by ChingChong23 View Post
**** off and get a life, if all you do is look for people double posting.
AGREE

The dude have done that in all his post almost.
Is annoying to look at and is really ****** and he should report him self for spamming, because he don't write 1 useful post -.-
His nuthing, then a skid.

Syst3m_W1z4rd is offline  
Old 12/11/2010, 12:30   #11
 
elite*gold: 0
Join Date: Apr 2007
Posts: 38
Received Thanks: 3
I tested your code using Mono and it worked great!. I set the in game HotKey to Ctrl+S and did:

> dmcs Filename.cs

> mono Filename.exe

It worked great!... i should say. I wonder how it failed to work for you...
zap_xlib is offline  
Reply


Similar Threads Similar Threads
Simple Edit (But not To Simple)
12/03/2010 - CO2 Weapon, Armor, Effects & Interface edits - 10 Replies
Hey, a friend of me asked me to edit top's. So i did for him. I wanted to share them with ya guys: http://i51.tinypic.com/1z5orns.jpg I know its simple. If You like them press Thanks Button. If you Want me to release it Just Ask me.
Simple questions, simple answers :)
11/09/2009 - Kal Online - 2 Replies
Hello guys :) I've been reading this forum for a while, and I found very nice information here but still, some threads in german can't provide me whole knowledge I'm looking for, that's why I'm asking some questions :) 1. kiki uce - is it working on windows xp/vista ? 2. I'm willing to check that on my own, but maybe somebody knows that already - will store hack (http://www.elitepvpers.com/forum/kal-online/300254 -tutorial-money-bug-store-hack.html) work on R3volution server ? There's GBL v2...
Simple Question Needs Simple Answer[If CR gone what bot we can use]
08/08/2008 - Cabal Online - 2 Replies
If CR is not free what BOT can we use in PH... Many players in Ph asking that question.... TY...
Simple
11/24/2007 - CO2 Exploits, Hacks & Tools - 4 Replies
idk if this has been said before but its a very easy scam works pretty good what i do sometime is ahh ok i told somone i wanted to buy a royal dignity then somone traded me i accepted put up 20kk then hit cancel said darn my trades not working lets drop trade we went middle o no where i droped like 200k and he droped royal we switched places and mhm



All times are GMT +2. The time now is 14:21.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.