Sign in to follow this  
Followers 0
Info

PixelSearch

3 posts in this topic

#1 ·  Posted (edited)

HotKeySet ( "{F11}", "Startit")
Func Startit()

Local $pixel = 0
Local $Timer = TimerInit()

While TimerDiff($Timer) < 50000; Search for pixel for 50 seconds.
    $color = PixelSearch ( 0, 0, 1000, 1000, 0xF8B19F)
    If Not @error Then
        While TimerDiff($Timer) < 50000; Search for pixel for 50 seconds.
        $pixel = PixelSearch ( ($color), ($color), ($color), ($color), 0xD8C2AD); <----------- Number 2
        If Not @error Then
            Sleep ( 250 )
            While TimerDiff($Timer) < 50000; Search for pixel for 50 seconds.
            $color = PixelSearch ( 0, 0, 1000, 1000, 0xF8B19F)
            If Not @error Then
                While TimerDiff($Timer) < 50000; Search for pixel for 50 seconds.
                $pixel = PixelSearch ( ($color), ($color), ($color), ($color), 0xD8C2AD); <---------- Number 2
                If Not @error Then
                    Sleep ( 250 )
                EndIf
                WEnd
            EndIf
            WEnd
        EndIf
        WEnd
    EndIf
WEnd

EndFunc

While 1
WEnd

I want the number 2 to look for the color in the place that the number one Pixel Search found it...

Thanks.

Edited by Info

Share this post


Link to post
Share on other sites



From the help file:

Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y)

so this line:

$pixel = PixelSearch ( ($color), ($color), ($color), ($color), 0xD8C2AD)

should be: $pixel = PixelSearch ( $color[0], $color[1], $color[0], $color[1], 0xD8C2AD)

NOT TESTED

Share this post


Link to post
Share on other sites

Mm'kay, the game has a server check :)

I'll check later ;)

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