Jump to content
Sign in to follow this  
dgarrett8

Need help tweaking this

Recommended Posts

dgarrett8

Well, my title pretty much sums it up. I'm having some issues with the pixel sq area i believe. Now, when the crosshair(x,y) is near green or red it doesn't always shoot when its near the x,y coords. Or atleast when I exactly go over the color with x,y coords. Here's the code I'm working on. credits to samucal so far

#include <GUIConstants.au3>
Global $Aimbot = 0, $found = "no"

While 1

HotKeySet("{HOME}", "ToggleAimbot")
HotKeySet("{END}", "TurnoffAimbot")


$status = GUICtrlCreateLabel("Aimbot Status: Off", 16, 624, 500, 33)

    GUISetState()
    If $Aimbot = 1 Then; Green
            $pos = MouseGetPos()
            $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 10) , ($pos[1] + 10), 0x00FF00)
            If IsArray($coord) = 1 Then
                MouseClick('left', $coord[0], $coord[1], 1, 0)
            EndIf
    EndIf   
        
        
        
    If $Aimbot = 2 Then; Red
            $pos = MouseGetPos()
            $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 10) , ($pos[1] + 10), 0xFF0000)
            If IsArray($coord) = 1 Then
                MouseClick('left', $coord[0], $coord[1], 1, 0)
            EndIf
        
    EndIf   
        
    WEnd    
        
        
        
        Func ToggleAimbot()
    If $Aimbot < 2 Then
        $Aimbot = $Aimbot + 1
    Else
        $Aimbot = 0
    EndIf
    Select
        Case $Aimbot = 0
            GUICtrlSetData($status, "Aimbot Status: Off")
        Case $Aimbot = 1
            GUICtrlSetData($status, "Aimbot Status: Green")
        Case $Aimbot = 2
            GUICtrlSetData($status, "Aimbot Status: Red")
        
    EndSelect
EndFunc  ;==>ToggleAimbot
    

Func TurnoffAimbot()
    $Aimbot = 0
    GUICtrlSetData($status, "Aimbot Status: Off")
EndFunc  ;==>TurnoffAimbot

"I think, therefore I am"[size="1"]René Descartes[/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.