World of Warcraft Gold

WoW Gold Guides

Feed on
Posts
Comments

August 13, 2007

Fishing Bot (World of Warcraft hunters)

Features
- Bobber scanning has test results of 95%+ accuracy with great speed
- Fish scanning has test results of 70%+ accuracy
- Easy-to-change constants for tweaking
- Supports any resolution (yes, even non-standard ones like really stretched out)
- Supports CosmosUI
- Dynamic RGB color finding (works in practically any light)
- AFK-Away

Use
1. Copy/Paste the code below into AC Tool (found at http://www.actool.net
2. Run WoW in Windowed Mode
3. Put fishing skill in slot '0'
5. Under Video Options (press Escape to bring up main menu), UNCHECK 'Hardware Cursor'
6. Zoom into 1st person mode
7. Review constants in script, particularly 'runCount' to set how many times the script should run
8. Run the macro

Notes
- For best results, try turning all fancy graphics options off (especially 'Terrain Highlights' under Shaders.. takes all the brightness out of the water) and use a low resolution (perhaps under 800×600, the smaller the faster)
- If you are having problems finding the bobber, where the mouse simply goes over the bobber and never stops, or goes a little bit past the bobber before stopping, try increasing the 'scanSpeed' constant. Do this only after turning off all fancy graphics and decreasing resolution
- Please please please fish AWAY FROM CIVILIZATION. We need as little publicity as possible, thankyouverymuch.
- Try to find a spot where you are level with the water. Run the script once or twice and note the highest line where the script scans for the bobber. Then throw 15 or so casts manually and note where the highest cast goes. Try to match those two lines up, you will get much faster results.
- If the bobber is landing outside of the scan area, adject the scan area percentage constants in the macro to include the areas where the bobber lands.
- You can turn off AFK Away if you want to chat while fishing

Future
- The fish scanner isnt the best right now, will definitely need tweaking. I'll try to get that working better in a future update.
- An inventory management system to automatically open up containers such as clams, bottles, chests, etc.
- An option to quit fishing after a set amount of time
- An option to turn on random timings between casts/clicking of the fish/etc

The Bot


CODE

// 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 = 10

// 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 $runCount
Keys 0
Delay 1000
Call FindLureInitial
Call FindBoxCenter

Compute x = $boxMaxX-10
MousePos $x, $boxCenterY
Delay $scanSpeed

Call GetRGBValue
Call WaitForSplash

If $afkAway = 1
Delay 2500
KeyDown {RETURN} 250
KeyDown {RETURN} 250
Delay 2000
Else
Delay 5000
End

End


////////////////
// Procedures //
////////////////

Procedure CalculateScanBoxConstants


Compute scanTop = {WindowTop} + Trunc( {WindowHeight} * $scanTopDist )
Compute scanBottom = ( {WindowTop} + {WindowHeight} ) - Trunc( {WindowHeight} * $scanBottomDist )
Compute scanLeft = {WindowLeft} + Trunc( {WindowWidth} * $scanLeftDist )
Compute scanRight = ( {WindowLeft} + {WindowWidth} ) - Trunc( {WindowWidth} * $scanRightDist )

Compute boxAvgWidth = Trunc( {WindowWidth} * $widthToWindowRatio )
Compute boxAvgHeight = Trunc( {WindowHeight} * $heightToWindowRatio )

Compute scanStepX = $boxAvgWidth
Compute scanStepY = Trunc( $boxAvgHeight / 2 )

End

Procedure FindLureInitial
SetConst scanSuccess = 0
Compute y = $scanTop

While $y <= $scanBottom AND $scanSuccess = 0

Compute i = {LoopNo} MOD 2

If $i = 0
Timestamp In Even
Compute x = $scanLeft
Else
Timestamp In Odd
Compute x = $scanLeft + Trunc( $boxAvgWidth / 2 )
End

While $x <= $scanRight AND $scanSuccess = 0
// Move the mouse and wait a second (wait is required!)
MousePos $x, $y
Delay $scanSpeed

Call isMouseOrange

// If the mouse is orange
If $isMouseOrange = 1
SetConst lureInitLocX = $x
SetConst lureInitLocY = $y
SetConst scanSuccess = 1
End

Compute x=$x + $scanStepX
End

Compute y=$y + $scanStepY
End

End

Procedure FindBoxCenter

// Find X min
SetConst scanSuccess = 0
Compute x = $lureInitLocX
Compute y = $lureInitLocY
While $scanSuccess = 0

// Move the mouse and wait a second (wait is required!)
MousePos $x, $y
Delay $scanSpeed

Call isMouseOrange

If $isMouseOrange = 0
SetConst boxMinX = $x
SetConst scanSuccess = 1
Else
Compute x= $x - $boxScanStep
End
End

// Find X max
SetConst scanSuccess = 0
Compute x = $lureInitLocX
Compute y = $lureInitLocY
While $scanSuccess = 0

// Move the mouse and wait a second (wait is required!)
MousePos $x, $y
Delay $scanSpeed

Call isMouseOrange

If $isMouseOrange = 0
SetConst boxMaxX = $x
SetConst scanSuccess = 1
Else
Compute x= $x + $boxScanStep
End
End

// Find Y min
SetConst scanSuccess = 0
Compute x = $lureInitLocX
Compute y = $lureInitLocY
While $scanSuccess = 0

// Move the mouse and wait a second (wait is required!)
MousePos $x, $y
Delay $scanSpeed

Call isMouseOrange

If $isMouseOrange = 0
SetConst boxMinY = $y
SetConst scanSuccess = 1
Else
Compute y= $y - $boxScanStep
End
End

// Find Y max
SetConst scanSuccess = 0
Compute x = $lureInitLocX
Compute y = $lureInitLocY
While $scanSuccess = 0

// Move the mouse and wait a second (wait is required!)
MousePos $x, $y
Delay $scanSpeed

Call isMouseOrange

If $isMouseOrange = 0
SetConst boxMaxY = $y
SetConst scanSuccess = 1
Else
Compute y= $y + $boxScanStep
End
End


Compute boxCenterX = Trunc(( $boxMinX + $boxMaxX ) / 2)
Compute boxCenterY = Trunc(( $boxMinY + $boxMaxY ) / 2)

SetConst lureInitLocX = $boxCenterX
SetConst lureInitLocY = $boxCenterY

End

Procedure GetRGBValue

SetConst $brightTotal = 0

Compute y = $boxCenterY
Compute i = $boxCenterY + Trunc( ($boxMaxY - $boxCenterY) / 3 )

While $y <= $i

Compute x = $boxMinX
While $x <= $boxCenterX

LoadRGB $x, $y
Compute curTotal = {RGBRed} + {RGBGreen} + {RGBBlue}

If $curTotal > $brightTotal
Compute brightTotal = $curTotal

SetConst brightR = {RGBRed}
SetConst brightG = {RGBGreen}
SetConst brightB = {RGBBlue}

Compute brightRMin = $brightR - $brightRangeDown
Compute brightRMax = $brightR + $brightRangeUp
Compute brightGMin = $brightG - $brightRangeDown
Compute brightGMax = $brightG + $brightRangeUp
Compute brightBMin = $brightB - $brightRangeDown
Compute brightBMax = $brightB + $brightRangeUp

SetConst brightX = $x
SetConst brightY = $y
End

Compute x=$x + 2
End

Compute y=$y + 2
End

End

Procedure WaitForSplash

SetConst $splashed = 0

Call isMouseOrange

While $splashed = 0 AND $isMouseOrange = 1
Delay 100

// Check current spot
LoadRGB $brightX, $brightY
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check top left
Compute x=$brightX-$brightDist
Compute y=$brightY-$brightDist
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check top right
Compute x=$brightX+$brightDist
Compute y=$brightY-$brightDist
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check bottom left
Compute x=$brightX-$brightDist
Compute y=$brightY+$brightDist
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check bottom right
Compute x=$brightX+$brightDist
Compute y=$brightY+$brightDist
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check top left (extended)
Compute x=$brightX-($brightDist*2)
Compute y=$brightY-($brightDist*2)
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check top right (extended)
Compute x=$brightX+($brightDist*2)
Compute y=$brightY-($brightDist*2)
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check bottom left (extended)
Compute x=$brightX-($brightDist*2)
Compute y=$brightY+($brightDist*2)
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

// Check bottom right (extended)
Compute x=$brightX+($brightDist*2)
Compute y=$brightY+($brightDist*2)
LoadRGB $x, $y
If {RGBRed} > $brightRMax OR {RGBRed} < $brightRMin OR {RGBGreen} > $brightGMax OR {RGBGreen} < $brightGMin OR {RGBBlue} > $brightBMax OR {RGBBlue} < $brightBMin

SetConst splashed = 1
RightClick Shift
Delay 500

End
End
End
End
End
End
End
End
End

Call isMouseOrange

End
End

Procedure isMouseOrange
SetConst $isMouseOrange = 0

// Get the mouse color
Compute mouseX= {MouseX} + 4
Compute mouseY= {MouseY} + 4
LoadRGB $mouseX, $mouseY

// 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 $isMouseOrange = 1
End
End




tweaks that have worked

used East Menethil after tweaking the stuff

my Tweaks:
/////////////////////////
// CHANGABLE CONSTANTS //
/////////////////////////

// Run count
// How many times the script should try to fish
runCount = 10000

// 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 = 65

// 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 = .25
scanRightDist = .25
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 = 45
brightRangeUp = 9

// 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 = 1 Ready for the next level? We recommend The MMORPG Exchange for your WoW gold needs. MMORPG-Exchange has supplied us for years and has great customer service and 24/7 instant delivery. Check them out! World of Warcraft gold delivered instantly!

Filed under World of Warcraft Gold by admin

Permalink Print Comment

Comments on Fishing Bot (World of Warcraft hunters) »

August 24, 2007

Sator @ 7:09 pm

Does anyone have an idea how to work a bobber into this macro? Would love to work 1 in somehow, but my expertise does not alow it. So if there are any ACtool wizzes still working on this try it:)

August 29, 2007

KOA2 @ 4:07 am

I changed the code a little to add a bobber. It isn't the best way to do it but heres what I did:

change the main program loop to include a new variable "bobberCount". I set this manually to how many bobbers I have. The variable "runCount" then becomes how many casts per bobber. I am still trying numbers but 80 is safe. Here is the new main loop:

Loop $bobberCount
Keys -
Keys 1
Delay 5500

Loop $runCount
Keys 0
Delay 1000
Call FindLureInitial
Call FindBoxCenter

Compute x = $boxMaxX-10
MousePos $x, $boxCenterY
Delay $scanSpeed

Call GetRGBValue
Call WaitForSplash

If $afkAway = 1
Delay 2500
KeyDown {RETURN} 250
KeyDown {RETURN} 250
Delay 2000
Else
Delay 5000
End

End

End

notice that this requires your bobber to be in the "-" slot and your pole in the "1" slot. you can change this easily to be any of the quick cast slots.

September 11, 2007

Paul @ 1:09 pm

i dont understand how to incorporate this bobber part into the regular macro. i get the error "could not find the variable bobbercount" on line 136 is what its referring to. what am i missing?

September 19, 2007

JP @ 1:14 pm

Is this supposed to autoloot the fish, cause it isnt, am i missing something?

JP @ 2:29 pm

ok got it figured out, you have to turn off the in-game auto loot, alos is there a wat to speed up the x and y scan once it has found the bobber?

September 25, 2007

C.J. @ 1:28 am

hi, i need help.
the macro doesnt loot the fish. i tried some actions but nothing happend. i think the macro doesnt detect the splash. Why? Somebody can help me?

October 13, 2007

JW @ 8:09 am

I'm Having the same problem, can any1 help?

November 9, 2007

Lee @ 5:42 am

im getting an error after i press start that says

Error:Procedure CalculateScanBoxConstants could not be found!
Module:new.mac Line: 137

What am i doing wrong

November 13, 2007

MS @ 6:25 pm

my cursor keeps resetting to a position in the middle of the screen after it finds the clickable object but before it splashes. can i fix this?

November 28, 2007

blah @ 4:08 pm

TURN OFF AUTO LOOT!!!!

December 18, 2007

KOA2 @ 10:19 pm

if you get the loot box then its working you just need to turn off autoloot in the warcraft options menu. if you dont get the loot box then its not finding the bobber and you probably didnt read the directions, you just hit play and wanted it to work.

on a seperate note, anyone want to tell me how to make a timer that counts while the code is running? such as cast this spell and start a timer for 30 secs (cooldown). after 30 secs set a variable. something like that?

December 28, 2007

mike @ 12:16 am

!!help!!
Im getting a error please tell me why!

Error: Macro Line: Compute scantop = {Windowtop} + Trunc( {WindowHeight} *$scanTopDist)

Caused Error: Acces Violation at address 004054c2 in module 'ACTool.exe'. Read of address 00000010

module: fish.mac Line: 171

-Please help!-

January 1, 2008

Lak @ 11:10 pm

Got everything to work, it runs, issue I am running across, is it keeps telling me i cant do that while moving… any idea what could be causing this?

January 9, 2008

joe @ 2:24 am

It runs fine for me and all but the splash isnt detected and i got all the stuff on low, hardware cursor unchecked and auto loot off…. it finds the bobber but when it splashes it doesnt click it…. whats up with that? how do i fix?

January 27, 2008

dre @ 3:53 pm

every thing is working find for me, the problem is i always get "no fish are hooked"

any idea how to fix this?

February 8, 2008

heh @ 8:26 pm

So what happens for me…is I run the program…then it glitches…and does nothing I get errors like Invalid color

February 9, 2008

psy @ 1:40 am

Hi i have problem with this macro

Errod: Cloud not find constans brightY
Module:fishing.mac line: 364

pls help me

ty a lot

March 1, 2008

nick @ 1:03 pm

It works fine for me but it doesnt cast fishing and I putted my fishing skill everywere it just doesnt cat

April 9, 2008

Stew @ 10:56 am

WORKS PERFECT……No problems what so ever

Thanks so much

April 13, 2008

Sean @ 8:49 am

Awesome Macro….just wanted to add a few things for the masses. First..Read the code. The directions for each setting are in the code. Second Turn off autoloot. Third , make sure you keybindings are set. It will not cast if it is not in an action bar bound to the "zero" key (bobbers to the "-" key. and lastly, this is very picky, if you are looking to just hit run and walk away it's not gonna happen. You need to monitor it and tweak the settings as conditions and locations change for example, when it gets dark out, when it starts raining. I leveled my fishing from 8 to 336 in one day but it took alot of tweaking as i changed locations. Overall..this is a kick ass macro. Keep up the good work.

April 27, 2008

Nameless 101 @ 10:06 am

Is there anyoway you can make this macro add a lure on your fishing pole if you dont have one on and then cast the pole?

May 3, 2008

Billy @ 10:23 am

I have tried everything to get this macro to work. It does the scan and just goes right over the bobber with out stopping at all. I have changed variables non-stop. Trying a lot of things trying to get it to work, and still nothing. Anyone give me a hand?

June 6, 2008

Lustful @ 4:21 pm

If some1 could email me a copy of the macro they use it would be greatly appreciated!
ddougolus@aol.com

June 7, 2008

Tina @ 1:19 am

Billy, did you make sure to read all of the notes?

"For best results, try turning all fancy graphics options off (especially 'Terrain Highlights' under Shaders.. takes all the brightness out of the water) and use a low resolution (perhaps under 800×600, the smaller the faster)"

Plus it always depends on the area.. other than that, I'm afraid I can't help you. :( GL

July 1, 2008

Bob xD @ 8:22 am

It worked fine once.. but thn it stopped.. it automatically starts fishing and finds the it but doesnt click when i have a bite =/ anybody have any suggestions?

July 18, 2008

Josh @ 4:03 am

I can get it to find the lure, iv tried it everywhere from SW to the green goo in ferals, can anyone help?

Leave a Comment

- Why ask? This confirms you are a human user!