I noticed this after staring at it for 2 full seconds.Quote:
Here be my First Script
after using AutoIT for 3 days
Any noticeable mistakes?
Code:#include <ImageSearch.au3> MsgBox(0, "MSG", "Press Ok to Start") WinActivate("Mabinogi : Ancient Secrets of Irinid") While (1) Send("{[B][COLOR="Red"]L[/COLOR][/B]ALT down}") Send("{Ctrl down}") $x1 = 0 $y1 = 0 ; ; finds the target monter $result = _ImageSearch("monster.bmp", 1, $x1, $y1, 0) If $result = 1 Then MouseMove($x1, $y1, 1) MouseClick("Left", $x1, $y1, 1, 1) MouseClick("Left", $x1, $y1, 1, 1) MouseClick("Left", $x1, $y1, 1, 1) MouseClick("Left", $x1, $y1, 1, 1) MouseClick("Left", $x1, $y1, 1, 1) Send ("{ctrl up}") Sleep(2000) EndIf WEnd While (1) ; Picks up loot $result = _ImageSearch("gold.bmp", 0, $x1, $y1, 0) If $result = 1 Then MouseMove($x1, $y1, 3) MouseClick("Left") Sleep(2000) EndIf WEnd
I'll take a closer look later.