; ******************************************************************************** ****************************************
; **************************************************** User Variables ****************************************************
; ******************************************************************************** ****************************************
; Enter the following values in the section below AFTER := , replace the filler text in capitals
; LogL - The name of your Windows Profile
; RodL - The location of the Fishing Rod on your bar
; BaitL - The location of Bait on your bar
; xRod / yRod - The X and Y coordinates of your Fishing Rod in your bags (use AutoIT Window Spy)
LogL := NAME
RodL := VALUE
BaitL := VALUE
xRod := XVALUE
yRod := YVALUE
; To detect the Reel In event you must manually fish once and take a screenshot of the game when you see the water splash.
; It is best to wait until the splash is at its largest.
; Open the screenshot in a photo editing program, such as MSPaint. To find the hex value in MSPaint use the eyedropper to
; select a light colour in the middle of the splash, click Edit Colours, and note down the Red Green Blue values.
; Navigate to
RGB to Hex and convert the RGB values into Hex.
; Replace HEXVALUE with the 6 digit Hex value provided by rgbtohex.net
HexV := HEXVALUE
; ******************************************************************************** ****************************************
; *************************************************** End of Variables ***************************************************
; ******************************************************************************** ****************************************
IfWinNotActive, RIFT, , WinActivate, RIFT,
WinWaitActive, RIFT,
Logfile = C:\Users\%LogL%\Documents\RIFT\log.txt
Fish :=0
MouseGetPos, xFish, yFish
Top:
Px1 := (xFish-25)
Py1 := (yFish-25)
Px2 := (xFish+25)
Py2 := (yFish+25)
FileDelete, %logfile%
Last_Line :=0
Sleep, 500
Send, %RodL%
Sleep, 400
MouseClick, left, xFish, yFish
Sleep, 200
If Fish = 1
Goto, bait
Go:
Timer := A_TickCount
Go-Loop:
{
PixelSearch, , ,%Px1%,%Py1%,%Px2%,%Py2%, 0x%HexV%, 40, Fast RGB
If ErrorLevel
Goto, Read-Log
else
Goto, Reel
}
Read-Log:
{Loop, read, %logfile%
Last_Line := A_LoopReadLine
{
Sleep, 200
IfInString, Last_Line, lure has decayed
Fish :=1
IfInString, Last_Line, away
Goto, Top
IfInString, Last_Line, stop fishing
Goto, Top
IfInString, Last_Line, received
Goto, Top
If A_TickCount - Timer < 20000
Goto, Go-Loop
Goto, Top
}
}
Reel:
Loop
{
FileDelete, %logfile%
Last_Line :=0
Sleep, 200
Send, %RodL%
Sleep, 2500
Goto, Go
}
Bait:
Loop
{
Fish :=0
Sleep, 200
Send, %BaitL%
Sleep, 200
MouseClick, left, xRod, yRod
Sleep, 4000
Goto, Top
}
F8::Goto, Bait
F9::Pause
F10::Reload
F11::ExitApp