elite*gold: 0
Join Date: Mar 2013
Posts: 38
Received Thanks: 5
|
#include <ImageSearch.au3>
HotKeySet("{F1}", "Main")
HotKeySet("{F3}", "stop")
HotKeySet("{F2}", "pause")
Global $x = 180
Global $y = 100
Global $1x, $2x, $3x, $4x, $5x, $6x, $7x, $8x, $9x, $10x, $11x, $12x, $13x, $14x, $15x, $16x = @DesktopHeight
Global $1y, $2y, $3y, $4y, $5y, $6y, $7y, $8y, $9y, $10y, $11y, $12y, $13y, $14y, $15y, $16y = @DesktopWidth
Func Main()
While 1
$lookmap = _ImageSearch("map.png", 1, $4x, $4y, 0)
If $lookmap = 1 Then
MouseClick("left", $4x + 25 + (Random(0, $x)), $4y + 50 + (Random(0, $y)))
Sleep(200)
_wait()
EndIf
WEnd
EndFunc
Func _wait()
While 1
Sleep(200)
$gotopoint = _ImageSearch("gotopoint.png", 1, $5x, $5y, 0)
If $gotopoint = 1 Then
golditem()
Else
Main()
EndIf
WEnd
EndFunc
Func item()
While 1
$item = _ImageSearch("items.png", 1, $6x, $6y, 0)
If $item = 1 Then
MouseClick("left", $6x, $6y, 1)
Sleep(200)
waititemtocollect()
Else
_wait()
EndIf
WEnd
EndFunc
Func golditem()
While 1
$golditem = _ImageSearch("goldenitems.png", 1, $7x, $7y, 0)
If $golditem = 1 Then
MouseClick("left", $7x, $7y, 1)
Sleep (200)
waititemtocollect()
Else
item()
EndIf
WEnd
EndFunc
Func waititemtocollect()
While 1
$waititemtocollect = _ImageSearch("waittocollect.png", 1, $2x, $2y, 0)
If $waititemtocollect = 0 Then
golditem()
EndIf
WEnd
EndFunc
While 1
Sleep(100)
WEnd
Func pause()
While 1
Sleep(100)
WEnd
EndFunc
Func stop()
Exit
EndFunc
|