Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 00:01

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

Advertisement



[Source] Move mouse to specific color on screen (color aimbot)

Discussion on [Source] Move mouse to specific color on screen (color aimbot) within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
riotphr3ak's Avatar
 
elite*gold: 20
Join Date: Jul 2012
Posts: 43
Received Thanks: 5
[Source] Move mouse to specific color on screen (color aimbot)

I was initially calling GetPixel in a loop to scan a screenshot for a specific RBG which caused a 2-3 delay before finding the color until I realized it's much faster to use LockBits and UnlockBits instead.

Anyway, here's my source for finding a specific RBG color on your screen and then automatically moving the mouse to that color which is good for browser shooting games and what not.

Compiled in vs2010.

Code:
Imports System.Drawing.Imaging
Imports System.Runtime.InteropServices

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ColorToFind As Int32 = Color.FromArgb(255, 137, 70, 5).ToArgb 'first # always 255
        Dim x As Int32 = -1
        Dim y As Int32
        Dim bmp As Bitmap = New Bitmap(CaptureToBitmap(0, 0, Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height))
        Dim b(bmp.Width * bmp.Height - 1) As Int32
        Dim bd As BitmapData = bmp.LockBits(New Rectangle(Point.Empty, bmp.Size), ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb)
        Marshal.Copy(bd.Scan0, b, 0, b.Length)
        bmp.UnlockBits(bd)
        'Find color
        For i As Int32 = 0 To b.Length - 1
            If b(i) = ColorToFind Then
                x = i Mod bmp.Width
                y = i \ bmp.Width
                Cursor.Position = New Point(x, y)
                Exit For
            End If
        Next
        ' Color was found?
        If x = -1 Then
            MessageBox.Show("Color Not Found")
        End If
        bmp.Dispose()
    End Sub

    Private Function CaptureToBitmap(ByVal X As Int32, ByVal Y As Int32, ByVal W As Int32, ByVal H As Int32) As Bitmap
        Dim bmp As New Bitmap(W, H)
        Using g = Graphics.FromImage(bmp)
            g.CopyFromScreen(New Point(X, Y), Point.Empty, New Size(W, H))
        End Using
        Return bmp
    End Function
riotphr3ak is offline  
Reply


Similar Threads Similar Threads
[RELEASE] COLOR READER (+ MOUSE POS.)
07/18/2011 - AutoIt - 7 Replies
Hallo Leute! Möchte euch heute mein Programm vorstellen, mit dem ihr easy den Farbencode einer bestimmten stelle auslesen könnt! Dies eignet sich sehr gut für beispielsweise einen kleinen Aimbot füf Flashgames! Mein Programm zeigt euch auch die Position, auf der sich eure Maus befindet! Ich hoffe es gefällt euch, ist mein erstes Programm das ich release! Hier der Test auf VirusTotal
WoW Color Hack (Use color-codes in text)
09/23/2007 - WoW Exploits, Hacks, Tools & Macros - 31 Replies
WoWColorHack.flt -=Preamble=- I'm quite surprised that no one has released anything similar yet - the theory behind this dates back to the alpha days. Hell, I first used this filter on my own alpha sandbox. -=Theory=-



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


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.