Jump to content

Pixelfind question


Recommended Posts

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?

Link to comment
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() ?

Link to comment
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... :)

Edited by Hok
Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...