Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

A little fishing script....


  • Please log in to reply
66 replies to this topic
Mike the Fishmonger
  • Guests
  • Last active:
  • Joined: --
Hello all.
You may have heard about me when I first started posting in the OPIE fishing bot script thread here: http://www.autohotke...707.html#431707

My intent wasn't to hijack the thread, so after a long break from WoW I decided to start some fishing / botting again and figured I'd post up my progress.

I've gone through a bunch of changes in my script, most of which were unintended [lol] but for the most part I have something that is pretty stable and works well.... under the right conditions.

So below, you will see a copy of my main script and definitions for most things are [hopefully] well noted.

Please - if you have any questions post below.

NOTES:
The main problems people have when trying to use this are:
1. The pixelsearch color '0xFAE6E6' is incorrect for your computer. I don't know why it makes a difference, but sometimes you have to edit this if it is not moving the mouse to the fishing bobber location.

2. The program keeps exiting about 5-10 seconds after launch. This is because it thinks you are dead. You can verify this by 'blanking' out with semicolons, the Alive subroutine, and the call for the subroutine. If that fixes it, you need to adjust the color '0x00C600' to match your healthbar. Sometimes a simple tweak does the trick.

Anyway, if I can figure out how to upload a video of this in action to a place that conceals my identity, I will try.

Good Luck!
-Mike the Fishmonger. Level 85 Warlock

; Auto fishing script by Mike the Fishmonger
; 01/14/12
; The script works when you first set up your character in a certain way. I'm sure this can be tweaked to better work on a wider variety of computers at some point.
; Make sure the warcraft video option is set to 'windowed' and not full screen
; Make sure your desktop screen resolution is [u]at least 1920X1080[/u]
; Make sure your character is in a place with wide open fishing, like an ocean
; Make sure the camera is zoomed all the way into the first person view
; Make sure the fishing horizon is centered on the X axis, so the bottom half of the screen is water and the top half of the screen is sky
; Make sure your fishing pole is equipped, AND bound to the '1' key.
; If you have a weather beaten fishing hat, put it on! It will auto apply your lure

; the 'Header' of the script
;This defines the key press delay [I wouldn't suggest making it quicker - slow and steady wins the race!]
SetKeyDelay, 60

; Activates the WoW window
WinActivate, World of Warcraft

; Resets the size and position of the window
Winmove,World of Warcraft,,0,0,1820, 1051

; Waits a bit
Sleep, 1500

; Sets up a do not disturb message incase people whisper you. Feel free to change to make it unique to your character
send, /dnd Hello - I am really really concentrating right now, I will get back to you when I'm not so busy... thanks!

; Waits a bit.. again.. I'm not gonna explain the 'sleeps' anymore lol
sleep, 100
send, {enter}
sleep, 500


;this initial loop will use the "weather beaten fishing hat every 10 minutes to reapply the buff. You can change it to use a different type of fishing lure / buff if you want.
loop,75
{
send , /use 1
send {enter}
sleep, 6000

; This loop activates the WoW window, casts your fishing rod [send, 1] and goes to the fishing subroutine
loop, 50
{
WinActivate, World of Warcraft
send, 1
sleep, 2000
gosub fish
sleep, 2000
}
}
exitapp

; The main fishing subroutine. This does a search of pixels in a certain 'hit box' in front of your character and looks for the color of the top of the fishing lure. The color may need to be adjusted to suit your particular fishing location. You can use AutoItWindowSpy to look for the color of your fishing lure if you need to change it. Just cast your lure, take a screen shot, paste it in 'paint' program, zoom in like 8X, then AutoItWindowSpy to get the exact color on the lure you want to search for. I choose a bright bright white spot and it seems to work good.

; After pixel searching, it will move the mouse to the location of the color found in pixelsearch

; It will then wait 8 seconds [the time when the second fish would 'bite' and clicks your right mouse button. I chose 8 seconds since it seems like the middle fish was the one most prominent.
fish:
gosub alive
PixelSearch, Px, Py, 514, 474, 1315, 820, 0xFAE6E6, 60, fast
Mousemove, %Px%,%Py%,50
sleep, 8000
mouseclick, right
return

; This subroutine will check to see if you are alive. LOL. I had trouble with people ganking me while I was fishing all night. This does a search of your healthbar to check the color at location 202,78. It should be green. If you have tidyplates or something like that it will probably interefere. If you are alive [and it sees green] it keeps fishing. If you are dead [no green] it exits the app.
alive:
Pixelgetcolor, color, 202,78
;msgbox, %color%
if  color <> 0x00C600
{
exitapp
}
return


Retro Gamer
  • Members
  • 24 posts
  • Last active: Aug 25 2018 12:28 AM
  • Joined: 15 Feb 2011
..I was on the forums looking for something unrelated and saw this post. Nice script. Wish I still played wow so I could try this out. :) I have some project ideas in my head for the future that might watch certain parts of the screen for color change or movement. Hopefully I can look at your script to help me in some way to learn from. I love the "are you alive" subroutine, pretty simple and smart! 8)

WoW Player
  • Guests
  • Last active:
  • Joined: --
Thanks so much for sharing this script. It's a great help and very easy to customize.

Mike the Fishmonger
  • Guests
  • Last active:
  • Joined: --
Thanks for the feedback.

I've had this other little project on the works if anyone wants to putz with it and improve it:
fish:
PixelSearch, Px, Py, 343, 359,  642, 445, 0xFAE6E6, 60, fast 
sleep, 200 
PixelSearch, Px1, Py1, 343, 359,  642, 445, 0xFAE6E6, 60, fast
A := Py1-Py+100 
B := B+1 
if B > 70
{
sleep, 1000
return
}
else if A<103 
{
gosub fish
This fishing subroutine 'looks' at the position of the bobber and records the location in Px and Py.
It waits .2 seconds, and then 'looks' again [putting the data in Px1 and Py1]
A little math is involved to calculate the Y axis movement of the bobber.
If the bobber moves up and down past a certain amount [like you caught a fish] it hooks it.
If the Y axis movement is not great enough, it continues to check.

I've had mixed results with this. Sometimes it works great, other times it causes my screen to jerk to the right or down which screws up the rest of the script. If this can be perfected, it would EASILY guarantee a perfect catch, every time.

Thanks, and happy fishing! Also, spread the word about this. The more the merrier! Thanks!
Good Luck!
-Mike the Fishmonger. Level 85 Warlock

cheatingsonofa...
  • Guests
  • Last active:
  • Joined: --
Cannot get this to work at all. I mean it never finds the bobber even if i change the colors to look at. If i manually put mouse over a bobber it never clicks it and so on.

http://www.autohotke...c50640-285.html Your preverious version (OPIE) partially works but its still far for ready to use for me (i wrote my problem at the link).

Any idea what to do? What am i doing wrong? Thanks for any help.

Mike The Fishmonger
  • Guests
  • Last active:
  • Joined: --
Sounds like it is not finding the correct color in your health bar. Try running the script while disabling the 'alive' subroutine. Ive cut it out in the code below:
; Auto fishing script by Mike the Fishmonger
; 01/14/12
; Without search for Health Bar

SetKeyDelay, 60
WinActivate, World of Warcraft
Winmove,World of Warcraft,,0,0,1820, 1051
Sleep, 1500
send, /dnd Hello - I am really really concentrating right now, I will get back to you when I'm not so busy... thanks!
sleep, 100
send, {enter}
sleep, 500

loop,75
{
send , /use 1
send {enter}
sleep, 6000

loop, 50
{
WinActivate, World of Warcraft
send, 1
sleep, 2000
gosub fish
sleep, 2000
}
}
exitapp

fish:
PixelSearch, Px, Py, 514, 474, 1315, 820, 0xFAE6E6, 60, fast
Mousemove, %Px%,%Py%,50
sleep, 8000
mouseclick, right
return


Mike The Fishmonger
  • Guests
  • Last active:
  • Joined: --
It came to my attention that many of you are probably running your screens at lower resolutions and my default of 1920*1080 is too large for you.
Well, I revised the code and made the healthbar scan and hitbox work for a 1024*768 resolution. Any smaller than that and it really has trouble finding the bobber. Try it out below:

In addition, I made it search for your health bar color prior to engaging in the loop so it adapts to your specific screen. Dunno why I didn't think of this before...

SetKeyDelay, 70
WinActivate, World of Warcraft
Winmove,World of Warcraft,,0,0,1024,605
Sleep, 3000
WinActivate, World of Warcraft
sleep, 500
send, /dnd herroooo im fishing!
sleep, 100
send, {enter}
sleep, 500
Pixelgetcolor, color, 133,67
color1 = %color%

loop,75
{
send , /use 1
send {enter}
sleep, 6000
loop, 50
{
WinActivate, World of Warcraft
send, 1
sleep, 2000
gosub fish
sleep, 2000
}
}
exitapp

fish:
gosub alive
PixelSearch, Px, Py, 371, 325, 670, 418, 0xFAE6E6, 60, fast
Mousemove, %Px%,%Py%,50
sleep, 8000
mouseclick, right
return

alive:
Pixelgetcolor, color, 133,67
if  color <> %color1%
{
exitapp
}
return


cheatingsonofa...
  • Guests
  • Last active:
  • Joined: --
Yeah i tryed to /* */ alive function even before posting. I tested your edited script but still no luck at finding the bobber at 1021*768 (also tryed to disable window resize function). Tryed with low and good detail of water.

  • Guests
  • Last active:
  • Joined: --

Thanks for the feedback.

I've had this other little project on the works if anyone wants to putz with it and improve it:

fish:
PixelSearch, Px, Py, 343, 359,  642, 445, 0xFAE6E6, 60, fast 
sleep, 200 
PixelSearch, Px1, Py1, 343, 359,  642, 445, 0xFAE6E6, 60, fast
A := Py1-Py+100 
B := B+1 
if B > 70
{
sleep, 1000
return
}
else if A<103 
{
gosub fish
This fishing subroutine 'looks' at the position of the bobber and records the location in Px and Py.
It waits .2 seconds, and then 'looks' again [putting the data in Px1 and Py1]
A little math is involved to calculate the Y axis movement of the bobber.
If the bobber moves up and down past a certain amount [like you caught a fish] it hooks it.
If the Y axis movement is not great enough, it continues to check.

I've had mixed results with this. Sometimes it works great, other times it causes my screen to jerk to the right or down which screws up the rest of the script. If this can be perfected, it would EASILY guarantee a perfect catch, every time.

Thanks, and happy fishing! Also, spread the word about this. The more the merrier! Thanks!
Good Luck!
-Mike the Fishmonger. Level 85 Warlock




i cant see how this would work
for one thing you have no mouse move so the cursor will not move to the bobler

and for another

you have no mouseclick, right
so even if it did move to the bobbler you wont click to catch the fish


no way you had any results with this all it it can to is look for the bobbler !!!

Mike the Fishmonger
  • Guests
  • Last active:
  • Joined: --

i cant see how this would work

It works.
This is only a small snippit of the code to give people an idea of how my other project would look for the bobber movement.
Sorry if that was confusing... here is the whole section below.
PixelSearch, Px, Py,514, 474, 1315, 820, 0xFAE6E6, 60, fast 
sleep, 200 
PixelSearch, Px1, Py1, 514, 474, 1315, 820, 0xFAE6E6, 60, fast
A := Py1-Py+100 
B := B+1 
if B > 70 
{
sleep, 1000
gosub start
}
else if A<103 
{
gosub fish
}
else 
sleep, 500
Mousemove, %Px1%,%Py1%,0
sleep, 1000
mouseclick, right
sleep, 4000
gosub, start


  • Guests
  • Last active:
  • Joined: --
hmm i see
gosub, start
but no label for it. Your code is incomplete.

Mike the Fishmonger
  • Guests
  • Last active:
  • Joined: --
I said it was the whole section of code, not the whole code itself.
Please don't try and convince me that my code does not work. Ive caught thousands and thousands of fish with this and had this running day and night until my bags were full on multiple occasions.
Instead of trying to point out my 'fallacies' you should redirect your time into getting this to work for you so you can reap the rewards?
:)
-Mike the Fishmonger

Constructive comments are most welcome

  • Guests
  • Last active:
  • Joined: --
I tried to fix it for few hours but nothing worked. Maybe your script work maybe not thats not for me to say. Just saying that not everybody is that skilled as you are in ahk language to be able to do it himself.

I also tried to write one by myself but as i said above i am not that good probably... Or maybe it is becasue of my poor english.

Anyway your script is incomplete so this is why most of the users will tell you that its bugged or so. I think that anybody with the skill to fix that code can also write that code by himself in few minutes/hours so its useless to post just parts of it.

Mike the Fishmonger
  • Guests
  • Last active:
  • Joined: --
I only posted a small portion of it because anyone who read through the original post of the script would know I was just updating and posting a section of it, and they would know where to insert/overwrite that section.
Maybe a dash of common logic too, perhaps?

Mr. Guest.. have you tried the simple version I posted on Wed Feb 22, 2012 1:41 AM? [A couple posts above this one] What was your outcome with that?

Id be willing to bet that most people who tried this have had at least partial success. One small thing I found out last night.. This seems to have better luck finding the bobber when your water detail in the graphics options is set to low.

This is what I'm using now.. and it works flawlessly on my system:
SetKeyDelay, 70
WinActivate, World of Warcraft
Winmove,World of Warcraft,,0,0,1820, 1051
Sleep, 3000
WinActivate, World of Warcraft
sleep, 500
send, /dnd busy fishing!
sleep, 100
send, {enter}
sleep, 500

loop,75
{
send , /use 1
send {enter}
sleep, 6000
loop, 50
{
WinActivate, World of Warcraft
send, 1
sleep, 2000
gosub fish
sleep, 2000
}
}
exitapp

fish:
gosub alive
PixelSearch, Px, Py, 514, 474, 1315, 820, 0xFAE6E6, 60, fast
Mousemove, %Px%,%Py%,50
sleep, 8000
mouseclick, right
return

alive:
Pixelgetcolor, color, 202,78
if  color <> 0x00C700
{
exitapp
}
return

The only things you SHOULD have to edit are the PixelSearch color [currently 0xFAE6E6] for the bobber and the Pixelgetcolor [0x00C700] of the healthbar.

  • Guests
  • Last active:
  • Joined: --
I did but all i get was window resize some ransom stuff like opening a map jumping or so (which was caused by / command i think). It didnt move a mouse it didnt click or anything else.

When i edited the script there was almost no change. Tryed at 1024*768, 800*600 and so on. Water detail at low -> ultra.

I also edited the colours (not sure if to the right colors).

Posted Image
This is the bobber map. Where exactly is situated your color? I did colorcode some of them. Also i dont use any UI mods, just original blizzard ui.