Jump to content
Sign in to follow this  
Smiley357

PixelSearch

Recommended Posts

Smiley357

I am having trouble with PixelSearch. In the game Silkroad Online I do a PixelSearch to find out how many people are in the party. But PixelSearch is unable to find anything. I think the issue is that there might be layers and the search is done on the lowest layer and the party members are on a layer above the search layer. I could be totally wrong about this. But the reason why I think this is that when I take a screenshot the PixelSearch works just fine. Is there a way to do a PixelSearch on all layers? If Im just totally wrong please feel free to bash me onto the correct path. Thanks for any and all help.

Share this post


Link to post
Share on other sites
Smiley357

Ouch not even a helpful hint or some better keywords to use in the search. Anything??

Share this post


Link to post
Share on other sites
d3mon

Ouch not even a helpful hint or some better keywords to use in the search. Anything??

Nah,....He don't know autoit help lol

$pixellayer=PixelGetColor($x,$y) ;Search x,y of layer and search for the pixel color

$pixelSearch=PixelSearch(0,0,@DesktopHeight,@DesktopWidth,$pixellayer) ;Search layer on screen

If IsArray($pixelSearch)=1 Then ;If PixelColor for layer has been found Then
MsgBox(0,"",$pixelSearch[0]&","&$pixelSearch[1] ; Pixel Coordinates
EndIf

While 1
Sleep(10)
WEnd

No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites
Smiley357

Here is my code. It looks similar to yours. It looks as if we basically do the same thing in the pixelsearch. It will work with a screenshot but not in the game. Any ideas? Maybe increase shade-variation to 10?? I tried it at 5 and it was the same result.

Func _partymembers()
    $members = 0
    $count = 0
    Do
        $coord = PixelSearch( $TLX[$count], $TLY[$count], $BRX[$count], $BRY[$count], 0xFFFFFF, 2)
        If Not @error Then
            $members += 1
        EndIf
        $count +=1
    Until $count > 6
    Return $members
EndFunc

Share this post


Link to post
Share on other sites
Smiley357

anyone have any ideas?

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  

×