// WoW Fishing Bot v1.1
// Made by QuietKnight
// Changes
// v1.1
// + Added in the option to turn off AFK Killer
// + Added in changes log
//
// v1.0
// + Initial version
// Special instructions:
// - Put your fishing skill in slot '0'
// - Zoom into 1st person mode
// - Under Video Options, uncheck 'Hardware Cursor'
SetActiveWindow World of Warcraft
Constants
/////////////////////////
// CHANGABLE CONSTANTS //
/////////////////////////
// Run count
// How many times the script should try to fish
runCount = 150
// Speed
// This is the initial scan speed. The lower the number, the faster the scan goes,
// and the higher the number, the slower the scan goes. If you're having problems
// where the initial scan isnt finding the bobber and just scanning right over it,
// try increasing this number slowly.
scanSpeed = 60
// Scan box distances
// These are the distances away from the sides of the screen to scan for a lure
// These are measured as percentages of the screen in the appropriate direction
scanLeftDist = .3
scanRightDist = .3
scanTopDist = .4
scanBottomDist = .25
// Brightness range
// This is the number of RGB values over and under the 'bright spot' that is the
// lure to look for. Basically, if you're getting the message 'No fish to hook',
// try increasing both numbers a bit, and if the bobber bobs but you dont catch
// anything, try decreasing both numbers a bit. This can change from environment
// to environment. Also, generally speaking brightRangeUp shouldnt be very high.
brightRangeDown = 50
brightRangeUp = 10
// Brightness distance
// Doesnt matter what it does, but basically, leave it alone unless you're having
// problems actually catching the fish. If you're having problems and you want
// to tweak it, general rule is, the higher the resolution, the higher the number,
// the but number range should only be anywhere from 2 MIN to 6 MAX. If you start
// getting too out of wack with this, you'll never catch a fish
brightDist = 3
// AFK Away
// Set to 1 to use AFK Away (which presses Enter twice before every cast) or
// to 0 to disable AFK Away entirely. This comes in useful if you like to
// chat on WoW while fishing.
afkAway = 0
/////////////////////////////
// NON-CHANGABLE CONSTANTS //
/////////////////////////////
// Optimal scan step ratios
widthToWindowRatio = 0.056
heightToWindowRatio = 0.075
// Scanbox
scanTop = 0
scanBottom = 0
scanLeft = 0
scanRight = 0
scanStepX = 0
scanStepY = 0
scanSuccess = 0
// THE Box
boxMinX = 0
boxMaxX = 0
boxMinY = 0
boxMaxY = 0
boxCenterY = 0
boxCenterX = 0
boxScanStep = 4
boxAvgWidth = 0
boxAvgHeight = 0
// Misc vars
x = 0
y = 0
i = 0
j = 0
// Mouse vars
isMouseOrange = 0
mouseX = 0
mouseY = 0
// Lure location
lureInitLocX = 0
lureInitLocY = 0
// RGB Info
brightX = 0
brightY = 0
brightTotal = 0
brightR = 0
brightG = 0
brightB = 0
brightRMin = 0
brightRMax = 0
brightGMin = 0
brightGMax = 0
brightBMin = 0
brightBMax = 0
curTotal = 0
// Splash
splashed = 0
End
///////////////
// Main Proc //
///////////////
Delay 1000
Call CalculateScanBoxConstants
Loop
Keys 0
Delay 1000
Call FindLureInitial
Call FindBoxCenter
Compute x = -10
MousePos ,
Delay
Call GetRGBValue
Call WaitForSplash
If = 1
Delay 2500
KeyDown {RETURN} 250
KeyDown {RETURN} 250
Delay 2000
Else
Delay 5000
End
End
////////////////
// Procedures //
////////////////
Procedure CalculateScanBoxConstants
Compute scanTop = {WindowTop} + Trunc( {WindowHeight} * )
Compute scanBottom = ( {WindowTop} + {WindowHeight} ) - Trunc( {WindowHeight} * )
Compute scanLeft = {WindowLeft} + Trunc( {WindowWidth} * )
Compute scanRight = ( {WindowLeft} + {WindowWidth} ) - Trunc( {WindowWidth} * )
Compute boxAvgWidth = Trunc( {WindowWidth} * )
Compute boxAvgHeight = Trunc( {WindowHeight} * )
Compute scanStepX =
Compute scanStepY = Trunc( / 2 )
End
Procedure FindLureInitial
SetConst scanSuccess = 0
Compute y =
While <= AND = 0
Compute i = {LoopNo} MOD 2
If = 0
Timestamp In Even
Compute x =
Else
Timestamp In Odd
Compute x = + Trunc( / 2 )
End
While <= AND = 0
// Move the mouse and wait a second (wait is required!)
MousePos ,
Delay
Call isMouseOrange
// If the mouse is orange
If = 1
SetConst lureInitLocX =
SetConst lureInitLocY =
SetConst scanSuccess = 1
End
Compute x= +
End
Compute y= +
End
End
Procedure FindBoxCenter
// Find X min
SetConst scanSuccess = 0
Compute x =
Compute y =
While = 0
// Move the mouse and wait a second (wait is required!)
MousePos ,
Delay
Call isMouseOrange
If = 0
SetConst boxMinX =
SetConst scanSuccess = 1
Else
Compute x= -
End
End
// Find X max
SetConst scanSuccess = 0
Compute x =
Compute y =
While = 0
// Move the mouse and wait a second (wait is required!)
MousePos ,
Delay
Call isMouseOrange
If = 0
SetConst boxMaxX =
SetConst scanSuccess = 1
Else
Compute x= +
End
End
// Find Y min
SetConst scanSuccess = 0
Compute x =
Compute y =
While = 0
// Move the mouse and wait a second (wait is required!)
MousePos ,
Delay
Call isMouseOrange
If = 0
SetConst boxMinY =
SetConst scanSuccess = 1
Else
Compute y= -
End
End
// Find Y max
SetConst scanSuccess = 0
Compute x =
Compute y =
While = 0
// Move the mouse and wait a second (wait is required!)
MousePos ,
Delay
Call isMouseOrange
If = 0
SetConst boxMaxY =
SetConst scanSuccess = 1
Else
Compute y= +
End
End
Compute boxCenterX = Trunc(( + ) / 2)
Compute boxCenterY = Trunc(( + ) / 2)
SetConst lureInitLocX =
SetConst lureInitLocY =
End
Procedure GetRGBValue
SetConst = 0
Compute y =
Compute i = + Trunc( ( - ) / 3 )
While <=
Compute x =
While <=
LoadRGB ,
Compute curTotal = {RGBRed} + {RGBGreen} + {RGBBlue}
If >
Compute brightTotal =
SetConst brightR = {RGBRed}
SetConst brightG = {RGBGreen}
SetConst brightB = {RGBBlue}
Compute brightRMin = -
Compute brightRMax = +
Compute brightGMin = -
Compute brightGMax = +
Compute brightBMin = -
Compute brightBMax = +
SetConst brightX =
SetConst brightY =
End
Compute x= + 2
End
Compute y= + 2
End
End
Procedure WaitForSplash
SetConst = 0
Call isMouseOrange
While = 0 AND = 1
Delay 100
// Check current spot
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check top left
Compute x=-
Compute y=-
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check top right
Compute x=+
Compute y=-
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check bottom left
Compute x=-
Compute y=+
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check bottom right
Compute x=+
Compute y=+
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check top left (extended)
Compute x=-(*2)
Compute y=-(*2)
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check top right (extended)
Compute x=+(*2)
Compute y=-(*2)
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check bottom left (extended)
Compute x=-(*2)
Compute y=+(*2)
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
// Check bottom right (extended)
Compute x=+(*2)
Compute y=+(*2)
LoadRGB ,
If {RGBRed} > OR {RGBRed} < OR {RGBGreen} > OR {RGBGreen} < OR {RGBBlue} > OR {RGBBlue} <
SetConst splashed = 1
RightClick Shift
Delay 500
End
End
End
End
End
End
End
End
End
Call isMouseOrange
End
End
Procedure isMouseOrange
SetConst = 0
// Get the mouse color
Compute mouseX= {MouseX} + 4
Compute mouseY= {MouseY} + 4
LoadRGB ,
// If the mouse is orange (variance added just for good measure..)
If {RGBRed} >= 210 AND {RGBRed} <= 218 AND {RGBGreen} >= 160 AND {RGBGreen} <= 168 AND {RGBBlue} >= 84 AND {RGBBlue} <= 92
SetConst = 1
End
End