• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Can this be fixed? Worked fine until last patch [Hyperfish.mac]

Zincfling

New member
Joined
Apr 1, 2016
RedCents
32¢
Used this for my fishing needs no problem until last patch, now it wont work! Can anyone fix this please?

edit: Error message is: Due to complete misuse of the String top level object, it has been removed.

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         
|----------------------------------------------------------------------------
 
any specific error code when it crashes? Whats it saying other then blah
 
Can you post part of the ini file that it is reading? There is more you need fixed than just the 1 ${String} command. There is a Variable ${ArrayType} that is being referenced, but it is never /declared.

Never mind I found an older post with the HyperFish.ini file listed. The following should correct the issue you are having.

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 (${Ini[${FileName},${SectionName},"Loot${nValues}",null].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},"Loot${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         
|----------------------------------------------------------------------------
 
Last edited:
Ctaylor22: that totally fixed it man, thanks alot. if i may bother you a bit further, i want to make it work with ninjadvloot, i was reading up on it but its confusing me a bit, where do i have to add this code to make it work?

Rich (BB code):
    #include Ninjadvloot.inc
    /call SetupAdvLootVars
    /call LootMobs
 
Ctaylor22: that totally fixed it man, thanks alot. if i may bother you a bit further, i want to make it work with ninjadvloot, i was reading up on it but its confusing me a bit, where do i have to add this code to make it work?

Rich (BB code):
    #include Ninjadvloot.inc
    /call SetupAdvLootVars
    /call LootMobs

Jinjadvloot is more for looting corpses or using the advloot system, not sure how it would work for fishing..
 
Jinjadvloot is more for looting corpses or using the advloot system, not sure how it would work for fishing..

Well it was sugested by red to correct the problem i get with hyperfish droping all the fish to the ground.
 
This will require a bit of effort to make it work with ninjadvloot. I'll look into it.

EDIT:
There is still some wonkiness with this macro, but it does sorta work. It does not actually create the ini file for you, bah. The original looting section did not seem to work, everything stayed on my cursor. I did add support for ninjadvloot.
Please NOTE: I'm using the ninjadvloot forage routine so the spam references foraging even though you are fishing. Adding an entire separate routine for fishing seemed a bit overkill. Anyway... enjoy

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:
| Dec 2016  hoosierbilly  added support for ninjadvloot
| v1.1  fby      Bug Fixes pointed out by Budman                                                   
| v1.0   fby      Created the initial file offering                     
|----------------------------------------------------------------------------

#turbo 10
#include ninjadvloot.inc

|----------------------------------------------------------------------------
| 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}
	/call SetupAdvLootVars

   |------------------------------------------------------------------------
   | 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 Event_Forage
   /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 (${Ini[${FileName},${SectionName},"Loot${nValues}",null].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},"Loot${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         
|----------------------------------------------------------------------------
 
Last edited:
Can this be fixed? Worked fine until last patch [Hyperfish.mac]

Users who are viewing this thread

Back
Top
Cart