Register for your free account! | Forgot your password?

You last visited: Today at 03:06

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

[C#]Pixel Aimbot Example

Discussion on [C#]Pixel Aimbot Example within the CO2 Programming forum part of the CO2 Main - Discussions / Questions category.

Old   #1
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 783
[C#]Pixel Aimbot Example

I would not recommend using this nor ever using a pixel aimbot. It's a simply bad way to do it.

        //This is the native call to the mouse event.
        [System.Runtime.InteropServices.DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto, CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);

        //mouse buttons
        private const int MOUSEEVENTF_LEFTDOWN = 0x02;
        private const int MOUSEEVENTF_LEFTUP = 0x04;
        private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
        private const int MOUSEEVENTF_RIGHTUP = 0x10;

        /// <summary>
        /// Finding a certain pixel in the screen.
        /// </summary>
        /// <param name="SnapShot">The snapshot need to be a screenshot of the whole screen!!</param>
        /// <param name="ColorToFind">Which color to find.</param>
        /// <returns></returns>
        public Point FindPixel(Image Screen, Color ColorToFind)
            Bitmap bit = new Bitmap(Screen);

            for (int y = 0; y < Screen.Height; y++)

                for (int x = 0; x < Screen.Width; x++)
                    Color c = bit.GetPixel(x, y);
                    if (c == ColorToFind)
                        return new Point(x + this.Location.X, y + this.Location.Y);

            return new Point(0, 0);

        /// <summary>
        /// Starting the aimbot.
        /// </summary>
        public void Aimbot()
            while (true)
                //This method need to be created by you, so it's not an exaclt handover!
                Image Screen = GetScreen();

                //Will find a pink color on the screen.
                //What you could do to improve the performance is making a check,
                //if there is more than at least 10 pixels in row both h/w that is same.
                //Then you could make the avatars in the client have a certain color and it would aim for that,
                //or you could make the shadow have a certain color.
                //You could also make a color range like checking if colors are close ot being the same.
                //However it's more advanced and it would be up to you, I'm not going to hand everything over.
                Point Aim = FindPixel(Screen, Color.Pink);

                //will set the mouse to the location where the pixel was found.

                //Will send the mouseclick event. True for right click, false for left click.
                SendClick(Aim, true);

        /// <summary>
        /// Sending the mouseclick event.
        /// </summary>
        /// <param name="Loc">The location.</param>
        /// <param name="Skill">If it's a skill or not.</param>
        public void SendClick(Point Loc, bool Skill)
            if (Skill)
                mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, (uint)Loc.X, (uint)Loc.Y, 0, 0);
                mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, (uint)Loc.X, (uint)Loc.Y, 0, 0);

        /// <summary>
        /// Setting the position of the mouse.
        /// </summary>
        /// <param name="Loc">The location.</param>
        public void SetMouseLocation(Point Loc)
            Cursor.Position = new Point(Loc.X, Loc.Y);

I don't have a username is offline  
Old 02/03/2012, 14:41   #2
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
without reading the rest of code , here what i thought it will be doing
hits the shadow even in the mid of air
keep hitting and rape stamina
eff. with high ping will be 20/100
so its fail but thanks for sharing the idea
btw i made a pixel aimbot for crossfire , the point is that it was too slow in updating farms to aim a new pixel which was the main reason i stopped developing it , it was a bit laggy cuz it was updating 5 frames per sec and the game was +40 fps

injection illusion logic is offline  

« Basic Client-server with RSA | [TuT][C#]Creating your own proxy - Part 2 »

Similar Threads
Pixel Aimbot Using C#
08/03/2011 - CO2 Programming - 5 Replies
Hi , i waked up today with an aimbot idea, but the problem i don't know very much C# so here the code using english words, and try to help me to translate this text into a C# code please! private void Play_Click(object sender, EventArgs e) { SearchPixel("Violet"); if (VioletFound) Mouse.Click();
looking for pixel bot..
02/06/2011 - Kal Online - 2 Replies
hey.. i know that u all gonna say use search.. but i searchd whole forum and not even 1 bot is working :( all bost attack maybe 1 mob than hes healing for no reason and thats it.. anyone can help me? :) and btw is there a way to get free SoC? ty greetz ;)
AP Pixel/Color Aimbot
10/24/2010 - CO2 Bots & Macros - 49 Replies
Hi elitepvpers! Since I've seen many of those P-Server owners always editing their launchers disabling proxies, here is something they may not be able to disable. AP Pixel Aimbot Setup.exe Here is a video to demonstrate how it works: Have fun peepz. -Anonymous. PS. Pixel aiming is not 100% correct everytime so yeah, can't use it, too bad. And if any one of those server owners have managed to block it, too bad i will not update this tool.
ca working pixel aimbot
10/15/2009 - Combat Arms - 1 Replies
This aimbot will work really well if you use chams -It has an autoshot. Instructions are in the Instructions.txt Virus Scan: Click Here VirusTotal - Free Online Virus and Malware Scan - Result ... 1254862891 Download: MEGAUPLOAD - The leading online storage and file delivery service

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

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.