• IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->

Request - Fishing mac that works Please.. and some other stuff.

Joined
Nov 22, 2010
Likes
18
RedCents
274¢
#1
I can't code and I have no idea what I'm doing so I played around with the fishing macs available to the general public (adv fish, hyperfish, fish, skilling) and then I modified the foragedestroy to /fish and /drop but even that doesn't work 100% especially for what I want to do.

The hyperfish is almost exactly what I want out of a fishing macro, Looks for poles, fisherman's companion and summons a pole if needed, even though when it was working it didn't do this. It's written in the code though and should do it. Unfortunately every mac i've tried/edited and gotten to work will still drop fish I want to keep. or it keeps everything including daggers/sandals. I also like to turn melee on and forage but they don't handle foraged items well anymore because you can forage more than one item almost every time now, so there's no redundancy check. Foragedestory seems to have one that you can set to check more than once but it doesn't function. Playing with all these macs has made my head hurt and I have to constantly monitor my fishers for fish scales, rusty daggers, broken poles etc. it's a pain and I'm trying to get tons of fish to help my friend get baking up. It seems like poles break more often these days too. One toon went through six poles in 45 minutes.

I tried setting up kissassist to buff1=Fishing but there's no support for fishing so that ended my possible kiss solution. Even that wouldn't allow me to summon a new pole etc. or look for and equip one. Is anyone interested in making a macro that handles all that and will check for items on cursor and actually filter them properly if there's more than one item? Hell even when there's just fishing going on I can't get the fishing macros to just drop everything but what I want. I think between lag and mq it just misses things and keeps the stuff i don't want still.


Here's the code I played around with in foragedestroy, I named it fishdestroy to keep me from messing anything up. I totally ripped it off but it worked better than any other fish mac out there I could find. from ones that actually work, skilling didn't even turn on, kept telling me to edit the settings and I did, heavily, for the toon and zone I was in. It still didn't turn on, same with skilling, it would start up and seem like it would start fishing any second but never do anything. I hate to say it but even ninjaadvloot doesn't handle multiple foraged items right either, or items fished up. I tried turning kiss on and using autofire to hit fishing. Advloot doesn't handle items fished up, only foraged and even then it has the same problem the rest have, not handling multiple items on cursor, dropping/keeping the wrong things even though i clearly stated =destroy or =keep after things in the loot file. I'm kinda losing my hope with MQ in general, it seems every macro has some kind of problem and doesn't do what it is even supposed to do.

Sorry for the rant, In a nutshell I'm looking for a fish macro that also handles foraging, but will summon a new pole, or look for fishing poles and equip them. It also needs to drop sort the loot properly even if it takes a few extra seconds. I don't like destroying anything anymore because of the "recovery" tab on merchants I want to keep that clear for things that actually may need to be recovered. I'm tired of setting dagger to drop or destroy and still keeping them, or dropping the fish I wanted when it doesn't say anywhere that I want to drop that type of fish which is what hyperfish is doing to me. Hyperfish has an ini where you can set loot1=Raxil fish yet it still drops it!? I just want to fish, forever, as long as there's bait and poles to be summoned/looked for.

These are the macs i've tried and played with and they either work or sorta work or don't work at all and all of them have some or not enough of the features I want.
Most of them including anything that uses ninjaadvloot filters everything wrong and really pisses me off. I didn't include the ini files for the ones that make one simply because it's not that big of an issue and I know I edited them right, and some have the toon names in them. Thanks for any help/repairs you can do or a whole new mac that really works... here's me getting my hopes up, lol.

Fishdestroy - (I copied foragedestroy and repurposed it)
Rich (BB code):
|Fishdestroy.mac 
|Based off of Grimjack's forage.mac - Thank you =) 
|edit the /varset DestroyArray to reflect what you want to destroy. 
|If you add more update DestArraySize to reflect the change. 
|The next value in the array would be like this. 
|/varset DestroyArray(20) "what you want" 
|And you would update DestArraySize like this. 
|/varset DestArraySize 23


sub Main 
   /cleanup 
   /declare LoopCount int outer 
   /declare DestroyArray[7] string outer 
   /declare DestArraySize int outer 
   /varset DestroyArray[1] "Fish Scales"
   /varset DestroyArray[2] "Rusty Dagger"
   /varset DestroyArray[3] "Fresh Fish"
   /varset DestroyArray[4] "Oseka's Messenger"
   /varset DestroyArray[5] "Prawn"
   /varset DestroyArray[6] "Pod of water"
   /varset DestroyArray[7] "Roots"
   /varset DestArraySize 7
   /varset LoopCount 2

   :Fish 
       /delay 2s 
       /if (${Cursor.ID}) /call ItemSort 
       /if (!${Cursor.ID}) { 
      /if (${Me.Skill[Fishing]} > 0) /doability Fishing 
       } 
       /if (${Cursor.ID}) /call ItemSort 
       /goto :Fish 
   :loop 
/return 

sub ItemSort 
   :itemchecker 
      /if (${Cursor.ID}) { 
          /if (${Cursor.Name.Find[${DestroyArray[${LoopCount}]}]}) { 
            /echo Dropping ${Cursor.Name} 
       /drop 
            /delay 2s 
         } 
      /varcalc LoopCount ${LoopCount}+2 
      |/varadd LoopCount 1 
      /if (${Cursor.ID}) { 
        /if (${LoopCount}<${DestArraySize}) /goto :itemchecker 
        } 
   } 

   /if (${Cursor.ID}) { 
      /echo Keeping ${Cursor.Name} 
      /autoinventory 
      /delay 2s 
   } 
   /doevents 
   /varset LoopCount 4 
/return
ADV FISH

Rich (BB code):
|---------------------------------------------------------------------------------
| Advanced Fishing Macro
| adv_fishing.mac
| Author      : panther
| Version     : v1.0beta 2004-07-01 18:58pm GMT
| Useage      : /macro adv_fishing
| Description :
| This macro will fish for you and keep all items in FishingLoot.ini. You need a
| fisherman's companion in an inventory slot for this macro to work properly.
|---------------------------------------------------------------------------------

#turbo 10

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."

Sub Main

   |------------------------------------------------------------
   |Should I display fishing stats? (1 for yes, 0 for no)
   |------------------------------------------------------------
   /declare RV_DisplayStats     int outer  1


   /echo Starting up ${Macro}
   /declare int_BrokenPole     int outer  1
   /declare int_ItemsDropped     int outer  0
   /declare int_LostBait     int outer  0
   /declare int_NothingCaught     int outer  0
   /declare int_SpillBeer     int outer  1
   /declare int_TotalCasts     int outer  1
   |------------------------------------------------------------
   |Load in Loot Table.
   |------------------------------------------------------------
   /call ReadINI FishingLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Table Created... Please create one.
      /endmacro
   }
       /delay 2s
   /autoinventory
      /delay 2s
   :Start
      /call GMCheck
      /delay 2s
      /if (${Cursor.ID}) /call Looting
      /if (${Me.AbilityReady[Fishing]}) {
         /delay 3s
         /varcalc int_TotalCasts ${int_TotalCasts}+1
         /doability Fishing
      }
      /doevents
   /goto :Start
/return


|--------------------------------------------------------------------------------
|SUB: Display fishing stats.
|--------------------------------------------------------------------------------
Sub DisplayStats

   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far
   /echo -------------------
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo ${Int[${RV_LootStats[${nArray}]}]} - ${RV_LootArray[${nArray}]}'s
      /next nArray
   }
   /echo
   /echo Bad fishing so far
   /echo ------------------
   /echo ${int_BrokenPole} - Broken poles
   /echo ${int_ItemsDropped} - Items dropped
   /echo ${int_LostBait} - Lost bait
   /echo ${int_NothingCaught} - Nothing caught
   /echo ${int_SpillBeer} - Spilt your beer
/return

|--------------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|--------------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|--------------------------------------------------------------------------------
|SUB: Looting based on FishingLoot.ini.
|--------------------------------------------------------------------------------
Sub Looting

   /declare LootCheck   int inner  0

   /for LootCheck 1 to ${RV_LootArray.Size}
      /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
         /echo Keeping a ${Cursor.Name}... WOOT!
         /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
         /autoinventory
      }
   /next LootCheck

   /if (${Cursor.ID}) {
      /echo Dropping a ${Cursor.Name}...
      /drop
      /varcalc int_ItemsDropped ${int_ItemsDropped}+1
   }

   /if (${RV_DisplayStats}) /call DisplayStats
/return

|--------------------------------------------------------------------------------
|SUB: Read loot table from the INI file.
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)

   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
   /delay 1s

   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
      /delay 1s
      /return
   }
   /declare nValues     int local  1
   /declare nArray      int local  0
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}

   :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
   /goto :CounterLoop

   :MakeArray
   /if (!${nValues}) /return
   /if (${FileName.Equal["FishingLoot.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }

   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["FishingLoot.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray

   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s

/return


|--------------------------------------------------------------------------------
|SUB: Event subroutines.
|--------------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return

Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return

Sub Event_NeedPole
   /cast item "Fisherman's Companion"
   /delay 11s
   /autoinventory
/return

Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return

Sub Event_OutOfBait
   /Echo Ran out of Bait.
   /sit off
   /sit on
   /camp
   /endmacro
/return

Sub Event_PrimaryHand
   /cast item "Fisherman's Companion"
   /delay 11s
   /autoinventory
/return

Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return

Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|--------------------------------------------------------------------------------


YODAFISH (also doesn't work the way it is coded)

Rich (BB code):
|*******************************************************************|
| - YodaFish.mac -                                                 *|
| - By: Yoda                                                       *|
| - v2.0 by DKAA                                                   *|
|                                                                  *|
| Usage:                                                           *|
| To Fish and Gate if anything attacks you.                        *|
| Will Sit and camp out when you run out of bait.                  *|
| To be used with a Fisherman's Companion.                         *|
|                                                                  *|
|*******************************************************************|

#turbo

#event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"

Sub Main
    /cleanup
    :Fish
        /call CheckPole 
        /doability Fishing
        /delay 65 
        /doevents

        /if (!${Cursor.ID}) /goto :Fish

        /if (${Cursor.Name.Equal[Tattered Cloth Sandal]}) {
            /destroy
            /delay 1s
        } else {
            /if (${Cursor.Name.Equal[Rusty Dagger]}) {
                /destroy
                /delay 1s
            } else {
                /call KeepItem
            }
      }
   /goto :Fish
/return

Sub KeepItem
   /if (${Cursor.Name.NotEqual[Fish Scales]}) /echo Caught ${Cursor.Name}
   /notify InventoryWindow IW_CharacterView leftmouseup
/return

Sub CheckPole
   /if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]}) /return
   /echo  You need to put your fishing pole in your primary hand.
   /endm
/return

Sub Event_BrokenPole
   /
/return

Sub Event_NoBait
   /endmacro
/return

Hyperfish (I like the way this one is set up but still doesn't work properly anymore)


Rich (BB code):
|----------------------------------------------------------------------------
|     Name:   HyperFish.Mac                                       
|Developer: Fibby                                             
|     Date: 11/27/2004                                 
|----------------------------------------------------------------------------
|Purpose:   HyperFish is designed to be the next generation "smart" fishing   
|         automation macro.  It will auto replace any broken poles that   
|         may have met their demise at your hands either by searching your
|         inventory for one or summoning one from a fishermans companion    
|                                                         
|         This Macro is INI driven for it's "loot" tables on a per zone   
|         basis.  However, if there's not a section for the zone you want   
|         to fish in the INI file, then it will create a new section for    
|         your benifit.                                         
|                                                         
|         If there are no loot items defined in the zone section of the    
|         ini file, then the macro will assume that you want to "keep"   
|         all things that are edible and drop all "non food" items.  If   
|         in happens to fish a no-drop non food item, and that item is    
|         not declared in your loot tables, then it will attempt to        
|         destroy that item by default.  You can of course change that     
|         flag if you wish.                                    
|                                                         
| Depends:   HyperLoot.ini - Same directory as this macro               
|----------------------------------------------------------------------------
|Credits:   This script was inspired by panther and his adv_fish macro      
|         while it is an outstanding macro.. I wanted something more...   
|----------------------------------------------------------------------------
|Revisions:
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10


|----------------------------------------------------------------------------
| Event Declarations         
|----------------------------------------------------------------------------

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."


|----------------------------------------------------------------------------
| Main Macro Code            
|----------------------------------------------------------------------------

Sub Main

   |------------------------------------------------------------------------
    |User Settings = Set these please (1 for yes, 0 for no)   
   |------------------------------------------------------------------------
   /declare UserVar_DisplayStats   int outer 0
   /declare UserVar_CampOutFinish   int   outer 0
   /declare UserVar_DestroyNoDrop   int outer 0

   |------------------------------------------------------------------------
    | Counter data holders here            
   |------------------------------------------------------------------------
   /declare int_BrokenPole      int outer  0
   /declare int_ItemsDropped   int outer  0
   /declare int_LostBait      int outer  0
   /declare int_NothingCaught   int outer  0
   /declare int_SpillBeer      int outer  0
   /declare int_TotalCasts      int outer  0

   |------------------------------------------------------------------------
    | Operational Variables for this macro   
   |------------------------------------------------------------------------
   /declare op_int_GotLootArray   int outer 1
   /declare op_int_GotFishComp      int outer 1
   /declare op_int_FishByLoot      int outer 1
   /declare op_int_LoopCounter      int outer 0
   /declare op_int_ExitMacro      int outer 0
   
   /echo Starting up ${Macro}
    | Check our inventory for Fish Comp.   
   /for op_int_LoopCounter 1 to 8
      /if (${InvSlot[pack${op_int_LoopCounter}].Item.Name.Equal["Fisherman's Companion"]}) {
         /echo Whoopie!! Found our Fisherman's Companion!
         /varset op_int_GotFishComp 8
         /goto :BreakForFindFishComp
      }
   /next op_int_LoopCounter
   :BreakForFindFishComp
   /varset op_int_LoopCounter 8
   
   |------------------------------------------------------------------------
    | Load in Loot Table.                
   |------------------------------------------------------------------------
   /call ReadINI HyperFish.ini "${Zone.Name}" Loot
    /varset op_int_GotLootArray ${Macro.Return}

   |------------------------------------------------------------------------
   | Inventory anything we may have on our cursor before starting
   |------------------------------------------------------------------------
   /autoinventory
   
   |------------------------------------------------------------------------
   | Heart of the whole fishing routine..   
   |------------------------------------------------------------------------
   :Fish
   /if (${op_int_ExitMacro}==1) /goto :ExitMacro
   /call GMCheck
   /delay 2s
   /if (${Cursor.ID}) /call Looting
   /if (${Me.AbilityReady[Fishing]}) {
       /delay 3s
       /varcalc int_TotalCasts ${int_TotalCasts}+1
       /doability Fishing
   }
   /doevents
   /goto :Fish
|----------------------------------------------------------------------------
| End our Macro      
|----------------------------------------------------------------------------
:ExitMacro
   /echo -= Total Stats for this Fishing Trip =-
   /call DisplayStats
   /if (${UserVar_CampOutFinish}=1) {
      /sit off
      /sit on
      /camp
   }
/return



|----------------------------------------------------------------------------
| Begin Support sub routines      
|----------------------------------------------------------------------------
| ReadINI: Stolen from adv_fish code, modified to return 1 if
|         loot table built or 0 of loot table not built.
|----------------------------------------------------------------------------
Sub ReadINI(FileName, ZoneName, KeyRoot)
   /declare loc_int_returnValue int local 0
   /echo Attempting to Read "${ZoneName}" Section from ${FileName}
   /delay 1s
   
   /if (${Ini[${FileName}, ${ZoneName}, -1, NO].Equal[NO]}) {
      /echo Zone "${ZoneName}" Not found, Creating it now...
      /Ini ${FileName}, ${ZoneName}, -1, -1
      /delay 1s
        | Obviously, since we didn't have a section, we're not going to
        | have a loot section.. so we can end now
      /return loc_int_returnValue
   }
   
   /declare nValues     int local  1
   /declare nArray      int local  0
    /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}
   
    :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
    /goto :CounterLoop
   
    :MakeArray
   /if (!${nValues}) {
      | We didn't find any values in our loot tables.. so we'll just exit now
      /return loc_int_returnValue
   } else {
      | Must have found some values.. set our return variable now
      /varset loc_int_returnValue 1
   }
   /if (${FileName.Equal["HyperFish.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HyperFish.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
/return loc_int_returnValue

|----------------------------------------------------------------------------
|SUB: Display fishing stats.
|----------------------------------------------------------------------------
Sub DisplayStats
   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far:
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo   ${RV_LootArray[${nArray}]} -  ${Int[${RV_LootStats[${nArray}]}]}
      /next nArray
   }
   /echo
   /echo Bad fishing so far:
   /echo    Broken Poles - ${int_BrokenPole}
   /echo   Items Dropped - ${int_ItemsDropped}
   /echo       Lost Bait - ${int_LostBait}
   /echo  Nothing Caught - ${int_NothingCaught}
   /echo    Spilled Beer - ${int_SpillBeer}
/return

|----------------------------------------------------------------------------
|SUB: Main Looting routine.. based on adv_fish, heavily modified.
|----------------------------------------------------------------------------
Sub Looting
   /declare LootCheck   int inner 0
   
   /if (${op_int_GotLootArray}==0) {
      /if (${Cursor.Type.Equal["Meal"]}) {
         /autoinventory
      }
   } else {   
      /for LootCheck 1 to ${RV_LootArray.Size}
         /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
            /echo Keeping a ${Cursor.Name}
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
            /autoinventory
         }
      /next LootCheck
   }
   /if (${Cursor.ID}) {
      /if (${Cursor.NoDrop}) {
         /if (${UserVar_DestroyNoDrop}==1) {
            /destroy
         } else {
            /autoinventory
         }
      } else {
         /echo Dropping a ${Cursor.Name}...
         /drop
         /varcalc int_ItemsDropped ${int_ItemsDropped}+1
      }
   }
   /if (${UserVar_DisplayStats}==1) /call DisplayStats
/return

|----------------------------------------------------------------------------
|SUB: Pole replacement logic
|----------------------------------------------------------------------------
Sub FindPole
   /declare lv_int_Return int local 0
   /declare lv_int_LoopCounter int local 0
   /if (${op_int_GotFishComp}==1) {
      | We have our companion.. summon our pole
      /cast item "Fisherman's Companion"
      /delay 11s
      /autoinventory
      /varset lv_int_Return 1
   } else {
      | We don't have a companion, find a fishing pole in inventory
      /for op_int_LoopCounter 1 to 8
         /if (${InvSlot[pack${op_int_LoopCounter}].Item.Container}) {
            /for lv_int_LoopCounter 1 to ${InvSlot[pack${op_int_LoopCounter].Container}
               /echo ${InvSlot[pack${op_int_LoopCounter}].Item.Name} - ${InvSlot[pack${op_int_LoopCounter}].Item.Item[${lv_int_LoopCounter}].Name}
               /if (${InvSlot[pack${op_int_LoopCounter}].Item.Item[${lv_int_LoopCounter}].Type.Equal["Fishing Pole"]}) {
                  /ItemNotifiy pack${op_int_LoopCounter} rightmouseup
                  /ItemNotify ${InvSlot[pack${op_int_LoopCounter}]} ${lv_int_LoopCounter} leftmouseup
                  /autoinventory
                  /varset lv_int_Return 1
                  /goto :BreakoutLoop
               }
            /next lv_int_LoopCounter
         } else {
            /if (${InvSlot[pack${op_int_LoopCounter}].Item.Type.Equal["Fishing Pole"]}) {
               /itemnotify pack${op_int_LoopCounter} leftmouseup
               /autoinventory
               /varset lv_int_Return 1
               /goto :BreakoutLoop
            }
         }
      /next op_int_LoopCounter
   }
   :BreakoutLoop
   /if (${lv_int_Return}==0) {
      /echo Bummer.. We're out of Fishing Poles
      /varset op_int_ExitMacro 1
   }
/return lv_int_Return

|----------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|----------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|----------------------------------------------------------------------------
| End Support sub routines         
|----------------------------------------------------------------------------

|----------------------------------------------------------------------------
| Begin Event Sub Routines         
|----------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_NeedPole
   /call FindPole
/return


Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return


Sub Event_OutOfBait
   /echo Bummer.. we're out of bait
   /varset op_int_ExitMacro 1
/return


Sub Event_PrimaryHand
   /call FindPole
/return


Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return


Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|----------------------------------------------------------------------------
| End Event Sub Routines         
|----------------------------------------------------------------------------

Skilling (NIGHTMARE)

Rich (BB code):
|----------------------------------------------------------------------------
|     Name:   HyperFish.Mac                                       
|Developer: Fibby                                             
|     Date: 11/27/2004                                 
|----------------------------------------------------------------------------
|Purpose:   HyperFish is designed to be the next generation "smart" fishing   
|         automation macro.  It will auto replace any broken poles that   
|         may have met their demise at your hands either by searching your
|         inventory for one or summoning one from a fishermans companion    
|                                                         
|         This Macro is INI driven for it's "loot" tables on a per zone   
|         basis.  However, if there's not a section for the zone you want   
|         to fish in the INI file, then it will create a new section for    
|         your benifit.                                         
|                                                         
|         If there are no loot items defined in the zone section of the    
|         ini file, then the macro will assume that you want to "keep"   
|         all things that are edible and drop all "non food" items.  If   
|         in happens to fish a no-drop non food item, and that item is    
|         not declared in your loot tables, then it will attempt to        
|         destroy that item by default.  You can of course change that     
|         flag if you wish.                                    
|                                                         
| Depends:   HyperLoot.ini - Same directory as this macro               
|----------------------------------------------------------------------------
|Credits:   This script was inspired by panther and his adv_fish macro      
|         while it is an outstanding macro.. I wanted something more...   
|----------------------------------------------------------------------------
|Revisions:
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10


|----------------------------------------------------------------------------
| Event Declarations         
|----------------------------------------------------------------------------

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."


|----------------------------------------------------------------------------
| Main Macro Code            
|----------------------------------------------------------------------------

Sub Main

   |------------------------------------------------------------------------
    |User Settings = Set these please (1 for yes, 0 for no)   
   |------------------------------------------------------------------------
   /declare UserVar_DisplayStats   int outer 0
   /declare UserVar_CampOutFinish   int   outer 0
   /declare UserVar_DestroyNoDrop   int outer 0

   |------------------------------------------------------------------------
    | Counter data holders here            
   |------------------------------------------------------------------------
   /declare int_BrokenPole      int outer  0
   /declare int_ItemsDropped   int outer  0
   /declare int_LostBait      int outer  0
   /declare int_NothingCaught   int outer  0
   /declare int_SpillBeer      int outer  0
   /declare int_TotalCasts      int outer  0

   |------------------------------------------------------------------------
    | Operational Variables for this macro   
   |------------------------------------------------------------------------
   /declare op_int_GotLootArray   int outer 1
   /declare op_int_GotFishComp      int outer 1
   /declare op_int_FishByLoot      int outer 1
   /declare op_int_LoopCounter      int outer 0
   /declare op_int_ExitMacro      int outer 0
   
   /echo Starting up ${Macro}
    | Check our inventory for Fish Comp.   
   /for op_int_LoopCounter 1 to 8
      /if (${InvSlot[pack${op_int_LoopCounter}].Item.Name.Equal["Fisherman's Companion"]}) {
         /echo Whoopie!! Found our Fisherman's Companion!
         /varset op_int_GotFishComp 8
         /goto :BreakForFindFishComp
      }
   /next op_int_LoopCounter
   :BreakForFindFishComp
   /varset op_int_LoopCounter 8
   
   |------------------------------------------------------------------------
    | Load in Loot Table.                
   |------------------------------------------------------------------------
   /call ReadINI HyperFish.ini "${Zone.Name}" Loot
    /varset op_int_GotLootArray ${Macro.Return}

   |------------------------------------------------------------------------
   | Inventory anything we may have on our cursor before starting
   |------------------------------------------------------------------------
   /autoinventory
   
   |------------------------------------------------------------------------
   | Heart of the whole fishing routine..   
   |------------------------------------------------------------------------
   :Fish
   /if (${op_int_ExitMacro}==1) /goto :ExitMacro
   /call GMCheck
   /delay 2s
   /if (${Cursor.ID}) /call Looting
   /if (${Me.AbilityReady[Fishing]}) {
       /delay 3s
       /varcalc int_TotalCasts ${int_TotalCasts}+1
       /doability Fishing
   }
   /doevents
   /goto :Fish
|----------------------------------------------------------------------------
| End our Macro      
|----------------------------------------------------------------------------
:ExitMacro
   /echo -= Total Stats for this Fishing Trip =-
   /call DisplayStats
   /if (${UserVar_CampOutFinish}=1) {
      /sit off
      /sit on
      /camp
   }
/return



|----------------------------------------------------------------------------
| Begin Support sub routines      
|----------------------------------------------------------------------------
| ReadINI: Stolen from adv_fish code, modified to return 1 if
|         loot table built or 0 of loot table not built.
|----------------------------------------------------------------------------
Sub ReadINI(FileName, ZoneName, KeyRoot)
   /declare loc_int_returnValue int local 0
   /echo Attempting to Read "${ZoneName}" Section from ${FileName}
   /delay 1s
   
   /if (${Ini[${FileName}, ${ZoneName}, -1, NO].Equal[NO]}) {
      /echo Zone "${ZoneName}" Not found, Creating it now...
      /Ini ${FileName}, ${ZoneName}, -1, -1
      /delay 1s
        | Obviously, since we didn't have a section, we're not going to
        | have a loot section.. so we can end now
      /return loc_int_returnValue
   }
   
   /declare nValues     int local  1
   /declare nArray      int local  0
    /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}
   
    :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
    /goto :CounterLoop
   
    :MakeArray
   /if (!${nValues}) {
      | We didn't find any values in our loot tables.. so we'll just exit now
      /return loc_int_returnValue
   } else {
      | Must have found some values.. set our return variable now
      /varset loc_int_returnValue 1
   }
   /if (${FileName.Equal["HyperFish.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HyperFish.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
/return loc_int_returnValue

|----------------------------------------------------------------------------
|SUB: Display fishing stats.
|----------------------------------------------------------------------------
Sub DisplayStats
   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far:
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo   ${RV_LootArray[${nArray}]} -  ${Int[${RV_LootStats[${nArray}]}]}
      /next nArray
   }
   /echo
   /echo Bad fishing so far:
   /echo    Broken Poles - ${int_BrokenPole}
   /echo   Items Dropped - ${int_ItemsDropped}
   /echo       Lost Bait - ${int_LostBait}
   /echo  Nothing Caught - ${int_NothingCaught}
   /echo    Spilled Beer - ${int_SpillBeer}
/return

|----------------------------------------------------------------------------
|SUB: Main Looting routine.. based on adv_fish, heavily modified.
|----------------------------------------------------------------------------
Sub Looting
   /declare LootCheck   int inner 0
   
   /if (${op_int_GotLootArray}==0) {
      /if (${Cursor.Type.Equal["Meal"]}) {
         /autoinventory
      }
   } else {   
      /for LootCheck 1 to ${RV_LootArray.Size}
         /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
            /echo Keeping a ${Cursor.Name}
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
            /autoinventory
         }
      /next LootCheck
   }
   /if (${Cursor.ID}) {
      /if (${Cursor.NoDrop}) {
         /if (${UserVar_DestroyNoDrop}==1) {
            /destroy
         } else {
            /autoinventory
         }
      } else {
         /echo Dropping a ${Cursor.Name}...
         /drop
         /varcalc int_ItemsDropped ${int_ItemsDropped}+1
      }
   }
   /if (${UserVar_DisplayStats}==1) /call DisplayStats
/return

|----------------------------------------------------------------------------
|SUB: Pole replacement logic
|----------------------------------------------------------------------------
Sub FindPole
   /declare lv_int_Return int local 0
   /declare lv_int_LoopCounter int local 0
   /if (${op_int_GotFishComp}==1) {
      | We have our companion.. summon our pole
      /cast item "Fisherman's Companion"
      /delay 11s
      /autoinventory
      /varset lv_int_Return 1
   } else {
      | We don't have a companion, find a fishing pole in inventory
      /for op_int_LoopCounter 1 to 8
         /if (${InvSlot[pack${op_int_LoopCounter}].Item.Container}) {
            /for lv_int_LoopCounter 1 to ${InvSlot[pack${op_int_LoopCounter].Container}
               /echo ${InvSlot[pack${op_int_LoopCounter}].Item.Name} - ${InvSlot[pack${op_int_LoopCounter}].Item.Item[${lv_int_LoopCounter}].Name}
               /if (${InvSlot[pack${op_int_LoopCounter}].Item.Item[${lv_int_LoopCounter}].Type.Equal["Fishing Pole"]}) {
                  /ItemNotifiy pack${op_int_LoopCounter} rightmouseup
                  /ItemNotify ${InvSlot[pack${op_int_LoopCounter}]} ${lv_int_LoopCounter} leftmouseup
                  /autoinventory
                  /varset lv_int_Return 1
                  /goto :BreakoutLoop
               }
            /next lv_int_LoopCounter
         } else {
            /if (${InvSlot[pack${op_int_LoopCounter}].Item.Type.Equal["Fishing Pole"]}) {
               /itemnotify pack${op_int_LoopCounter} leftmouseup
               /autoinventory
               /varset lv_int_Return 1
               /goto :BreakoutLoop
            }
         }
      /next op_int_LoopCounter
   }
   :BreakoutLoop
   /if (${lv_int_Return}==0) {
      /echo Bummer.. We're out of Fishing Poles
      /varset op_int_ExitMacro 1
   }
/return lv_int_Return

|----------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|----------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|----------------------------------------------------------------------------
| End Support sub routines         
|----------------------------------------------------------------------------

|----------------------------------------------------------------------------
| Begin Event Sub Routines         
|----------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_NeedPole
   /call FindPole
/return


Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return


Sub Event_OutOfBait
   /echo Bummer.. we're out of bait
   /varset op_int_ExitMacro 1
/return


Sub Event_PrimaryHand
   /call FindPole
/return


Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return


Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|----------------------------------------------------------------------------
| End Event Sub Routines         
|----------------------------------------------------------------------------
 
Joined
Jan 20, 2006
Likes
28
RedCents
177¢
#2
If any of these macros are in the VIP section over on the MQ2 forums, you need to remove them. Not everyone here has VIP access there. They should but they don't. I don't mean to come off as rude or anything btw and if it sounds like that, I apologize as that was not my intent.
 

Maskoi

So old and salty he grew scales
Moderator
Joined
Sep 28, 2005
Likes
623
RedCents
67,729¢
#3
Maintained stuff we worry about and always try to get the authors permission. Macs that are like 10 years old and people fix or work on not so much. Plus we donate to the mq2 a lot and I personally maintain like 4 things over there that i keep going there.
 
Joined
Jan 20, 2006
Likes
28
RedCents
177¢
#4
Ah ok. I just didn't want anyone getting into any trouble over stuff from the main boards.
 
Joined
Dec 17, 2011
Likes
5
RedCents
446¢
#5
Fixed Hyperfish to find and equip a fishing pole if yours broke. I have fished 20k+ Raxil Fish with this mac and gotten 12+ toon 200 skill in fishing.


Rich (BB code):
|----------------------------------------------------------------------------
|     Name:   HyperFish.Mac                                       
|     Developer: Fibby                                             
|     Date: 11/27/2004                                 
|----------------------------------------------------------------------------
|Purpose:   HyperFish is designed to be the next generation "smart" fishing   
|         automation macro.  It will auto replace any broken poles that   
|         may have met their demise at your hands either by searching your
|         inventory for one or summoning one from a fishermans companion    
|                                                         
|         This Macro is INI driven for it's "loot" tables on a per zone   
|         basis.  However, if there's not a section for the zone you want   
|         to fish in the INI file, then it will create a new section for    
|         your benifit.                                         
|                                                         
|         If there are no loot items defined in the zone section of the    
|         ini file, then the macro will assume that you want to "keep"   
|         all things that are edible and drop all "non food" items.  If   
|         in happens to fish a no-drop non food item, and that item is    
|         not declared in your loot tables, then it will attempt to        
|         destroy that item by default.  You can of course change that     
|         flag if you wish.                                    
|                                                         
| Depends:   HyperLoot.ini - Same directory as this macro               
|----------------------------------------------------------------------------
|Credits:   This script was inspired by panther and his adv_fish macro      
|         while it is an outstanding macro.. I wanted something more...   
|----------------------------------------------------------------------------
|Revisions:
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10


|----------------------------------------------------------------------------
| Event Declarations         
|----------------------------------------------------------------------------

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."


|----------------------------------------------------------------------------
| Main Macro Code            
|----------------------------------------------------------------------------

Sub Main

   |------------------------------------------------------------------------
    |User Settings = Set these please (1 for yes, 0 for no)   
   |------------------------------------------------------------------------
   /declare UserVar_DisplayStats   int outer 1
   /declare UserVar_CampOutFinish   int   outer 1
   /declare UserVar_DestroyNoDrop   int outer 1

   |------------------------------------------------------------------------
    | Counter data holders here            
   |------------------------------------------------------------------------
   /declare int_BrokenPole      int outer  0
   /declare int_ItemsDropped   int outer  0
   /declare int_LostBait      int outer  0
   /declare int_NothingCaught   int outer  0
   /declare int_SpillBeer      int outer  0
   /declare int_TotalCasts      int outer  0

   |------------------------------------------------------------------------
    | Operational Variables for this macro   
   |------------------------------------------------------------------------
   /declare op_int_GotLootArray   int outer 0
   /declare op_int_GotFishComp      int outer 0
   /declare op_int_FishByLoot      int outer 0
   /declare op_int_LoopCounter      int outer 0
   /declare op_int_ExitMacro      int outer 0
   
   /echo Starting up ${Macro}
    | Check our inventory for Fish Comp.   
   /for op_int_LoopCounter 1 to 8
      /if (${InvSlot[pack${op_int_LoopCounter}].Item.Name.Equal["Fisherman's Companion"]}) {
         /echo Whoopie!! Found our Fisherman's Companion!
         /varset op_int_GotFishComp 1
         /goto :BreakForFindFishComp
      }
   /next op_int_LoopCounter
   :BreakForFindFishComp
   /varset op_int_LoopCounter 0
   
   |------------------------------------------------------------------------
    | Load in Loot Table.                
   |------------------------------------------------------------------------
   /call ReadINI HyperFish.ini "${Zone.Name}" Loot
    /varset op_int_GotLootArray ${Macro.Return}

   |------------------------------------------------------------------------
   | Inventory anything we may have on our cursor before starting
   |------------------------------------------------------------------------
   /autoinventory
   
   |------------------------------------------------------------------------
   | Heart of the whole fishing routine..   
   |------------------------------------------------------------------------
   :Fish
   /if (${op_int_ExitMacro}==1) /goto :ExitMacro
   /call GMCheck
   /delay 5s
   /if (${Cursor.ID}) /call Looting
   /if (${Me.AbilityReady[Fishing]}) {
       /delay 1s
       /varcalc int_TotalCasts ${int_TotalCasts}+1
       /doability Fishing
   }
   /doevents
   /goto :Fish
|----------------------------------------------------------------------------
| End our Macro      
|----------------------------------------------------------------------------
:ExitMacro
   /echo -= Total Stats for this Fishing Trip =-
   /call DisplayStats
   /if (${UserVar_CampOutFinish}=1) {
      /sit off
      /sit on
      /camp
   }
/return



|----------------------------------------------------------------------------
| Begin Support sub routines      
|----------------------------------------------------------------------------
| ReadINI: Stolen from adv_fish code, modified to return 1 if
|         loot table built or 0 of loot table not built.
|----------------------------------------------------------------------------
Sub ReadINI(FileName, ZoneName, KeyRoot)
   /declare loc_int_returnValue int local 0
   /echo Attempting to Read "${ZoneName}" Section from ${FileName}
   /delay 1s
   
   /if (${Ini[${FileName}, ${ZoneName}, -1, NO].Equal[NO]}) {
      /echo Zone "${ZoneName}" Not found, Creating it now...
      /Ini ${FileName}, ${ZoneName}, -1, -1
      /delay 1s
        | Obviously, since we didn't have a section, we're not going to
        | have a loot section.. so we can end now
      /return loc_int_returnValue
   }
   
   /declare nValues     int local  1
   /declare nArray      int local  0
    /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}
   
    :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
    /goto :CounterLoop
   
    :MakeArray
   /if (!${nValues}) {
      | We didn't find any values in our loot tables.. so we'll just exit now
      /return loc_int_returnValue
   } else {
      | Must have found some values.. set our return variable now
      /varset loc_int_returnValue 1
   }
   /if (${FileName.Equal["HyperFish.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HyperFish.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 10s
/return loc_int_returnValue

|----------------------------------------------------------------------------
|SUB: Display fishing stats.
|----------------------------------------------------------------------------
Sub DisplayStats
   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far:
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo   ${RV_LootArray[${nArray}]} -  ${Int[${RV_LootStats[${nArray}]}]}
      /next nArray
   }
   /echo
   /echo Bad fishing so far:
   /echo    Broken Poles - ${int_BrokenPole}
   /echo   Items Dropped - ${int_ItemsDropped}
   /echo       Lost Bait - ${int_LostBait}
   /echo  Nothing Caught - ${int_NothingCaught}
   /echo    Spilled Beer - ${int_SpillBeer}
/return

|----------------------------------------------------------------------------
|SUB: Main Looting routine.. based on adv_fish, heavily modified.
|----------------------------------------------------------------------------
Sub Looting
   /declare LootCheck   int inner 0
   
   /if (${op_int_GotLootArray}==0) {
      /if (${Cursor.Type.Equal["Food"]}) {
         /autoinventory
      }
   } else {   
      /for LootCheck 1 to ${RV_LootArray.Size}
         /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
            /echo Keeping a ${Cursor.Name}... WOOT!
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
            /autoinventory
         }
      /next LootCheck
   }
   /if (${Cursor.ID}) {
      /if (${Cursor.NoDrop}) {
         /if (${UserVar_DestroyNoDrop}==1) {
            /destroy
         } else {
            /autoinventory
         }
      } else {
         /echo Dropping a ${Cursor.Name}...
         /drop
         /varcalc int_ItemsDropped ${int_ItemsDropped}+1
      }
   }
   /if (${UserVar_DisplayStats}==1) /call DisplayStats
/return

|----------------------------------------------------------------------------
|SUB: Pole replacement logic
|----------------------------------------------------------------------------
| - vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
| - SUB: Check Pole
Sub FindPole
| - Add check for Brell's Fishing Pole and Fisherman's Companion
    :CheckPoleLoop
    /target ${Me}
    /if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]} == 1) /return
    /if (${FindItemCount[=Fishing Pole]} == 0) {
        /delay 5
        /varset ItemToBuy Fishing Pole
        /varset Quantity 1
        /call Buy
        }
        /delay 2s
    /if (${FindItemCount[=Fishing Pole]} > 0) {
        /keypress OPEN_INV_BAGS
        /delay 2s
        /itemnotify ${FindItem[Fishing Pole].InvSlot} leftmouseup
        /delay 5
        /itemnotify mainhand leftmouseup
        /delay 5
    | - Anything in the primary hand (mainhand) will then be put in inventory.
        /autoinventory
        /delay 5
        }
        /keypress CLOSE_INV_BAGS
        /return
| - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

|----------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|----------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|----------------------------------------------------------------------------
| End Support sub routines         
|----------------------------------------------------------------------------

|----------------------------------------------------------------------------
| Begin Event Sub Routines         
|----------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_NeedPole
   /call FindPole
/return


Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return


Sub Event_OutOfBait
   /echo Bummer.. we're out of bait
   /varset op_int_ExitMacro 1
/return


Sub Event_PrimaryHand
   /call FindPole
/return


Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return


Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|----------------------------------------------------------------------------
| End Event Sub Routines         
|----------------------------------------------------------------------------

If you have a Anizok's Bait Dispenser here a mac for making bait with it using Fresh Fish

Rich (BB code):
| Bait Making with Anizok's Bait Dispenser v1.0 12/31/2013
| Credit: Anon_Friend
| Credit:Sinn69
|
|
|
| ***Must have your Anizok's Bait Dispenser in Bag Slot 10

Sub Main
/declare BaitTotal int outer 3000
/echo Making Bait
/if (!${Window[Pack10].Open}) /nomodkey /itemnotify pack10 rightmouseup
:Loop
/if ((${FindItemCount[Homemade bait]} < ${BaitTotal}) && ${FindItemCount[Fresh Fish]}) {
/ctrlkey /itemnotify ${FindItem[=Fresh Fish].InvSlot} leftmouseup
/delay 2s
/nomodkey /itemnotify in pack10 1 leftmouseup
/delay 2s
/combine pack10
/delay 2s
/autoinv


}
/if ((${FindItemCount[Homemade bait]} >= ${BaitTotal}) || !${FindItemCount[Fresh Fish]}) {
/goto :End
}
/goto :Loop

:End
/return
Still working on the bait mac. Let me know if its working ok.
 
Joined
Jan 20, 2006
Likes
28
RedCents
177¢
#6
Maskoi, I nominate these 2 macros to be added to our MQ2 Release.
 

BlankStare

New member
Joined
Oct 18, 2013
Likes
4
RedCents
698¢
#7
Fixed Hyperfish to find and equip a fishing pole if yours broke. I have fished 20k+ Raxil Fish with this mac and gotten 12+ toon 200 skill in fishing.
What is the secret to having it cast a new fishing pole from the Fisherman's Companion? Does the clicky need to be in a #1 slot in a bag?
 

g_kinz

New member
Joined
Mar 10, 2013
Likes
0
RedCents
313¢
#8
yeah thats why i guit messing with fishing macros would never summon a new one if it broke
 
Joined
Dec 17, 2011
Likes
5
RedCents
446¢
#9
I never used a fisherman's companion, even tho the macro supports it, i buy 10 fishing poles in PoK off the vendors. The most poles i have ever broken was 5 in a 24hour period. the Hyperfish mac will stop if your bags fill to the max with Fish. there is also ini support.

Rich (BB code):
[Destroy]
Loot1=Tattered Cloth Sandal
Loot2=Fish Scales
Loot3=Rusty Dagger

[Bait]
Loot1=Fresh Fish
Loot2=Large Fetid Bass

[The Undershore]
Loot1=Tiny Blind Cave Fish

[Neriak - Commons]
Loot1=Fresh Fish
Loot2=Fish Scales

[The Plane of Nightmares]
Loot1=Fresh Fish
Loot2=Fish Scales
Loot3=Crawdad
Loot4=Waterleaf Scale
Loot5=Nightmare Cichlid
Hope it helps
 
Joined
Nov 22, 2010
Likes
18
RedCents
274¢
#10
Thanks sinn, I'll give er a try. I have to say I never did figure out how to make it summon a new pole, but I can just buy like 12 poles. I think the breakage that occurred was because one of my guys was 0 fishing. He's getting a lot better and breaking less poles. Thanks for all the replies and sorry if I posted anything that wasn't supposed to be in the general forum.

- - - Updated - - -

I made one specifically for fisherman's companion users, I tweaked the code a bit, and added back in the subroutine for summoning or using a brell's fishin' pole. It will cast the pole no matter what inventory slot the companion is in, at least it does for me because i own VOA. I told you i'm not a coder but I can usually tweak things a bit and make it work how I want. By the way this macro is handling foraged items too, amazingly nice work sinn I am going to RC you asap! I just turn melee on and /melee forage=1 and it does the rest. As well as fishing, this allows me to forage Al-metes and Essence of Alaris' for even more baking options and essences for pottery.

Here's the code, I owe it all to Sinn69!

Remember this one is ONLY for Fisherman's companion users, you can keep the companion in your inventory, or summon a few poles before you head out, it will search for the brell's pole and equip it instead of regular poles. I named it Hyperfish2 but you can name it whatever you want. I turned off the STATS btw because I really don't care or want the spam of how many times I spilled my beer etc. If you want you can change that setting back to 1. The only problem I still have is I put Oseka's messenger under the destroy variables in the INI and it still keeps it, but at least it doesn't keep daggers and other junk anymore. I can deal with just having to destroy a few stacks of fish I don't want. I ran it all night and had like 10 stacks of oseka's messenger when I woke up so i just dropped them.

Rich (BB code):
|----------------------------------------------------------------------------
|     Name:   HyperFish.Mac                                       
|     Developer: Fibby                                             
|     Date: 11/27/2004                                 
|----------------------------------------------------------------------------
|Purpose:   HyperFish is designed to be the next generation "smart" fishing   
|         automation macro.  It will auto replace any broken poles that   
|         may have met their demise at your hands either by searching your
|         inventory for one or summoning one from a fishermans companion    
|                                                         
|         This Macro is INI driven for it's "loot" tables on a per zone   
|         basis.  However, if there's not a section for the zone you want   
|         to fish in the INI file, then it will create a new section for    
|         your benifit.                                         
|                                                         
|         If there are no loot items defined in the zone section of the    
|         ini file, then the macro will assume that you want to "keep"   
|         all things that are edible and drop all "non food" items.  If   
|         in happens to fish a no-drop non food item, and that item is    
|         not declared in your loot tables, then it will attempt to        
|         destroy that item by default.  You can of course change that     
|         flag if you wish.                                    
|                                                         
| Depends:   HyperLoot.ini - Same directory as this macro               
|----------------------------------------------------------------------------
|Credits:   This script was inspired by panther and his adv_fish macro      
|         while it is an outstanding macro.. I wanted something more...   
|----------------------------------------------------------------------------
|Revisions:
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10


|----------------------------------------------------------------------------
| Event Declarations         
|----------------------------------------------------------------------------

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."


|----------------------------------------------------------------------------
| Main Macro Code            
|----------------------------------------------------------------------------

Sub Main

   |------------------------------------------------------------------------
    |User Settings = Set these please (1 for yes, 0 for no)   
   |------------------------------------------------------------------------
   /declare UserVar_DisplayStats   int outer 0
   /declare UserVar_CampOutFinish   int   outer 0
   /declare UserVar_DestroyNoDrop   int outer 0

   |------------------------------------------------------------------------
    | Counter data holders here            
   |------------------------------------------------------------------------
   /declare int_BrokenPole      int outer  0
   /declare int_ItemsDropped   int outer  0
   /declare int_LostBait      int outer  0
   /declare int_NothingCaught   int outer  0
   /declare int_SpillBeer      int outer  0
   /declare int_TotalCasts      int outer  0

   |------------------------------------------------------------------------
    | Operational Variables for this macro   
   |------------------------------------------------------------------------
   /declare op_int_GotLootArray   int outer 1
   /declare op_int_GotFishComp      int outer 1
   /declare op_int_FishByLoot      int outer 1
   /declare op_int_LoopCounter      int outer 0
   /declare op_int_ExitMacro      int outer 0
   
   /echo Starting up ${Macro}
    | Check our inventory for Fish Comp.   
   /for op_int_LoopCounter 1 to 8
      /if (${InvSlot[pack${op_int_LoopCounter}].Item.Name.Equal["Fisherman's Companion"]}) {
         /echo Whoopie!! Found our Fisherman's Companion!
         /varset op_int_GotFishComp 1
         /goto :BreakForFindFishComp
      }
   /next op_int_LoopCounter
   :BreakForFindFishComp
   /varset op_int_LoopCounter 3
   
   |------------------------------------------------------------------------
    | Load in Loot Table.                
   |------------------------------------------------------------------------
   /call ReadINI HyperFish.ini "${Zone.Name}" Loot
    /varset op_int_GotLootArray ${Macro.Return}

   |------------------------------------------------------------------------
   | Inventory anything we may have on our cursor before starting
   |------------------------------------------------------------------------
   /autoinventory
   
   |------------------------------------------------------------------------
   | Heart of the whole fishing routine..   
   |------------------------------------------------------------------------
   :Fish
   /if (${op_int_ExitMacro}==1) /goto :ExitMacro
   /call GMCheck
   /delay 5s
   /if (${Cursor.ID}) /call Looting
   /if (${Me.AbilityReady[Fishing]}) {
       /delay 1s
       /varcalc int_TotalCasts ${int_TotalCasts}+1
       /doability Fishing
   }
   /doevents
   /goto :Fish
|----------------------------------------------------------------------------
| End our Macro      
|----------------------------------------------------------------------------
:ExitMacro
   /echo -= Total Stats for this Fishing Trip =-
   /call DisplayStats
   /if (${UserVar_CampOutFinish}=1) {
      /sit off
      /sit on
      /camp
   }
/return



|----------------------------------------------------------------------------
| Begin Support sub routines      
|----------------------------------------------------------------------------
| ReadINI: Stolen from adv_fish code, modified to return 1 if
|         loot table built or 0 of loot table not built.
|----------------------------------------------------------------------------
Sub ReadINI(FileName, ZoneName, KeyRoot)
   /declare loc_int_returnValue int local 0
   /echo Attempting to Read "${ZoneName}" Section from ${FileName}
   /delay 1s
   
   /if (${Ini[${FileName}, ${ZoneName}, -1, NO].Equal[NO]}) {
      /echo Zone "${ZoneName}" Not found, Creating it now...
      /Ini ${FileName}, ${ZoneName}, -1, -1
      /delay 1s
        | Obviously, since we didn't have a section, we're not going to
        | have a loot section.. so we can end now
      /return loc_int_returnValue
   }
   
   /declare nValues     int local  1
   /declare nArray      int local  0
    /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}
   
    :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
    /goto :CounterLoop
   
    :MakeArray
   /if (!${nValues}) {
      | We didn't find any values in our loot tables.. so we'll just exit now
      /return loc_int_returnValue
   } else {
      | Must have found some values.. set our return variable now
      /varset loc_int_returnValue 1
   }
   /if (${FileName.Equal["HyperFish.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HyperFish.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 10s
/return loc_int_returnValue

|----------------------------------------------------------------------------
|SUB: Display fishing stats.
|----------------------------------------------------------------------------
Sub DisplayStats
   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far:
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo   ${RV_LootArray[${nArray}]} -  ${Int[${RV_LootStats[${nArray}]}]}
      /next nArray
   }
   /echo
   /echo Bad fishing so far:
   /echo    Broken Poles - ${int_BrokenPole}
   /echo   Items Dropped - ${int_ItemsDropped}
   /echo       Lost Bait - ${int_LostBait}
   /echo  Nothing Caught - ${int_NothingCaught}
   /echo    Spilled Beer - ${int_SpillBeer}
/return

|----------------------------------------------------------------------------
|SUB: Main Looting routine.. based on adv_fish, heavily modified.
|----------------------------------------------------------------------------
Sub Looting
   /declare LootCheck   int inner 0
   
   /if (${op_int_GotLootArray}==0) {
      /if (${Cursor.Type.Equal["Food"]}) {
         /autoinventory
      }
   } else {   
      /for LootCheck 1 to ${RV_LootArray.Size}
         /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
            /echo Keeping a ${Cursor.Name}... WOOT!
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
            /autoinventory
         }
      /next LootCheck
   }
   /if (${Cursor.ID}) {
      /if (${Cursor.NoDrop}) {
         /if (${UserVar_DestroyNoDrop}==0) {
            /drop
         } else {
            /autoinventory
         }
      } else {
         /echo Dropping a ${Cursor.Name}...
         /drop
         /varcalc int_ItemsDropped ${int_ItemsDropped}+1
      }
   }
   /if (${UserVar_DisplayStats}==1) /call DisplayStats
/return

|----------------------------------------------------------------------------
|SUB: Pole replacement logic
|----------------------------------------------------------------------------
| - vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
| - SUB: Check Pole
Sub FindPole
   /declare lv_int_Return int local 2
   /declare lv_int_LoopCounter int local 2
   /if (${op_int_GotFishComp}==1) {
      | We have our companion.. summon our pole
      /cast item "Fisherman's Companion"
      /delay 11s
      /autoinventory
| We don't have a companion, find a fishing pole in inventory
| - Add check for Brell's Fishing Pole and Fisherman's Companion
    :CheckPoleLoop
    /target ${Me}
    /if (${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]} == 1) /return
    /if (${FindItemCount[=Brell's Fishin' Pole]} == 0) {
        /delay 5
        /varset ItemToBuy Fishing Pole
        /varset Quantity 1
        /call Buy
        }
        /delay 2s
    /if (${FindItemCount[=Brell's Fishin' Pole]} > 0) {
        /keypress OPEN_INV_BAGS
        /delay 2s
        /itemnotify ${FindItem[Brell's Fishin' Pole].InvSlot} leftmouseup
        /delay 5
        /itemnotify mainhand leftmouseup
        /delay 5
    | - Anything in the primary hand (mainhand) will then be put in inventory.
        /autoinventory
        /delay 5
        }
        /keypress CLOSE_INV_BAGS
        /return
| - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

|----------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|----------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|----------------------------------------------------------------------------
| End Support sub routines         
|----------------------------------------------------------------------------

|----------------------------------------------------------------------------
| Begin Event Sub Routines         
|----------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_NeedPole
   /call FindPole
/return


Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return


Sub Event_OutOfBait
   /echo Bummer.. we're out of bait
   /varset op_int_ExitMacro 1
/return


Sub Event_PrimaryHand
   /call FindPole
/return


Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return


Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|----------------------------------------------------------------------------
| End Event Sub Routines         
|----------------------------------------------------------------------------
 

Dutch_SK

New member
Joined
Aug 21, 2013
Likes
1
RedCents
1,663¢
#11
Awesome mac Sinn69!

When I use the bait mac it gives the following error:

Rich (BB code):
[/itemnotify] Invalid item slot 'null'
It cant seem to find the Fresh Fish once its inside a bag :S

Any clue?
 

Maskoi

So old and salty he grew scales
Moderator
Joined
Sep 28, 2005
Likes
623
RedCents
67,729¢
#12
that command has changed in the source code. the macro has to be updated PM me to remind me and i will look at it tonight
 
Joined
Feb 18, 2011
Likes
0
RedCents
#14
Does anyone have a hyperfish.ini they are willing to share? The compile does not seem to have one.
 

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#16
how do i use hyperfish do i have to manualy make a file or just type ingame command and refreash like kiss ?


Ok got the mac working but it just drops everything i made a hyperfish.ini and set up loot list but nope :(


everything is just being droped on floor
 
Last edited:
Joined
Feb 19, 2016
Likes
4
RedCents
310¢
#17
Ya the ini portion of it is not working. If the item on your cursor says food, it is added to inventory. If not it is dropped. Also would be nice to have it work with Anizok's Bait Dispenser like it does with Fisherman's Companion.
 

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#18
hiya guys im trying to use the Adv_fishing mac and when i run it i get the message saying

"Zone is not a valid Section for FILE:Fishingloot.ini, Ending macro.

followed by

MQ" No Loot Table Created Please Create One



Btw i do have a Fishinhloot.ini file that i made ...
 
Last edited:
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#19
AutoFish.mac by hoosierbilly May 2017

AFK protected: Autoloads and sets up MQ2Posse to /exit the game if any strangers approach within 750.
Uses ninjadvloot.inc v6.06 to manage your catches
Auto equips fishing poles, if have extras
Uses fisherman's companion to summon fishing poles, if you have it
Uses Anizok's Bait Dispenser to create bait, if you have it
fresh fish is the default for creating bait, this can be changed using the baitfish variable
will summon food and drink using Fresh Cookie Dispenser and Spiced Iced Tea Dispenser / Warm Milk Dispenser, if you have them


NOTICE: I do not actually have the fisherman's companion or Anizok's Bait Dispenser. These features are completely untested.

Good luck



Bad macro removed... scroll down a bit to find a new Autofish.mac
 
Last edited:

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#20
Sent thanks !

This is nice but at the moment it just picks up my fishing companion and stops the macro
 
Joined
Jan 19, 2015
Likes
3
RedCents
329¢
#21
Simple fishing macro that has lasted for years without needing to be updated... because it is simple. :)
Fishing.mac
Rich (BB code):
#turbo 20

|Forage Macro by Wirlin
|Auto adds items foraged to Fishing.ini
|Set items to 0 to have them destroyed
|Set items to 1 to have them kept
|to write to ini
|/ini "filename" "keyname" "valuename" "value"
|example
|/ini "Fishing.ini "Default" "MaxSave" "1"
|to read from ini
|string Ini[filename,section,key,default]
|example 
|/varset ItemSetting ${Ini[Fishing.ini,FishingList,${Cursor.Name},${NotFound}]}
|Since ${NotFound} is -1 it skips that part and puts in the new value in that place
|

#event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"

Sub Main

/declare DefaultMaxSave int outer 

    /varset DefaultMaxSave ${Ini[Fishing.ini,Default,MaxSave,${NotFound}]} 
    /if (${DefaultMaxSave}==${NotFound}) { 
       /ini "Fishing.ini" "Default" "MaxSave" "1" 
        /varset DefaultMaxSave 1
     }

   :Loop
      /call CheckPole
      /doevents
      /delay 1s
      /if (${Cursor.ID}) /call ItemFished
      /if (${Me.AbilityReady[Fishing]}) /doability Fishing
      /delay 68
      /if (${Cursor.ID}) /call ItemFished
      /delay 10s
   /goto :Loop
/delay 10s
/goto :Loop
/return

Sub ItemFished

   /declare ItemSetting int local
   /declare NotFound int local
 
   /varset NotFound -1
 
     :Loot
|Look up item in Fishing.ini

   /varset ItemSetting ${Ini[Fishing.ini,FishingList,${Cursor.Name},${NotFound}]}
   /delay 1s

| If the item isn't in the .ini file then add it.
   /if (${ItemSetting}==${NotFound}) {
     /ini "Fishing.ini" "FishingList" "${Cursor.Name}" "${DefaultMaxSave}"
     /varset ItemSetting ${DefaultMaxSave}
     /delay 1s
	}
| If keeping it stash it in a bag otherwise destroy it
  /if (${ItemSetting}>0) {
     /popup Keeping ${Cursor.Name}
     /autoinventory
     /delay 1s
        } else {
     /popup Destroying ${Cursor.Name}
     /destroy
     /delay 1s 
   }
/return

Sub CheckPole
   /if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]}) /return
   /echo Digging in your pants to find your pole.
   /delay 1s
   /keypress OPEN_INV_BAGS
   /delay 1s

/if (${FindItemCount[Fishing Pole]}>0) {
		/delay 1s
		/nomodkey /ctrl /itemnotify ${FindItem[Fishing Pole].InvSlot} leftmouseup
		/delay 1s
		/nomodkey /itemnotify mainhand leftmouseup
		/delay 1s
		/autoinv
		/delay 1s
		/keypress CLOSE_INV_BAGS
		/echo ${Me.Inventory[mainhand]} in hand.
		/return
	}
/if (${FindItemCount[Brell's Fishin' Pole]}>0) {
		/delay 1s
		/nomodkey /ctrl /itemnotify ${FindItem[Brell's Fishin' Pole].InvSlot leftmouseup
		/delay 1s
		/nomodkey /itemnotify mainhand leftmouseup
		/delay 1s
		/autoinv
		/delay 1s
		/keypress CLOSE_INV_BAGS
		/echo ${Me.Inventory[mainhand]} in hand.
		/return
	}
/if (${FindItemCount[Fisherman's Companion]}>0) {
		/delay 1s
		/nomodkey /ctrl /itemnotify ${FindItem[Fisherman's Companion].InvSlot} rightmouseup
		/delay 12s
		/nomodkey /itemnotify mainhand leftmouseup
		/delay 1s
		/autoinv
		/delay 1s
		/keypress CLOSE_INV_BAGS
		/echo ${Me.Inventory[mainhand]} in hand.
		/return
	}
   /echo Your pole has gone limp.
/endmacro

Sub Event_BrokenPole
	/call CheckPole
/return

Sub Event_NoBait

/delay 1s
/if (${FindItemCount[Hagar Brand Fishing Pail]}>0) {
		/keypress OPEN_INV_BAGS
		/delay 1s
		/nomodkey /itemnotify ${FindItem[Hagar Brand Fishing Pail].InvSlot} rightmouseup
		/delay 6s
		/autoinv
		/keypress CLOSE_INV_BAGS
		/return
	} else {
	/delay 1s
	/echo Out of Bait
	}
   /endmacro

/return
/end
Fishing.ini
Rich (BB code):
[FishingList]
Fish Scales=0
Fresh Fish=0
Despair Chub=1
Rusty Dagger=0
Tattered Cloth Sandal=0
Thullian Mudskipper=1
Rujarkian Chub=1
Raxil Fish=1
Oseka's Messenger=1
[Default]
MaxSave=1
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#22
Sent thanks !

This is nice but at the moment it just picks up my fishing companion and stops the macro
Find this line:
Rich (BB code):
/itemnotify "fisherman's companion" leftmouseup
change it to

Rich (BB code):
/itemnotify "fisherman's companion" rightmouseup

I will correct my earlier post and undertake special remedial training on the difference between right and left...


EDIT: This was not the only problem... a corrected macro is posted below, scroll down a bit
 
Last edited:
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#23
Anyone have a Anizok's bait dispenser they would be willing to donate for testing? I don't have anyone with tinkering skills.
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#24
Hurray: I finished the quest and have a Fishermen's Companion now. I also fixed the macro so it will actually summon and use Brell's Fishin' Pole.

It will take a while for me to skill up a tinker, so if anyone has a Anizok's bait dispenser they would be willing to lend me for testing that would speed things along a lot faster.


Updated to clear cursor if something is stuck:

Rich (BB code):
|**
AutoFish.mac by hoosierbilly  May 2017

AFK protected: Autoloads and sets up MQ2Posse to /exit the game if any strangers approach within 750.
Uses ninjadvloot.inc v6.06 to manage your catches
Uses fisherman's companion to summon fishing poles, if you have it
Uses Anizok's Bait Dispenser to create bait, if you have it ** Must be in bag slot 10 **
fresh fish is the default for creating bait, this can be changed using the baitfish variable
will summon food and drink using Fresh Cookie Dispenser and Spiced Iced Tea Dispenser / Warm Milk Dispenser, if you have them

**|

#include ninjadvloot.inc
	
#Event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#Event BrokenPole "#*#You need to put your fishing pole in your primary hand.#*#"
#Event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"
#Event clearcursor "#*#You can't fish while holding something#*#"
#Event camp "#*#prepare your camp#*#"
#Event MilkandCookie "#*#You are low on #1#.#*#"
#Event MilkandCookie "#*#You are out of #1#.#*#"

| --------------------------------------------------------------------------------------------
| SUB: Main
| --------------------------------------------------------------------------------------------
	Sub Main
	/declare FeedSpam	timer	outer 0
	/declare baitfish	string	outer	fresh fish

	/call SetupAdvLootVars
	
	/if (${Plugin[MQ2Log].Name.Length}) /mlog off
	/if (!${Plugin[MQ2Posse].Name.Length}) /plugin mq2posse
	/if (${Plugin[MQ2Posse].Name.Length}) /posse on
	/if (${Plugin[MQ2Posse].Name.Length}) /posse radius 750
	/if (${Plugin[MQ2Posse].Name.Length}) /posse zradius 30
	/if (${Plugin[MQ2Posse].Name.Length}) /posse friendnotify off
	/if (${Plugin[MQ2Posse].Name.Length}) /posse guild off
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmddel 1	
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmddel 1
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmdadd "/endmac"
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmdadd "/exit"
	/if (${Plugin[MQ2Log].Name.Length}) /mlog on

	/call Event_BrokenPole
	/echo You are using ${baitfish} to create bait.
:Fish
	/if (${Me.AbilityReady[Fishing]}) /doability Fishing
	/delay 10
	/doevents
	/goto :Fish
	/return

| --------------------------------------------------------------------------------------------
| SUB: Event_BrokenPole
| --------------------------------------------------------------------------------------------
Sub Event_BrokenPole

	/if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]}||${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}) /return

	/if (${FindItem[=Fisherman's Companion].ID}) {
		/itemnotify "Fisherman's Companion" rightmouseup
		/delay 10s
		/delay 2s ${Cursor.ID}
		/windowstate InventoryWindow open
		/delay 1s
		/notify InventoryWindow InvSlot13 leftmouseup
		/delay 3s ${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}
		/if (${Cursor.ID}) /autoinventory
		/delay 2s !${Cursor.ID}
		/windowstate InventoryWindow close
		/delay 2s !${Cursor.ID}
		/return
	}
	
	/if (${FindItemCount[fishing pole]}) {
		/windowstate InventoryWindow open
		/keypress OPEN_INV_BAGS
		/delay 1s
		/itemnotify "${FindItem[fishing pole]}" leftmouseup
		/delay 2s ${Cursor.ID}
		/notify InventoryWindow InvSlot13 leftmouseup
		/delay 3s ${Me.Inventory[mainhand].Name.Find[Fishing Pole]}
		/if (${Cursor.ID}) /autoinventory
		/delay 2s !${Cursor.ID}
		/windowstate InventoryWindow close
		/keypress CLOSE_INV_BAGS
		/return
	}
	/echo  You can't fish without a fishing pole in your primary hand.
	/end
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_NoBait
| --------------------------------------------------------------------------------------------
Sub Event_NoBait

	/if (${FindItem[=Anizok's Bait Dispenser].ItemSlot}==32 && ${FindItemCount[=${baitfish}]}) {
		/keypress OPEN_INV_BAGS
		/ctrlkey /itemnotify "${baitfish}" leftmouseup
		/delay 2s ${Cursor.ID}
		/nomodkey /itemnotify in pack10 1 leftmouseup
		/delay 2s !${Cursor.ID}
		/combine pack10
		/delay 2s ${Cursor.ID}
		/autoinventory
		/delay 2s !${Cursor.ID}
		/keypress CLOSE_INV_BAGS
	}
	/if (${FindItemCount[bait]}) /return
	/echo You must buy more bait!
	/end
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_clearcursor
| --------------------------------------------------------------------------------------------
Sub Event_clearcursor
	/if (${Cursor.ID}) /autoinventory
	/delay 2s !${Cursor.ID}
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_MilkandCookie
| --------------------------------------------------------------------------------------------
Sub Event_MilkandCookie(S0,S1)

	/if (${FindItem[=Spiced Iced Tea Dispenser].ID} && ${FindItemCount[=Spiced Iced Tea]}<3) {
		/casting 107808 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${FindItem[=Warm Milk Dispenser].ID} && ${FindItemCount[=Warm Milk]}<3) {
		/casting 52191 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${FindItem[=Fresh Cookie Dispenser].ID} && ${FindItemCount[=Fresh Cookie]}<3) {
		/casting 71979 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${Cursor.ID}) /autoinventory
	/if (!${FindItem[=Spiced Iced Tea Dispenser].ID} && !${FindItem[=Warm Milk Dispenser].ID} && !${FindItem[=Fresh Cookie Dispenser].ID} && ${Me.Grouped} && !${FeedSpam}) {
		/gsay I'm out of ${S1}, anyone have any to spare
		/varset FeedSpam 10s
	}
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_camp
| --------------------------------------------------------------------------------------------
Sub Event_camp
/end 
	
/return
 

Attachments

Last edited:

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#25
still nice work but it dont seem to want to place raxil fish in my bags it holds onto them and blocks recasting

- - - Updated - - -

i have one but im on AB if you have a heroic u make there there maby ?
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#26
still nice work but it dont seem to want to place raxil fish in my bags it holds onto them and blocks recasting
Can't imagine why it would do that with Raxil fish. I'll do some fishing for Raxil and see if I can reproduce the issue.
Curious what is your loot.ini entry for the raxil fish?

i have one but im on AB if you have a heroic u make there there maby ?
If your talking about the bait dispenser, I'd be just as happy if you could confirm it works. It should activate and convert one fish to bait when you try to fish without bait, assuming you have one fish to chop into bait.
Almost forgot... IMPORTANT - the bait dispenser must be in top level inventory slot number 10, the lowest right hand slot.
 

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#27
works fine
but i seem to not want to place raxil fish in a bag will it use loot.ini i will add it now

- - - Updated - - -

[R]
|======================================================================|
Runner's Waterpouch=Keep
Red Santug Cap Ornament=Keep
Raxil Fish=Keep



Thats is the R section of my loot.ini
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#28
I am not able to reproduce the problem with raxil fish...

I did however, add a subroutine to clear your cursor if something is stuck on it. Here's the latest:

Rich (BB code):
|**
AutoFish.mac by hoosierbilly  May 2017

AFK protected: Autoloads and sets up MQ2Posse to /exit the game if any strangers approach within 750.
Uses ninjadvloot.inc v6.06 to manage your catches
Uses fisherman's companion to summon fishing poles, if you have it
Uses Anizok's Bait Dispenser to create bait, if you have it ** Must be in bag slot 10 **
fresh fish is the default for creating bait, this can be changed using the baitfish variable
will summon food and drink using Fresh Cookie Dispenser and Spiced Iced Tea Dispenser / Warm Milk Dispenser, if you have them

**|

#include ninjadvloot.inc
	
#Event BrokenPole "#*#You can't fish without a fishing pole, go buy one.#*#"
#Event BrokenPole "#*#You need to put your fishing pole in your primary hand.#*#"
#Event NoBait "#*#You can't fish without fishing bait, go buy some.#*#"
#Event clearcursor "#*#You can't fish while holding something#*#"
#Event camp "#*#prepare your camp#*#"
#Event MilkandCookie "#*#You are low on #1#.#*#"
#Event MilkandCookie "#*#You are out of #1#.#*#"

| --------------------------------------------------------------------------------------------
| SUB: Main
| --------------------------------------------------------------------------------------------
	Sub Main
	/declare FeedSpam	timer	outer 0
	/declare baitfish	string	outer	fresh fish

	/call SetupAdvLootVars
	
	/if (${Plugin[MQ2Log].Name.Length}) /mlog off
	/if (!${Plugin[MQ2Posse].Name.Length}) /plugin mq2posse
	/if (${Plugin[MQ2Posse].Name.Length}) /posse on
	/if (${Plugin[MQ2Posse].Name.Length}) /posse radius 750
	/if (${Plugin[MQ2Posse].Name.Length}) /posse zradius 30
	/if (${Plugin[MQ2Posse].Name.Length}) /posse friendnotify off
	/if (${Plugin[MQ2Posse].Name.Length}) /posse guild off
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmddel 1	
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmddel 1
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmdadd "/endmac"
	/if (${Plugin[MQ2Posse].Name.Length}) /posse cmdadd "/exit"
	/if (${Plugin[MQ2Log].Name.Length}) /mlog on

	/call Event_BrokenPole
	/echo You are using ${baitfish} to create bait.
:Fish
	/if (${Me.AbilityReady[Fishing]}) /doability Fishing
	/delay 10
	/doevents
	/goto :Fish
	/return

| --------------------------------------------------------------------------------------------
| SUB: Event_BrokenPole
| --------------------------------------------------------------------------------------------
Sub Event_BrokenPole

	/if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]}||${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}) /return

	/if (${FindItem[=Fisherman's Companion].ID}) {
		/itemnotify "Fisherman's Companion" rightmouseup
		/delay 10s
		/delay 2s ${Cursor.ID}
		/windowstate InventoryWindow open
		/delay 1s
		/notify InventoryWindow InvSlot13 leftmouseup
		/delay 3s ${Me.Inventory[mainhand].Name.Find[Brell's Fishin' Pole]}
		/if (${Cursor.ID}) /autoinventory
		/delay 2s !${Cursor.ID}
		/windowstate InventoryWindow close
		/delay 2s !${Cursor.ID}
		/return
	}
	
	/if (${FindItemCount[fishing pole]}) {
		/windowstate InventoryWindow open
		/keypress OPEN_INV_BAGS
		/delay 1s
		/itemnotify "${FindItem[fishing pole]}" leftmouseup
		/delay 2s ${Cursor.ID}
		/notify InventoryWindow InvSlot13 leftmouseup
		/delay 3s ${Me.Inventory[mainhand].Name.Find[Fishing Pole]}
		/if (${Cursor.ID}) /autoinventory
		/delay 2s !${Cursor.ID}
		/windowstate InventoryWindow close
		/keypress CLOSE_INV_BAGS
		/return
	}
	/echo  You can't fish without a fishing pole in your primary hand.
	/end
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_NoBait
| --------------------------------------------------------------------------------------------
Sub Event_NoBait

	/if (${FindItem[=Anizok's Bait Dispenser].ItemSlot}==32 && ${FindItemCount[=${baitfish}]}) {
		/keypress OPEN_INV_BAGS
		/ctrlkey /itemnotify "${baitfish}" leftmouseup
		/delay 2s ${Cursor.ID}
		/nomodkey /itemnotify in pack10 1 leftmouseup
		/delay 2s !${Cursor.ID}
		/combine pack10
		/delay 2s ${Cursor.ID}
		/autoinventory
		/delay 2s !${Cursor.ID}
		/keypress CLOSE_INV_BAGS
	}
	/if (${FindItemCount[bait]}) /return
	/echo You must buy more bait!
	/end
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_clearcursor
| --------------------------------------------------------------------------------------------
Sub Event_clearcursor
	/if (${Cursor.ID}) /autoinventory
	/delay 2s !${Cursor.ID}
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_MilkandCookie
| --------------------------------------------------------------------------------------------
Sub Event_MilkandCookie(S0,S1)

	/if (${FindItem[=Spiced Iced Tea Dispenser].ID} && ${FindItemCount[=Spiced Iced Tea]}<3) {
		/casting 107808 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${FindItem[=Warm Milk Dispenser].ID} && ${FindItemCount[=Warm Milk]}<3) {
		/casting 52191 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${FindItem[=Fresh Cookie Dispenser].ID} && ${FindItemCount[=Fresh Cookie]}<3) {
		/casting 71979 item -invis
		/delay 2s ${Cursor.ID}
		/delay 5
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${Cursor.ID}) /autoinventory
	}
	/if (${Cursor.ID}) /autoinventory
	/if (!${FindItem[=Spiced Iced Tea Dispenser].ID} && !${FindItem[=Warm Milk Dispenser].ID} && !${FindItem[=Fresh Cookie Dispenser].ID} && ${Me.Grouped} && !${FeedSpam}) {
		/gsay I'm out of ${S1}, anyone have any to spare
		/varset FeedSpam 10s
	}
/return

| --------------------------------------------------------------------------------------------
| SUB: Event_camp
| --------------------------------------------------------------------------------------------
Sub Event_camp
/end 
	
/return
 

Attachments

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#29
ahhh okie dispenders cant unstack fresh fish so it keeps looping

im guessing in event nobait it needs a ctrl click 1 from stack somehow i dont understand how to write this stuff sorry :(

also the delay in placing an item in bags or the "speed" at wich it recasts fishing means im still holing something so a delay/timer needs increasing/shortening somewhere
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#30
dang.... It should only pick up one fish, place it in the container in slot 10, combine and place the bait in your inventory.

Make sure your bait dispenser is empty when you start... Gonna have to figure out how to check for that.
 

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#31
p.s sub routine for cursor clear fixed bagging issue
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#32
ahhh okie dispenders cant unstack fresh fish so it keeps looping

im guessing in event nobait it needs a ctrl click 1 from stack somehow i dont understand how to write this stuff sorry :(

also the delay in placing an item in bags or the "speed" at wich it recasts fishing means im still holing something so a delay/timer needs increasing/shortening somewhere
ok...

Added a delay in the doability fish section to account for lag.
Added a check to ensure Anizok's Bait Dispenser is empty before attempting to make bait.
Added a check to ensure Anizok's Bait Dispenser is in the right inventory slot.
 

Attachments

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#33
will have a go when i get home tonight !


ok just started running this mac again still getting a you cant fish while holding something so fishing only works every other go.i guess thats just my lag

but bait dispenser seems to work nicley now tho just letting it cycle a few more times
 
Last edited:
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#34
will have a go when i get home tonight !


ok just started running this mac again still getting a you cant fish while holding something so fishing only works every other go.i guess thats just my lag

but bait dispenser seems to work nicley now tho just letting it cycle a few more times
look for this section of code around line 48-52 ish

Rich (BB code):
:Fish
	/if (${Me.AbilityReady[Fishing]}) /doability Fishing
	/delay 10
	/doevents
	/delay 2s !${Cursor.ID}
	/goto :Fish
	/return
change the /delay 2s !${Cursor.ID} to /delay 5s !${Cursor.ID}

see if that extra time in the delay helps any. Hate to think fishing works only every other time.
 
Joined
Oct 18, 2013
Likes
4
RedCents
698¢
#35
I modified HyperFish some time ago to suit my needs. I called it "HyperFish2.mac" and it worked great for my level 100s on my main server, and my low LJ/RF TLP toons.

Rich (BB code):
|----------------------------------------------------------------------------
|     Name:   HyperFish.Mac                                       
|     Developer: Fibby          edit by Fen, autoinv instead of destroy nodrop                                   
|     Date: 11/27/2004                                 
|----------------------------------------------------------------------------
|Purpose:   HyperFish is designed to be the next generation "smart" fishing   
|         automation macro.  It will auto replace any broken poles that   
|         may have met their demise at your hands either by searching your
|         inventory for one or summoning one from a fishermans companion    
|                                                         
|         This Macro is INI driven for it's "loot" tables on a per zone   
|         basis.  However, if there's not a section for the zone you want   
|         to fish in the INI file, then it will create a new section for    
|         your benifit.                                         
|                                                         
|         If there are no loot items defined in the zone section of the    
|         ini file, then the macro will assume that you want to "keep"   
|         all things that are edible and drop all "non food" items.  If   
|         in happens to fish a no-drop non food item, and that item is    
|         not declared in your loot tables, then it will attempt to        
|         destroy that item by default.  You can of course change that     
|         flag if you wish.                                    
|                                                         
| Depends:   HyperLoot.ini - Same directory as this macro               
|----------------------------------------------------------------------------
|Credits:   This script was inspired by panther and his adv_fish macro      
|         while it is an outstanding macro.. I wanted something more...   
|----------------------------------------------------------------------------
|Revisions:
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10


|----------------------------------------------------------------------------
| Event Declarations         
|----------------------------------------------------------------------------

#event BrokenPole "Your fishing pole broke!"
#event LostBait "You lost your bait!"
#event NeedPole "You can't fish without a fishing pole, go buy one."
#event NothingCaught "You didn't catch anything."
#event OutOfBait "You can't fish without fishing bait, go buy some."
#event PrimaryHand "You need to put your fishing pole in your primary hand."
#event SkillUp "You have become better at #1#! (#2#)"
#event SpillBeer "You spill your beer while bringing in your line."


|----------------------------------------------------------------------------
| Main Macro Code            
|----------------------------------------------------------------------------

Sub Main

   |------------------------------------------------------------------------
    |User Settings = Set these please (1 for yes, 0 for no)   
   |------------------------------------------------------------------------
   /declare UserVar_DisplayStats   int outer 1
   /declare UserVar_CampOutFinish   int   outer 1
   /declare UserVar_DestroyNoDrop   int outer 1

   |------------------------------------------------------------------------
    | Counter data holders here            
   |------------------------------------------------------------------------
   /declare int_BrokenPole      int outer  0
   /declare int_ItemsDropped   int outer  0
   /declare int_LostBait      int outer  0
   /declare int_NothingCaught   int outer  0
   /declare int_SpillBeer      int outer  0
   /declare int_TotalCasts      int outer  0

   |------------------------------------------------------------------------
    | Operational Variables for this macro   
   |------------------------------------------------------------------------
   /declare op_int_GotLootArray   int outer 0
   /declare op_int_GotFishComp      int outer 0
   /declare op_int_FishByLoot      int outer 0
   /declare op_int_LoopCounter      int outer 0
   /declare op_int_ExitMacro      int outer 0
   
   /echo Starting up ${Macro}
    | Check our inventory for Fish Comp.   
   /for op_int_LoopCounter 1 to 8
      /if (${InvSlot[pack${op_int_LoopCounter}].Item.Name.Equal["Fisherman's Companion"]}) {
         /echo Whoopie!! Found our Fisherman's Companion!
         /varset op_int_GotFishComp 1
         /goto :BreakForFindFishComp
      }
   /next op_int_LoopCounter
   :BreakForFindFishComp
   /varset op_int_LoopCounter 0
   
   |------------------------------------------------------------------------
    | Load in Loot Table.                
   |------------------------------------------------------------------------
   /call ReadINI HyperFish.ini "${Zone.Name}" Loot
    /varset op_int_GotLootArray ${Macro.Return}

   |------------------------------------------------------------------------
   | Inventory anything we may have on our cursor before starting
   |------------------------------------------------------------------------
   /autoinventory
   
   |------------------------------------------------------------------------
   | Heart of the whole fishing routine..   
   |------------------------------------------------------------------------
   :Fish
   /if (${op_int_ExitMacro}==1) /goto :ExitMacro
   /call GMCheck
   /delay 5s
   /if (${Cursor.ID}) /call Looting
   /if (${Me.AbilityReady[Fishing]}) {
       /delay 1s
       /varcalc int_TotalCasts ${int_TotalCasts}+1
       /doability Fishing
   }
   /doevents
   /goto :Fish
|----------------------------------------------------------------------------
| End our Macro      
|----------------------------------------------------------------------------
:ExitMacro
   /echo -= Total Stats for this Fishing Trip =-
   /call DisplayStats
   /if (${UserVar_CampOutFinish}=1) {
      /sit off
      /sit on
      /camp
   }
/return



|----------------------------------------------------------------------------
| Begin Support sub routines      
|----------------------------------------------------------------------------
| ReadINI: Stolen from adv_fish code, modified to return 1 if
|         loot table built or 0 of loot table not built.
|----------------------------------------------------------------------------
Sub ReadINI(FileName, ZoneName, KeyRoot)
   /declare loc_int_returnValue int local 0
   /echo Attempting to Read "${ZoneName}" Section from ${FileName}
   /delay 1s
   
   /if (${Ini[${FileName}, ${ZoneName}, -1, NO].Equal[NO]}) {
      /echo Zone "${ZoneName}" Not found, Creating it now...
      /Ini ${FileName}, ${ZoneName}, -1, -1
      /delay 1s
        | Obviously, since we didn't have a section, we're not going to
        | have a loot section.. so we can end now
      /return loc_int_returnValue
   }
   
   /declare nValues     int local  1
   /declare nArray      int local  0
    /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}
   
    :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
    /goto :CounterLoop
   
    :MakeArray
   /if (!${nValues}) {
      | We didn't find any values in our loot tables.. so we'll just exit now
      /return loc_int_returnValue
   } else {
      | Must have found some values.. set our return variable now
      /varset loc_int_returnValue 1
   }
   /if (${FileName.Equal["HyperFish.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HyperFish.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 10s
/return loc_int_returnValue

|----------------------------------------------------------------------------
|SUB: Display fishing stats.
|----------------------------------------------------------------------------
Sub DisplayStats
   /declare nArray  int local
   /echo Total number of casts = ${int_TotalCasts}
   /echo Items fished so far:
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo   ${RV_LootArray[${nArray}]} -  ${Int[${RV_LootStats[${nArray}]}]}
      /next nArray
   }
   /echo
   /echo Bad fishing so far:
   /echo    Broken Poles - ${int_BrokenPole}
   /echo   Items Dropped - ${int_ItemsDropped}
   /echo       Lost Bait - ${int_LostBait}
   /echo  Nothing Caught - ${int_NothingCaught}
   /echo    Spilled Beer - ${int_SpillBeer}
/return

|----------------------------------------------------------------------------
|SUB: Main Looting routine.. based on adv_fish, heavily modified.
|----------------------------------------------------------------------------
Sub Looting
   /declare LootCheck   int inner 0
   
   /if (${op_int_GotLootArray}==0) {
      /if (${Cursor.Type.Equal["Food"]}) {
         /autoinventory
      }
   } else {   
      /for LootCheck 1 to ${RV_LootArray.Size}
         /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
            /echo Keeping a ${Cursor.Name}... WOOT!
            /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
            /autoinventory
         }
      /next LootCheck
   }
   /if (${Cursor.ID}) {
      /if (${Cursor.NoDrop}) {
         /if (${UserVar_DestroyNoDrop}==1) {
            /autoinventory
         } else {
            /autoinventory
         }
      } else {
         /echo Dropping a ${Cursor.Name}...
         /autoinv |/drop
         /varcalc int_ItemsDropped ${int_ItemsDropped}+1
      }
   }
   /if (${UserVar_DisplayStats}==1) /call DisplayStats
/return

|----------------------------------------------------------------------------
|SUB: Pole replacement logic
|----------------------------------------------------------------------------
| - vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
| - SUB: Check Pole
Sub FindPole
| - Add check for Brell's Fishing Pole and Fisherman's Companion
    :CheckPoleLoop
    /target ${Me}
    /if (${Me.Inventory[mainhand].Name.Find[Fishing Pole]} == 1) /return
    /if (${FindItemCount[=Fishing Pole]} == 0) {
        /delay 5
        /varset ItemToBuy Fishing Pole
        /varset Quantity 1
        /call Buy
        }
        /delay 2s
    /if (${FindItemCount[=Fishing Pole]} > 0) {
        /keypress OPEN_INV_BAGS
        /delay 2s
        /itemnotify ${FindItem[Fishing Pole].InvSlot} leftmouseup
        /delay 5
        /itemnotify mainhand leftmouseup
        /delay 5
    | - Anything in the primary hand (mainhand) will then be put in inventory.
        /autoinventory
        /delay 5
        }
        /keypress CLOSE_INV_BAGS
        /return
| - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

|----------------------------------------------------------------------------
|SUB: Check for GM's in zone.
|----------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM entered the zone!
      /echo For safty reasons ending the macro...
      /endmacro
   }

/return

|----------------------------------------------------------------------------
| End Support sub routines         
|----------------------------------------------------------------------------

|----------------------------------------------------------------------------
| Begin Event Sub Routines         
|----------------------------------------------------------------------------
Sub Event_BrokenPole
   /varcalc int_BrokenPole ${int_BrokenPole}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_LostBait
   /varcalc int_LostBait ${int_LostBait}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return


Sub Event_NeedPole
   /call FindPole
/return


Sub Event_NothingCaught
   /varcalc int_NothingCaught ${int_NothingCaught}+1
/return


Sub Event_OutOfBait
   /echo Bummer.. we're out of bait
   /varset op_int_ExitMacro 1
/return


Sub Event_PrimaryHand
   /call FindPole
/return


Sub Event_SkillUp(SkillUpText,Skill,int Amount)
   /popup Fishing increased to - ${Amount}
   /echo Fishing increased to - ${Amount}
/return


Sub Event_SpillBeer
   /varcalc int_SpillBeer ${int_SpillBeer}+1
   /varcalc int_NothingCaught ${int_NothingCaught}-1
/return
|----------------------------------------------------------------------------
| End Event Sub Routines         
|----------------------------------------------------------------------------
 

dorimor

New member
Joined
Jul 19, 2015
Likes
0
RedCents
106¢
#36
this new autofish is working a treat now.... only suggestion for improvment is that when out of bait you make 100 bait then start fishing again as at the moment it makes 10 runs out .
 
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#37
this new autofish is working a treat now.... only suggestion for improvment is that when out of bait you make 100 bait then start fishing again as at the moment it makes 10 runs out .
as requested
added a loop to the make bait routine
macro will make bait until all ${baitfish} are used OR the ${maxbait} count is achieved. The ${maxbait} count default is 100

I don't have time to test this so let me know if there is any problem.
 

Attachments

wisperin

New member
Joined
Jul 12, 2017
Likes
0
RedCents
#38
as requested
added a loop to the make bait routine
macro will make bait until all ${baitfish} are used OR the ${maxbait} count is achieved. The ${maxbait} count default is 100

I don't have time to test this so let me know if there is any problem.
Thanks for making this hoosierbilly . Everything works great except the bait making routine. It makes the bait but when it does the autoinventory command it always puts the bait back in the bait dispenser. Then it keeps stacking more fish in the dispenser and loops. Is there a way to make it autoinventory to a specific bag or slot?

Edit: I managed a workaround. There was a delay needed after the bait count check. I also fixed the /autoinventory loop by mapping a key in game to /autoinventory and sticking it in the number 9 slot, then edited the code to "keypress 9" instead of the straight "/autoinventory" command. I don't have any idea what the difference is in those two but it worked. The new code looks like this.

/keypress OPEN_INV_BAGS
/for count 1 to ${FindItemCount[=${baitfish}]}
/delay 2s ${Cursor.ID}
/ctrlkey /itemnotify "${baitfish}" leftmouseup
/delay 2s ${Cursor.ID}
/nomodkey /itemnotify in pack10 1 leftmouseup
/delay 2s !${Cursor.ID}
/combine pack10
/delay 2s ${Cursor.ID}
/keypress 9
/delay 2s !${Cursor.ID}
/if (${FindItemCount[bait]}<${maxbait}) /next count
/keypress CLOSE_INV_BAGS
 
Last edited:
Joined
Feb 6, 2007
Likes
24
RedCents
1,143¢
#39
/autoinventory will place the item in the first available spot. If your bait dispense happens to be the first available...
You should be able to simply move the bait dispenser to another bag slot or put an empty bag in the first bag slot to catch the bait.
 

Sicprofundus

#Can'tStop #Won'tStop
Moderator
Joined
May 5, 2016
Likes
925
RedCents
5,196¢
#40
I was having the same error wisperin, but I was able to come up with a fix.

I upped the delay to 5s and removed the ${Cursor.ID} that occurs before the /autoinventory.

Rich (BB code):
/keypress OPEN_INV_BAGS
		/for count 1 to ${FindItemCount[=${baitfish}]}
		/ctrlkey /itemnotify "${baitfish}" leftmouseup
		/delay 2s ${Cursor.ID}
		/nomodkey /itemnotify in pack10 1 leftmouseup
		/delay 2s !${Cursor.ID}
		/combine pack10
		/delay 5s 
		/autoinventory
		/delay 2s !${Cursor.ID}
		/if (${FindItemCount[bait]}<${maxbait}) /next count
		/keypress CLOSE_INV_BAGS
 
Top