Jump to content
Sign in to follow this  
goldenix

bugged PixelGetColor & PixelSearch?

Recommended Posts

I tried them both, & it gave me same result.

The thing is, that it finds the pixel (its in the fullscreen game 800*600 btw & im searching 1 pixel) & sometimes it doesnt. It finds most of the time(80%), the screen does not change(i made shure of that)

Any ideas why it doing this?

Sample Code

Opt("MouseCoordMode", 0)        ;1=absolute, 0=relative, 2=client
Opt("PixelCoordMode", 0)        ;1=absolute, 0=relative, 2=client

HotKeySet("1", "_pixel")
HotKeySet("{esc}", "_exit")

Func _pixel_()
    While 1
        $coord = PixelSearch( 176, 88, 176, 88, 0xFFFBFF, 30 )
        If @error Then ControlSend("RF Online", "", "", Send("{F5}")) ;slam pots
    sleep(2000) 
    WEnd
EndFunc

Func _pixel()
    While 1
        $var0 = PixelGetColor( 176, 88 )
        If Hex($var0, 6) <> 'FFFBFF' Then ControlSend("RF Online", "", "", Send("{F5}")) ;slam pots
    sleep(2000) 
    WEnd
EndFunc

Func _exit()
Exit
EndFunc


while 1
Sleep(100)  
WEnd

Share this post


Link to post
Share on other sites

I don't know why but I have a similar problem. It must be buggy.

30 is pretty high have you tried something lower? The higher you go the more buggy it gets.

$coord = PixelSearch( 176, 88, 176, 88, 0xFFFBFF, 10 )

Edited by JamesDover

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  

×
×
  • Create New...