Sign in to follow this  
Followers 0
Hok

Pixelfind question

6 posts in this topic

OK So I just found out about Pixelfind() and I am trying to make a really simple CurveBall bot. (http://www.addictinggames.com/curveball.html ) So I have this...

HotKeySet("a", "End")
While 1
$coord=PixelSearch(50, 10, 50, 50, 0xFFFFFF)
MouseClick("left", $coord[0], $coord[1])
WEnd

Func End()
    Exit
EndFunc

What exactly is wrong with it?

Share this post


Link to post
Share on other sites



OK So I just found out about Pixelfind() and I am trying to make a really simple CurveBall bot. (http://www.addictinggames.com/curveball.html ) So I have this...

HotKeySet("a", "End")
While 1
$coord=PixelSearch(50, 10, 50, 50, 0xFFFFFF)
MouseClick("left", $coord[0], $coord[1])
WEnd

Func End()
    Exit
EndFunc

What exactly is wrong with it?

The problem is that if the bot doesn't find the pixelin a search it will fail because the coords are undefinied simple condition to check

HotKeySet("a", "End")
While 1
$coord=PixelSearch(50, 10, 50, 50, 0xFFFFFF)
If IsArray($Coord) then 
MouseClick("left", $coord[0], $coord[1])
EndIf
WEnd

Func End()
    Exit
EndFunc

Also, if this is for curveball, why are you clicking? wouldn't it make more sense to use MouseMove() ?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'll test that out... and I am using MouseClick because you can't serve with MouseMove :)

EDIT: Just tried it. Mouse doesn't move... :)

Edited by Hok

Share this post


Link to post
Share on other sites

I'll test that out... and I am using MouseClick because you can't serve with MouseMove :)

EDIT: Just tried it. Mouse doesn't move... :)

Use a different color.

Right now you are searching for Pure White with no shade variation. try different colors, preferably greenish ones.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

OK... But theoretically, wouldn't it work because there is pure white on the ball...

EDIT: Tried this and it still wouldn't work... :)

HotKeySet("a", "End")
While 1
$coord=PixelSearch(50, 10, 50, 50, 0x6DFF4A, 100)
If IsArray($Coord) then
MouseClick("left", $coord[0], $coord[1])
EndIf
WEnd

Func End()
    Exit
EndFunc
Edited by Hok

Share this post


Link to post
Share on other sites

Does anyone know why...?

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