Hi im new here and slowly learning the language.
well here is my problem
This is made to find the pixel that is chosen by the function getColor and it does what I want like finding the pixel(well still not sure on how to put shading variation) but im lost on what to do to make it do mouseclick RIGHT whenever the pixel is not available and can I limit the search to a smaller screen? say 800x600 just wanted to know if thats possible.
Hope to hear from you guys :)
thanks
well here is my problem
PHP Code:
HotKeySet("{ESC}", "Terminate")
HotKeySet("!c", "getColor")
HotKeySet("!a", "attackLoop")
Global $color
Global $interval
$interval = "10000"
MsgBox(0, "Starting Up", "Starting, use ESCAPE to quit, Alt + C to set color, and Alt + A to attack.")
Func Terminate()
Exit 1
EndFunc
Func getColor()
$point = MouseGetPos()
$color = PixelGetColor($point[0], $point[1])
MsgBox(0, "Color Set", "The color has been set to " & $color)
EndFunc
Func attackLoop()
While 1
$point = PixelSearch(60, 157, 1772, 759, $color,10)
if IsArray($point) Then
MouseClick("left", $point[0], $point[1])
Sleep($interval)
EndIf
Sleep(50)
WEnd
EndFunc
While 1
sleep(250)
WEnd
Hope to hear from you guys :)
thanks