Need help altering Grimjak's fish macro

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

showme1
a ghoul
a ghoul
Posts: 138
Joined: Wed Dec 17, 2003 5:51 pm

Need help altering Grimjak's fish macro

Post by showme1 » Mon Jan 19, 2004 12:33 am

Basically I'd be real happy if someone could add a function in this for a caster class, so that when fishing in PoWater they will back up and recast invis before the 10 minute timer wears out. Right now it will sneak hide if you're a rogue, but that does me no good hehe. The main thing i'm not sure of is, is it possible to have the character back up out of aggro range to cast invis then return to the same spot? Any help or tips are much appreciated! Here is Grimjack's original code

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

User avatar
doanchano
orc pawn
orc pawn
Posts: 27
Joined: Sun Jan 11, 2004 11:31 pm

Post by doanchano » Mon Jan 19, 2004 2:38 am

That isn't very hard to do. First off though you are going to need a fixed duration invis spell and provide the duration it lasts. Second where exactly is out of aggro range your going to have to go and do a loc at the safe spot then another loc at the fishing spot.

When you come back with that info and the name of the invis spell you will be using I will tell you what code you need it will be up to you to put it in where it should go.

Basically your going to be setting the fishing up in a timed loop when the time runs out the toon will go to the safe spot and cast the invis spell check to make sure the spell took hold (no fizzles, interrupts or insufficient mana etc) when the spell has taken hold the toon then moves back to fishin spot the timer resets and it fishes again.

It might be a good idea to move to this safe spot prior to camping as well