Jump to content

I need help with this script


Recommended Posts

hello I was wondering could it be possible to have 2 color in this script I would like it to search 0x955C4A and 0x597Eb2 , thank you

#NoTrayIcon

HotKeySet("{F9}","_Pause") ; Press F9 for pause AimBot

;HotKeySet("{F10}","_Play") ; Dont need this hotkey, F9 now Toggles on/off

HotKeySet("{F11}","_Exit") ; Press F11 for Exit AimBot

Global $Paused = 0

_Pause() ;Make it pause first

While TRUE

$Search = PixelSearch(118,232,911, 656, 0x597Eb2, 5)

If NOT @error and IsArray($Search) then MouseClick('left', $search[0], $search[1], 1, 0) ; Click on the pixel

Sleep(1000)

WEnd

Func _Pause()

$Paused = NOT $Paused

While $Paused

Sleep(100)

ToolTip("Paused. Press F9 to unpause.",0,0)

WEnd

EndFunc

Func _Exit()

Exit

EndFunc

Link to comment
Share on other sites

You could use an If statement for this.

Something like,

#NoTrayIcon
HotKeySet("{F9}","_Pause"); Press F9 for pause AimBot
HotKeySet("{F11}","_Exit"); Press F11 for Exit AimBot

Global $Paused = 0

_Pause();Make it pause first

While TRUE
    $Search = PixelSearch(118,232,911, 656, 0x597Eb2, 5)
    If NOT @error and IsArray($Search) Then
        $Search = PixelSearch(118, 232, 911, 656, 0x955C4A , 5)
        If Not @error And IsArray($Search) Then
            MouseClick('left', $search[0], $search[1], 1, 0); Click on the pixel
        EndIf
    EndIf
    Sleep(1000)
WEnd

Func _Pause()
    $Paused = NOT $Paused
    While $Paused
        Sleep(100)
        ToolTip("Paused. Press F9 to unpause.",0,0)
    WEnd
EndFunc
Link to comment
Share on other sites

allright thx I will try it also umm could it be possible that if it find one that it does not click it again for a second time for a period of time?

You could use an If statement for this.

Something like,

#NoTrayIcon
HotKeySet("{F9}","_Pause"); Press F9 for pause AimBot
HotKeySet("{F11}","_Exit"); Press F11 for Exit AimBot

Global $Paused = 0

_Pause();Make it pause first

While TRUE
    $Search = PixelSearch(118,232,911, 656, 0x597Eb2, 5)
    If NOT @error and IsArray($Search) Then
        $Search = PixelSearch(118, 232, 911, 656, 0x955C4A , 5)
        If Not @error And IsArray($Search) Then
            MouseClick('left', $search[0], $search[1], 1, 0); Click on the pixel
        EndIf
    EndIf
    Sleep(1000)
WEnd

Func _Pause()
    $Paused = NOT $Paused
    While $Paused
        Sleep(100)
        ToolTip("Paused. Press F9 to unpause.",0,0)
    WEnd
EndFunc
Link to comment
Share on other sites

Link to comment
Share on other sites

Allright I just tryed something but it does not look for the pixel anymore but it actualy work with 1 color

I would need it to have 0xFB7D48 in priority over 0xF5E02C so if 0xFB7D48 appear it skip 0xF5E02C and click 0xFB7D48

HotKeySet("{F11}","_Exit") ; Press F11 for Exit AimBot

HotKeySet("{F9}","_Pause") ; Press F9 for pause AimBot

Global $Paused = 0

While TRUE

$Search = PixelSearch(411,418,837, 749, 0xFB7D48, 1)

If NOT @error and IsArray($Search) then MouseClick('left', $search[0], $search[1], 1, 0) ; Click on the pixel

$Search = PixelSearch(411, 418, 837, 749, 0xF5E02C , 1)

If NOT @error and IsArray($Search) then MouseClick('left', $search[0], $search[1], 1, 0) ; Click on the pixel

MouseClick('left', $search[0], $search[1], 1, 0); Click on the pixel

Sleep(1000)

WEnd

Func _Pause()

$Paused = NOT $Paused

While $Paused

Sleep(100)

ToolTip("Paused. Press F9 to unpause.",0,0)

WEnd

EndFunc

Func _Exit()

Exit

EndFunc

Edited by Yan2099
Link to comment
Share on other sites

Allright I found a solution I made 2 script wich have 2 different color much more simple that way :P but now I have a new prob :P one of the 2 colors move more fast than the color finder click so it click it where it was 0,10 second before so it miss it is there a way to fix that?

Link to comment
Share on other sites

I'm afraid that's something you'll have to live with, with Pixel-based bots..

One can only try to narrow it down as much as possible, please try this code:

Dim $Active = False
Dim $SearchArea = 60
Dim $SearchColor = 0x00FF01
Dim $SearchDiff = 0
Dim $SearchStep = 1

Dim $SearchIntensity = 1; Ammount of ms to sleep after each iteration

HotKeySet("{pause}", "_Pause")

While 1
    If $Active Then
        
        $Coord = MouseGetPos()
        $aCoord = PixelSearch($Coord[0]-$SearchArea, $Coord[1]-$SearchArea, $Coord[0]+$SearchArea, $Coord[1]+$SearchArea, $SearchColor, $SearchDiff, $SearchStep)
        
        If Not @error Then
            Do
                $Coord = PixelSearch($aCoord[0]-5, $aCoord[1]-5, $aCoord[0]+5, $aCoord[1]+5, $SearchColor, $SearchDiff)
                If @error Then ExitLoop
                $Coord = PixelSearch($Coord[0], $Coord[1], $Coord[0], $Coord[1], $SearchColor, $SearchDiff)
                If Not @error Then
                    MouseClick("left", $Coord[0], $Coord[1], 1, 0)
                    $aCoord = $Coord
                EndIf
            Until Not $Active
        EndIf
            
    EndIf
    
    Sleep($SearchIntensity)
WEnd


Func _Pause()
    $Active = Not $Active
EndFunc

The $SearchColor variable is set to the color of the pic I've attached, though not moving, it's fairly fast, and also should hit dead on(try with mspaint with smallest brush size, set it to black, and run the script, and press the pause button on your keyboard, and it'll start.) :P

post-3268-1217607314_thumb.jpg

Link to comment
Share on other sites

allrght thx allot I will try it

I'm afraid that's something you'll have to live with, with Pixel-based bots..

One can only try to narrow it down as much as possible, please try this code:

Dim $Active = False
Dim $SearchArea = 60
Dim $SearchColor = 0x00FF01
Dim $SearchDiff = 0
Dim $SearchStep = 1

Dim $SearchIntensity = 1; Ammount of ms to sleep after each iteration

HotKeySet("{pause}", "_Pause")

While 1
    If $Active Then
        
        $Coord = MouseGetPos()
        $aCoord = PixelSearch($Coord[0]-$SearchArea, $Coord[1]-$SearchArea, $Coord[0]+$SearchArea, $Coord[1]+$SearchArea, $SearchColor, $SearchDiff, $SearchStep)
        
        If Not @error Then
            Do
                $Coord = PixelSearch($aCoord[0]-5, $aCoord[1]-5, $aCoord[0]+5, $aCoord[1]+5, $SearchColor, $SearchDiff)
                If @error Then ExitLoop
                $Coord = PixelSearch($Coord[0], $Coord[1], $Coord[0], $Coord[1], $SearchColor, $SearchDiff)
                If Not @error Then
                    MouseClick("left", $Coord[0], $Coord[1], 1, 0)
                    $aCoord = $Coord
                EndIf
            Until Not $Active
        EndIf
            
    EndIf
    
    Sleep($SearchIntensity)
WEnd


Func _Pause()
    $Active = Not $Active
EndFunc

The $SearchColor variable is set to the color of the pic I've attached, though not moving, it's fairly fast, and also should hit dead on(try with mspaint with smallest brush size, set it to black, and run the script, and press the pause button on your keyboard, and it'll start.) :P

post-3268-1217607314_thumb.jpg

Link to comment
Share on other sites

Then read in the help file, try some yourself(by some I mean alot), then search the forum for guide lines, then try again, THEN if you can't get it working, create a new thread regarding the subject.

Only after that, after you've shown some effort, will people(I atleast) try and help you.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...