Jump to content
Sign in to follow this  
Yan2099

I need help with this script

Recommended Posts

Yan2099

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

Share this post


Link to post
Share on other sites
Yan2099

both color will need to be clicked when it find it

Share this post


Link to post
Share on other sites
FreeFry

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

Share this post


Link to post
Share on other sites
Yan2099

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

Share this post


Link to post
Share on other sites
Yan2099

I would like it not to click twice for a period of time like 1 min the same 0x597Eb2 at same location like just find another location with 0x597Eb2

Share this post


Link to post
Share on other sites
FreeFry

Well you could add a Sleep(60000), or you could use a timer(TimerStart, and TimerDiff)

Share this post


Link to post
Share on other sites
Golbez

you might want to look into using opt(colormodethingum) just to make sure you are using the right color mode :P

Share this post


Link to post
Share on other sites
BrettF

Share this post


Link to post
Share on other sites
Yan2099

Allright sry about that BrettF

Do not PM me, or other members asking for help, unless the instruct you to. I will not help you. Just wait for an answer like everyone else.

Share this post


Link to post
Share on other sites
Yan2099

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

Share this post


Link to post
Share on other sites
Yan2099

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?

Share this post


Link to post
Share on other sites
FreeFry

Try with lowering your Sleep.

Share this post


Link to post
Share on other sites
Yan2099

ya I tryed that allright but it still miss some time it get it and click it one shot but some time it try to click it but miss it like 5-6 times

Share this post


Link to post
Share on other sites
FreeFry

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

Share this post


Link to post
Share on other sites
Yan2099

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

Share this post


Link to post
Share on other sites
matys

VERY NICE!

but i want make for cod2 aimbot!

i try this but that not work good

pleas helpp!

Share this post


Link to post
Share on other sites
FreeFry

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.

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.