Sign in to follow this  
Followers 0
pixelfiend

Color Aimbot

5 posts in this topic

I've built this script from bits found in these forums.

My intent is to have it scan an area around the crosshair in a game for colors within a certain range, and move the mouse accordingly.

Just a basic color aimbot script, nothing too complex.

Due to the nature of first person shooters the mousemove method used here will not work, so I'll have to do some ifstatements to limit the mouse moves to one tick away from the base xy coordinates since the pixel locations on the screen are going to change in a nonlinear fashion when the viewangles are changed. That can be done later, right now I seek help in troubleshooting exactly why this script doesnt do anything.

I see no obvious error in the script, to my eyes this should at least give some reaction.

HotKeySet ( "!z", "_TimeOut")

Global $ScanColor = 0x00FF00
Global $ScanShadeVar = 125
Global $ScanPixelSkip = 1
Global $ScanWaitMS = 25
Global $BaseCoordX = 579
Global $BaseCoordY = 508
Global $BaseFOVX = 25
Global $BaseFOVY = 25
Global $FOVLeft = $BaseCoordX - $BaseFOVX
Global $FOVRight = $BaseCoordX + $BaseFOVX
Global $FOVTop = $BaseCoordY + $BaseFOVY
Global $FOVBottom  = $BaseCoordY - $BaseFOVY

Opt("ColorMode", 0)
Opt("MouseCoordMode", 1)
Opt("PixelCoordMode", 1)
Opt("MouseClickDelay", 0)
Opt("MouseClickDownDelay", 0)

;Scan Loop
While 1
    sleep($ScanWaitMs)
    $Mouse = MouseGetPos()
    $Coord = PixelSearch($FOVLeft, $FOVTop, $FOVRight, $FOVBottom, $ScanColor, $ScanShadeVar, $ScanPixelSkip)
            If IsArray($Coord) = 1 Then
               MouseMove($Coord)[0], $Coord[1])
            EndIf

ToolTip($Mouse[0] & "," & $Mouse[1])
WEnd


;Pause Toggle @ Alt+Z
Func _TimeOut()
    If Not IsDeclared("isPaused") Then Global $isPaused = False
    $isPaused = Not $isPaused
    While $isPaused
        Sleep(250)
    Wend
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Start by installing the latest AutoIt and SciTE. Then run your script from SciTE. It will give you five errors. Fix the first two and your script will run.

Edit: If you wonder why it's enough to fix the 2 first errors, it's because they are throwing off the checker so it gives a few false errors. Always work through your errors from the top for this reason.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

There was one error, I used the outdated opt(colormode).

I removed this and the script still doesn't react to anything...

I can even paint a green blob in the correct area in a paint program and the script ignores it.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It could be the possibility that the game you're trying to search on intercepts these types of calls, and returns different values than you'd expect.

You could test this by using the PixelGetColor (I think that's it), on an area and use that color to test with your search.

Edited by acidfear

Share this post


Link to post
Share on other sites

PixelGetColor behaves as expected.

There is a generic color aimbot (VALVE AIMBOT) that works in this game, but it is not ideal and the code for it is messy and uncommented, otherwise I would modify that base.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0