Mortal Online fishing Macro

Ask gaming related questions (AHK v1.1 and older)
Donmaj
Posts: 5
Joined: 18 Dec 2015, 08:58

Mortal Online fishing Macro

18 Dec 2015, 09:34

Hello,
I just learned the AHK today reading posts and tutorials, And I made an Macro to catch some fishes. I want it to look for an Image inside a image, while the light might be changing. Idea is:
There are two differrent actions - splashes on the water. 1. is tug, not important, 2. is pull very important. After a pull i wish it to click once to catch fish. Then wait few seconds - I wish it to variable. And then pull the line with the fish for about 10-15 seconds(variable). I want it to be quite variable in the meaning of sleep times - it would be not found by the server as a macro. So far I made it a quite working, but I get some issues - sometimes its not detecting/pulling fish even if it caught one. Could someone check my code and tell me If I made it correctly? The picture that is used is
i67.tinypic.com*23sbx48.png

Code: Select all

global pull_x
global pull_y


ToolTip, Throw Fishing rod keeping it for 3 seconds, move cursor over floater, press F5, 20, 20,


insert::


Loop,
{
    ImageSearch, OutputVarX, OutputVarY, pull_x-200, pull_y-200, pull_x+200, pull_y+200, *70 pull.png
	If(ErrorLevel == 0){
	tooltip, Got a fish!`, 20, 20,
	Click,
	sleep 2000
	Click down,
	tooltip, Pulling!, 20, 20,
	sleep 6000
	tooltip, She is tough!, 20, 20,
	Click up,
	tooltip, Got Her!, 20, 20,
	sleep 2000
	Click down,
	ToolTip, Throwing bait!, 20, 20,
	sleep 3000
	click up,
	return,
	}If(ErrorLevel == 1){
	tooltip, Fishing`, 20, 20,
	sleep 100
	}If(ErrorLevel == 2){
	ToolTip, Error!`, 20, 20,
	Sleep 2000
	}
}
Return


BS::
exitapp
 
 
F5::
ToolTip
ToolTip, Make sure your rod is out and you are not touching mouse, and the cursor is hidden`, Press Insert to start, 20, 20,
TrayTip,,  Make sure your rod is out and you are not touching mouse, and the cursor is hidden`, Press Insert to start, 20, 20,
MouseGetPos, pull_x, pull_y
Return
Thanks Everyone and God bless the Authors of AHK!!!
Donmaj
Posts: 5
Joined: 18 Dec 2015, 08:58

Re: Mortal Online fishing Macro

18 Dec 2015, 12:19

Found the problematic part and fixed it. Any idea how to make it smoother? its not too fast
Dorko

Re: Mortal Online fishing Macro

24 May 2017, 05:49

Did you ever get this working?

Would be interested in your pull image you used?

Dorko
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Mortal Online fishing Macro

24 May 2017, 14:04

I think the only bit that could be optimized would be the image search, as I am guessing that all the sleeps are needed at their current values.

ImageSearch is very "expensive" from a CPU point of view. Could this possibly be done with a simpler pixel color check? Could you maybe use a smaller image? (Only a bit of the required image), can you maybe search a smaller area?

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 109 guests