fish.mac Fishing with the Fisherman's Companion.

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

fish.mac Fishing with the Fisherman's Companion.

Post by grimjack » Sun May 25, 2003 5:13 am

Here is what I have thrown togather for fishing. I play a rogue so it has a few things like /sneak and /hide that you may want to disable.
It will use the fisherman's companion to summon a new pole if yours breaks. It will also camp you out if you run out of bait. If you do have a fisherman's companion you will need to put it in an inventory slot and make it hotkey number 0(10th slot).

Thanks
GrimJack

Code: Select all

| - Fish.mac - 
| Updated fishing macro.
| Mainly for people who have a fisherman's companion.
| Put your fisherman's companion in an inventory slot and hotkey
| it to your 10th hotkey slot.
| This macro will fish until out of bait, summoning poles when you 
| need a new one.  Once out of bait it will sit you down and camp you out.
| be sure to edit the array so that it destroy's only what you don't want
| to keep.  If you add or remove entries update the /varset DestArraySize.
|
| Also if you are not a rogue you may want to disable the
| /doability "Sneak"
| /doability "Hide"
| section at the begining of the script and in the #event subs.

#event PrimaryHand "You need to put your fishing pole in your primary hand." 
#event OutOfBait "You can't fish without fishing bait, go buy some." 
#event NeedPole "You can't fish without a fishing pole, go buy one." 
#define DestArraySize v40
#define LoopCount v41
Sub Main 
   /cleanup 
   /varset a(1,0) "Tattered Cloth Sandal"
   /varset a(1,1) "Rusty Dagger"
   /varset a(1,2) "Fish Scales"
   /varset a(1,3) "Dragon Bay"
   /varset a(1,4) "Fresh Fish"
   /varset DestArraySize 5
   /varset LoopCount 0
   /doability "Sneak"
   /doability "Hide"

   :Fish 
   /if "$cursor()"!="NULL" /call ItemSub
   /if n $char(ability,"Fishing")>0 {
      /delay 1s
      /if "$cursor()"=="NULL" {
         /doability Fishing 
      }
   } 
   /doevents 
   /if "$cursor()"!="NULL" /call ItemSub
   /goto :Fish 
/return 

Sub ItemSub
   :itemchecker
   /if "$cursor(name)"~~"$a(1,$LoopCount)" {
      /click left destroy
      /delay 1s
   }
   /varadd LoopCount 1
   /if "$cursor()"!="NULL" {
      /if n $LoopCount<$DestArraySize /goto :itemchecker
   }
   /if "$cursor()"!="NULL" {
      /click left auto
      /delay 1s
   }
   /varset LoopCount 0
/return

Sub Event_NeedPole
   /press 0
   /delay 11s
   /click left auto
   :cursorloop
   /if "$cursor()"=="TRUE" {
      /click left auto
      /goto :cursorloop
   }
   /doability "Sneak"
   /doability "Hide"
/return 

Sub Event_PrimaryHand
   /press 0
   /delay 11s
   /click left auto
   /delay 1s
   :cursorloop
   /if "$cursor()"=="TRUE" {
      /click left auto
      /goto :cursorloop
   }
   /doability "Sneak"
   /doability "Hide"
/return 

Sub Event_OutOfBait 
   /sit off
   /sit
   /camp 
   /endmacro 
/return 

Hairy
orc pawn
orc pawn
Posts: 11
Joined: Tue May 13, 2003 5:33 pm

Two problems

Post by Hairy » Fri Jun 06, 2003 2:18 am

When I ran this everything seemed to work out fine except when I happened to catch a no-drop item and the macro wouldn't destroy it and just stopped in limbo until I dropped it manually into a bag or destroyed it. Also, when it summoned a new pole, it would try to drop this as well instead of re-equipping it, and being no-drop poles, it would hang until I manually re-equipped it.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Questions

Post by grimjack » Fri Jun 06, 2003 3:04 am

Does /click left auto work for you manualy? Does it work for you manualy when you have a no drop item on the cursor. Does /click left destroy work? Do you have fast destroy off or on. Do you have a slot left for the pole/fish. What slot is it?

Thanks
GrimJack

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Jun 06, 2003 8:34 am

I have a problem with my basic fishing macro hanging when it catches something I want to destroy. All I can figure is that MQ is moving on to the next line before it has a chance to identify the item on the cursor. Will rewrite with delays if I get time this weekend and see how that works.
MQ2: Think of it as Evolution in action.

Hairy
orc pawn
orc pawn
Posts: 11
Joined: Tue May 13, 2003 5:33 pm

re:grimjack

Post by Hairy » Sat Jun 07, 2003 3:33 am

Answer to all your questions was yes. I figured after it summoned a new pole that it would drop it back into the primary hand and i can go on fishing uninterupted but it doesn't do this and trys to drop the no-drop pole on the ground, which it cannot do of course, so i get into a loop and hang. Thanks for whatever help you can give man.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sat Jun 07, 2003 6:20 am

This is the one I use, the events need to be adjusted a bit though, I haven't bothered debugging it, but it doesn't end fishing when out of bait, as supposed.

Code: Select all

#event NoPole "You need to put your fishing pole in your primary hand." 
#event NoBait "You can't fish without fishing bait, go buy some." 
#event BrokePole "Your fishing pole broke!" 

#define LoopCount v1
#define ArraySize v2
#define MousePos v3
#define UseCamo v4
#define NoBait v5
#define DefKeep v6
#define BeExact v7
#define CompanionSlot v8

sub Main
	/varset a(1,0) "Branch of Planar Oak"
	/varset a(1,1) "Roots"
	/varset a(1,2) "#Egg"
	/varset a(1,3) "Nightmare Cichlid"
	/varset a(1,4) "Cobalt Cod"
	/varset a(1,5) "Dragon Bay Snapper"
	/varset a(1,6) "Morning Dew"
	/varset a(1,7) "Tuft of Dire Wolf Fur"
	/varset a(1,8) "Vallorian Discus"
	/varset ArraySize 9
	/varset DefKeep "TRUE"
	/varset NoBait "FALSE"
	/varset UseCamo "TRUE"
	/cleanup
	:Loop
		/call CheckCompanion
		/call DoFishing
		/call DoForage
		/goto :Loop
/return

sub DoFishing
	/if n $char(ability,fishing)>0 /if "$NoBait"!="TRUE" {
		/if "$equip(primary,name)"!="Brell's Fishin' Pole" /call SummonPole
		/if "$cursor()"!="NULL" {
			/call ItemSort
			/delay 1
		}
		/doability fishing
		/doevents
		/delay 1
		/if "$cursor()"!="NULL" {
			/call ItemSort
			/delay 1
		}
	}
/return

sub DoForage
	/if n $char(ability,"Forage")>0 {
		/if "$cursor()"!="NULL" {
			/call ItemSort
			/delay 1
		}
		/doability forage
		/if "$UseCamo"=="TRUE" /alt activate 80
		/delay 1
		/if "$cursor()"!="NULL" {
			/call ItemSort
			/delay 1
		}
	}
/return

sub ItemSort
	/varset MousePos "$mouse(X) $mouse(Y)"
	/delay 5
	/varset LoopCount 0
	:itemchecker
		/if "$a(1,$LoopCount)"~~"#" {
			/varset l0 "$right($calc($strlen("$a(1,$LoopCount)")-1),"$a(1,$LoopCount)")"
			/varset BeExact 0
		} else {
			/varset l0 "$a(1,$LoopCount)"
			/varset BeExact 1
		}

		/if n $BeExact==0 /if "$cursor(name)"~~"$l0" {
			/if "$DefKeep"=="TRUE" {
				/echo Keeping: << $cursor(name) >>
				/click left auto
			} else {
				/echo Destroying: << $cursor(name) >>
				/click left destroy
			}
			/delay 5
		} else /if n $BeExact==1 /if "$cursor(name)"=="$l0" {
			/if "$DefKeep"=="TRUE" {
				/echo Keeping: << $cursor(name) >>
				/click left auto
			} else {
				/echo Destroying: << $cursor(name) >>
				/click left destroy
			}
			/delay 5
		}
		/varadd LoopCount 1
		/if "$cursor()"!="NULL" {
			/if n $LoopCount<$ArraySize /goto :itemchecker
		}

		/if "$cursor()"!="NULL" {
			/if "$DefKeep"=="TRUE" {
				/echo Destroying: << $cursor(name) >>
				/click left destroy
			} else {
				/echo Keeping: << $cursor(name) >>
				/click left auto
			}
			/delay 5
		}
		/mouseto $MousePos
/return

sub CheckCompanion
	/varset CompanionSlot 0
	:Loop
		/if "$item(inv,$CompanionSlot,name)"!="Fisherman's Companion" {
			/if $CompanionSlot<7 {
				/varadd CompanionSlot 1
				/goto :Loop
			} else {
				/echo Make sure to place your Fisherman's Companion in one of the main inventory slots.
				/endmacro
			}
		}
/return

sub SummonPole
	/if "$cursor()"!="NULL" /call ItemSort
	/click right inv $CompanionSlot
	/delay 11s
	/if "$cursor()"!="NULL" /if "$cursor(name)"~~"Brell's Fishin' Pole" {
		/click left primary
		/delay 5
		/if "$cursor()"!="NULL" {
			/click left auto
			/delay 5
		}
	} else {
		/varset NoBait "TRUE"
	}
/return

Sub Event_NoPole 
	/call SummonPole
/return 

Sub Event_BrokePole 
	/call SummonPole
/return

Sub Event_NoBait
	/varset NoBait "TRUE"
/return

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: re:grimjack

Post by grimjack » Sat Jun 07, 2003 12:17 pm

Hairy wrote:Answer to all your questions was yes. I figured after it summoned a new pole that it would drop it back into the primary hand and i can go on fishing uninterupted but it doesn't do this and trys to drop the no-drop pole on the ground, which it cannot do of course, so i get into a loop and hang. Thanks for whatever help you can give man.
Sorry one last question. Do you have your inventory window open? After it summons a pople it does a /click left auto. I don't have it checking if the window is open though. Also you may want to up the delay's. My machine is fairly fast. Change all the /delay 5 to /delay 1s and see if this fixes your problem.

Thanks
GrimJack

Hairy
orc pawn
orc pawn
Posts: 11
Joined: Tue May 13, 2003 5:33 pm

Ughh...My fault man

Post by Hairy » Sat Jun 07, 2003 1:10 pm

I feel like an idiot. I thought everything looked fine in the macro and I just build my machine which is pretty fast and didn't think the delay would have been the cause, so I decided to just go download all the newest files from CVS and compiled them and now its working like a charm. Oh well, all my fault man, thanks again for your help and for this handy macro.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sat Jun 07, 2003 4:05 pm

The /cleanup opens your inventory.

It also equips directly into your primary instead of auto, in case you are holding something in primary allready, then auto equipping whatever holding on cursor after equipping pole.

Also figures out exactly what slot companion is in, doesnt need to be in specific inventory slot, just any.

Basically this should be able to run on any machine without a problem, without altering anything but the keep / save list.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Sat Jun 07, 2003 4:09 pm

kagonis wrote:The /cleanup opens your inventory.

It also equips directly into your primary instead of auto, in case you are holding something in primary allready, then auto equipping whatever holding on cursor after equipping pole.

Also figures out exactly what slot companion is in, doesnt need to be in specific inventory slot, just any.

Basically this should be able to run on any machine without a problem, without altering anything but the keep / save list.
I forgot about /cleanup doing that. I had mine doing the equip to primary untill I encounterd a bug and it destroied my 7th level clerics primary weapon. hehe.

shamblar
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Jul 27, 2003 12:45 pm

Post by shamblar » Fri Aug 08, 2003 1:36 pm

Is anyone still using this macro? I've tried it a few times and I am having no luck. I've followed the instructions carefully. Anyway, thanks in advance.

somemage
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon May 12, 2003 7:44 pm

Post by somemage » Fri Aug 08, 2003 1:57 pm

I spent about 4 hours in PoS yesterday fishing with the top macro (thanks grimjack!). All I did was edit out the sneak/hide lines and it works perfectly. What happens when you try it?

shamblar
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Jul 27, 2003 12:45 pm

Post by shamblar » Fri Aug 08, 2003 4:40 pm

I'll give it another shot. I am a rogue so I left the lines enabled. Thanks so much for the input.

shamblar
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Jul 27, 2003 12:45 pm

Post by shamblar » Fri Aug 08, 2003 4:48 pm

I removed those two lines and it works like a charm. I can live without the sneak/hide anyday. Thanks for the great macro.

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Sun Sep 14, 2003 4:44 am

This is broken atm.
When i start the macro it dosnt summon a rod.

Then i summon one myself, no biggie.

Then start the macro, and nothing happends.

If i make a standard fishing button in EQ, and press is manually then the macro sorts the fish like its surposed to do.

So i can start the macro, and press fishing manually, and its sorts the ressult into destroy or autoequip.

I tried the stardard fish.mac that comes with MQ, it dosnt work either......


I have tried replacing /doability fishing with /press 2 (i have created my stardard fish button as number 2 in a button bank). This didn't help at all...

Anyone of you macro genies, who can see where it fails ?