Code:
; AutoIt Version: 3.0
; Language: English
; Platform: Win
; Author: DoubleMcLovin
; Credit to Mibz for original concept of pixel search
;
; Script Function:
; WoW FishBot.
;
;
; Wow Window Title - World of Warcraft
; WoW Window Size - w1280 x h1024
; Initial
WinActivate("World of Warcraft")
Sleep(300)
$time = MsgBox(4, "FishBot - Time of Day?", "Yes = Day | No = Night")
$wg = MsgBox(4, "FishBot - Location", "Are you fishing in Wintergrasp?")
;Find a good spot in WG to stand still and fish, this option will allow you to queue and leave grp.
WinActivate("World of Warcraft")
HotKeySet("{PAUSE}", "EndScript")
; Script Start
While 1
Sleep(300)
Send("1") ; THIS IS THE KEY TO FISH -- Change it to your default or use mouse coords like I did below, just uncomment and comment this line
;~ MouseClick("LEFT", 1043, 1004, 1, 3);Starts fishing
$start = TimerInit();starts timer to make sure that we don't stand still all day
$dif = TimerDiff($start); ^^
While 1
$bobber = PixelSearch (149, 300, 1056, 680, 0xBE3B24, 55, 2); Looks for a bobber
; I don't know if the alliance bobber is different, if it is, please change the above color search respectively.
If UBound($bobber)>1 Then
MouseMove ($bobber[0], $bobber[1])
If $time = 6 Then ;day vs night scans
; Based on your current video settings, these options may need to change. (the 0xFFFFFF/EEEEEE is the color you may need to change)
$coord = PixelSearch (($bobber[0] - 80), ($bobber[1] - 40), ($bobber[0] + 80), ($bobber[1] + 40), 0xFFFFFF, 30, 2);day
Else
$coord = PixelSearch (($bobber[0] - 80), ($bobber[1] - 40), ($bobber[0] + 80), ($bobber[1] + 40), 0xEEEEEE, 30, 2);night
EndIf
If UBound($coord)>1 Then;If the pixelsearch found the splash
MouseMove ($coord[0], $coord[1])
Sleep (100)
MouseClick("right", $coord[0], $coord[1], 1, 3)
Sleep(1500)
ExitLoop
Else
Sleep(350)
$dif = TimerDiff($start)
If $dif > 19500 Then
ExitLoop
EndIf
EndIf
Else
Sleep(350)
$dif = TimerDiff($start)
If $dif > 19500 Then
ExitLoop
EndIf
EndIf
WEnd
If $wg = 6 Then
$wgbutton = PixelSearch (360, 127, 923, 294, 0x720000, 15, 1)
If UBound($wgbutton)>1 Then;time for WG!
MouseClick("left", $wgbutton[0], $wgbutton[1], 1, 3)
Sleep(1500)
Send("{ENTER}")
Send("/script LeaveParty ()")
Sleep(500)
Send("{ENTER}")
Sleep(2000)
MouseClick("left",700,538,1,3) ; Coords may need to be adjusted for your resolution. This is the leave party button.
EndIf
EndIf
WEnd
; Function to exit script
Func EndScript()
$exit = MsgBox(4, "FishBot", "End FishBot?")
If $exit = 6 Then
Exit
EndIf
EndFunc
EDIT: