-3
它发现在选定区域的岩石,但似乎只是点击其中一个,并将光标悬停在其他岩石上,直到同样的岩石回来。有人可以看我的脚本,并告诉我什么是错的?我正在使用AutoIt。这里是我的脚本:我试图制作一个矿工机器人使用Autoit为RuneScape
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()
MsgBox(0, "Mining", "Starting to mine")
While 1
$point = PixelSearch(37, 74, 1313, 892, $color)
if IsArray($point) Then
MouseClick("right", $point[0], $point[1])
Sleep($interval)
ContinueLoop
EndIf
WEnd
EndFunc
While 1
Sleep($interval)
WEnd