fish2.mac Fishing with the fisherman's companion.

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

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

fish2.mac Fishing with the fisherman's companion.

Post by grimjack » Fri Oct 03, 2003 2:51 am

Updated to what I currently use.

Code: Select all

| - Fish2.mac -
| Updated fishing macro.
| Mainly for people who have a fisherman's companion.
| Put your fisherman's companion in an inventory slot to use this.
| 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 these:
| /doability "Sneak"
| /doability "Hide"


#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."

Sub Main
   /zapvar
   /declare DestArraySize global
   /declare tempvar global
   /declare DestroyArray array
   /varset DestroyArray(0) "Tattered Cloth Sandal"
   /varset DestroyArray(1) "Rusty Dagger"
   /varset DestroyArray(2) "Fish Scales"
   /varset DestroyArray(3) "Item to destroy"
   /varset DestroyArray(4) "Item2 to destroy"
   |Add as many more of these lines as you want.  Just add 1 to the number in () and add 1 to DestArraySize for each.
   /varset DestArraySize 4
   :Fish
   /if n $char(ability,"Fishing")>0 {
      /delay 1s
      /if "$char(casting)"=="FALSE" {
         /if "$cursor()"=="NULL" {
            /doability Fishing
            /doevents
         }
      }
   }
   /if n $char(ability,"Sneak")>0 {
      /if "$char(casting)"=="FALSE" {
         /doability "Sneak"
      }
   }
   /if n $char(ability,"Hide")>0 {
      /if "$char(casting)"=="FALSE" {
         /doability "Hide"
      }
   }
   /if "$cursor()"!="NULL" /call ItemSub
   /doevents
   /if "$cursor()"!="NULL" /call ItemSub
   /goto :Fish
/return

Sub ItemSub
   :cursorloop1
   /for tempvar 0 to @DestArraySize
   /if "$cursor(name)"~~"@DestroyArray(@tempvar)" {
      /destroy
      /delay 1
   }
   /next tempvar
   /if "$cursor()"=="TRUE" {
      /autoinventory
      /delay 1
      /if "$cursor()"=="TRUE" /goto :cursorloop1
   }
/return

Sub Event_NeedPole
   /cast item "Fisherman's Companion"
   /delay 11s
   /autoinventory
   /delay 1
   :cursorloop2
   /if "$cursor()"=="TRUE" {
      /autoinventory
      /delay 1
      /goto :cursorloop2
   }
/return

Sub Event_PrimaryHand
   /cast item "Fisherman's Companion"
   /delay 11s
   /autoinventory
   /delay 1
   :cursorloop3
   /if "$cursor()"=="TRUE" {
      /autoinventory
      /delay 1
      /goto :cursorloop3
   }
/return

Sub Event_OutOfBait
   /if "$char(state)"=="STAND" /sit
   /camp desktop
   /endmacro
/return
Last edited by grimjack on Mon Nov 24, 2003 12:09 am, edited 2 times in total.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Bio_War
a lesser mummy
a lesser mummy
Posts: 36
Joined: Sun Sep 29, 2002 1:03 pm

Using an INI file

Post by Bio_War » Wed Oct 08, 2003 6:41 pm

was wondering if it would be possable to do an INI file like forageini.mac uses, was going to try to do it, but after looking, I was completely lost, I have been able to get most of the old macros I use to work with the old MQ, but now, I am lost, I will have to relearn this now, I will keep trying, and who know, I may get it, if I do, I will post it.

Thank Bio_War

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

Post by grimjack » Mon Nov 24, 2003 12:10 am

Updated to what I currently use.

Eventualy I may decide to add ini support. Just have not found a real need to at the moment. Maybe I'll get bored while at work tonight and do this.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

inorpo
a lesser mummy
a lesser mummy
Posts: 31
Joined: Sat Nov 29, 2003 1:44 pm

Post by inorpo » Sun Nov 30, 2003 11:28 am

I modified this slightly to add support fo GM detection, when a GM zones in it just freazes untill they leave.
I'm new to this but it seems like a fairly good thing to have.

Code: Select all

| - Fish2.mac - 
| Updated fishing macro. 
| Mainly for people who have a fisherman's companion. 
| Put your fisherman's companion in an inventory slot to use this. 
| 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 these: 
| /doability "Sneak" 
| /doability "Hide" 
|
| Updated to have GM detection, the macro just frezes while the GM is in 
|  zone, also modified it to actually work up hide / sneak.

#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." 

Sub Main 
   /zapvar 
   /declare DestArraySize global 
   /declare tempvar global 
   /declare DestroyArray array 
   /varset DestroyArray(0) "Tattered Cloth Sandal" 
   /varset DestroyArray(1) "Rusty Dagger" 
   |/varset DestroyArray(2) "Fish Scales" 
   |/varset DestroyArray(3) "Item to destroy" 
   |/varset DestroyArray(4) "Item2 to destroy" 
   |Add as many more of these lines as you want.  Just add 1 to the number in () and add 1 to DestArraySize for each. 
   /varset DestArraySize 2 
   :Fish 
   /if n $char(ability,"Fishing")>0 {
   	/if "$gm"=="FALSE" {
			 /delay 1s 
			 /if "$char(casting)"=="FALSE" { 
				 /if "$cursor()"=="NULL" { 
					 /doability Fishing 
					 /doability "Hide"
					 /doability "Sneak"
					 /doevents 
				 } 
			 } 
		 } 
		 /if n $char(ability,"Sneak")>0 { 
			 /if "$char(casting)"=="FALSE" { 
				 /doability "Sneak" 
			 } 
		 } 
		 /if n $char(ability,"Hide")>0 { 
			 /if "$char(casting)"=="FALSE" { 
				 /doability "Hide" 
			 } 
		 } 
		 /if "$cursor()"!="NULL" /call ItemSub 
		 /doevents 
		 /if "$cursor()"!="NULL" /call ItemSub 
		}
   /goto :Fish 
/return 

Sub ItemSub 
   :cursorloop1 
   /for tempvar 0 to @DestArraySize 
   /if "$cursor(name)"~~"@DestroyArray(@tempvar)" { 
      /destroy 
      /delay 1 
   } 
   /next tempvar 
   /if "$cursor()"=="TRUE" { 
      /autoinventory 
      /delay 1 
      /if "$cursor()"=="TRUE" /goto :cursorloop1 
   } 
/return 

Sub Event_NeedPole 
   /cast item "Fisherman's Companion" 
   /delay 11s 
   /autoinventory 
   /delay 1 
   :cursorloop2 
   /if "$cursor()"=="TRUE" { 
      /autoinventory 
      /delay 1 
      /goto :cursorloop2 
   } 
/return 

Sub Event_PrimaryHand 
   /cast item "Fisherman's Companion" 
   /delay 11s 
   /autoinventory 
   /delay 1 
   :cursorloop3 
   /if "$cursor()"=="TRUE" { 
      /autoinventory 
      /delay 1 
      /goto :cursorloop3 
   } 
/return 

Sub Event_OutOfBait 
   /if "$char(state)"=="STAND" /sit 
   /camp desktop 
   /endmacro 
/return

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

Post by grimjack » Mon Dec 01, 2003 2:25 am

I usualy don't bother with gm checks. GM's can go into a super invis mode where your client isn't sent their location. I suppose a little extra protection isn't bad though.

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Tue Dec 02, 2003 2:27 am

First off let me say that this macro is great, I usually fill my bags with bait and turn it on and come back with a sack full of whatever im after. However I did have one question, Is there any way you could add a sub that would run you to a vendor in the same zone, buy bait (untill your slots were full) and run back to your fishing spot and start reelin more in?

And once you could hold no more of whatever fish you were after, end the macro and camp?

In particular want to use this to run to the Vendor near the zoneout of PoStorms, buy alot more bait, and go back by the boats and keep fishing.

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

Post by grimjack » Tue Dec 02, 2003 4:10 am

Demorphina wrote:First off let me say that this macro is great, I usually fill my bags with bait and turn it on and come back with a sack full of whatever im after. However I did have one question, Is there any way you could add a sub that would run you to a vendor in the same zone, buy bait (untill your slots were full) and run back to your fishing spot and start reelin more in?

And once you could hold no more of whatever fish you were after, end the macro and camp?

In particular want to use this to run to the Vendor near the zoneout of PoStorms, buy alot more bait, and go back by the boats and keep fishing.
Yes you could. Instead of camping you would have it call the sub and you could $count the fish to tell when to camp.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Tue Dec 02, 2003 10:06 pm

Great! Thanks, Ill take a look at some other macros and see if I can figure out how to write this on my own, If I can't, I will probably be back for help :)

Edit: Ok, I found a few subs in your hunter.mac that I used to move to the NPC, but it cant get there, in storms there is that small tunnel, and its far from a straight run to the zoneout room. And, im not proficient enough to set up anything that will move me through a series of waypoints :( Can anyone help? I can post the locs I would want for the start, finish, and in-betweens of each direction.

Someone suggested an array in IRC, I dont know how to code for that yet.

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Wed Dec 03, 2003 4:04 am

*edit* NM, can't be arsed.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

Post by Drunkensloth » Wed Dec 03, 2003 5:04 am

yeah if your MQ can use a command called /warp.... youc ould do it easily...


otherwise you get to have a REALLY fun run....
BUT IT IS POSSIBLE AND EASILY!

you just have to declare a BUNCH OF WAYPOINTS! in an array if youw ould like :)
basically play connect the dots with straight lines, run straight until you cant anymore, take a loc, store that as a variable... and keep going until you get to the merchant guy, then do something like /face varname
then press num lock
then you ahve the fun distance check from the point to tell it to stop and such... fun fun... dont be greedy just have it log like everyone else :P




PS if you want the /warp command, head over and register at forever-hacking~ but know this: if you dont know what you are doing over there.. YOU WILL GET CAUGHT BY A GM AND BANNED
And here I was clicking like a sucker!

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Wed Dec 03, 2003 5:48 pm

No!

ap's avy was narfed! Get it back, quick! It's part my daily pr0n intake!
-Elric

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Wed Dec 03, 2003 5:49 pm

Oh, phew. Thank god, it was just MY browser.. You were about to have a lot of disappointed board members.

:twisted:
-Elric

User avatar
Undies
a ghoul
a ghoul
Posts: 94
Joined: Mon Oct 20, 2003 9:12 pm

Post by Undies » Thu Dec 04, 2003 5:32 pm

OK rather than camping to desktop, what would be the command to quit immediately to desktop?

eg. FD classes... could be a mite dangerous leaving FD fishing to stand, then sit, then camp....

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Thu Dec 04, 2003 8:18 pm

um /q ?

or /press alt + f4 if you were using eqw

User avatar
Undies
a ghoul
a ghoul
Posts: 94
Joined: Mon Oct 20, 2003 9:12 pm

Post by Undies » Thu Dec 04, 2003 10:52 pm

ref

Code: Select all

Sub Event_OutOfBait 
   /if "$char(state)"=="STAND" /sit 
   /camp desktop 
   /endmacro 
/return 
/q and alt-F4 are not Macroquest commands