HyperFishing Mac Help please

sjbears

New member
Joined
Dec 31, 2005
Messages
8
Reaction score
1
Points
0
Need help fixing HyperFish.mac so I can keep all the loot items.
Seems it only keeps Loot item #1 only Fresh Fish, is there something I need to change.

I got the mac from the Wiki site, tried to paste here says too many characters.

Other than dropping all the good tradeskill items it works great
thanks
 
|----------------------------------------------------------------------------
| 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

HyperFish.ini - Sample INI

[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

[The Plane of Valor]
Loot1=Fresh Fish
Loot2=Fish Scales
Loot3=Crawdad
Loot4=Vallorian Discus

[North Qeynos]
Loot1=Fresh Fish
Loot2=Fish Scales

It seems you just need to edit HyperFish.ini, add in the zone you are fishing in, then add in the loot you want to keep.

BTW Thanks for the heads up about the too many characters to post it. I've fixed the problem now, there is no limit on size of post anymore.

Heres the Mac for anyone intrested.

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 2s
   /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 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["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
|----------------------------------------------------------------------------
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         
|----------------------------------------------------------------------------
 
Thank you, got it working now fishing just hit 176..Not getting rich but at least cover the cost of bait now.
 
  • Haha
Reactions: EQDAB
In my younger days I actually made MOST of my plat selling the blessed fishing rods (~202 triv.) cause I macro'ed foraging in West. Wastes and PoGrowth for the ingreds. using a n52 speedpad before I knew all about Macroquest heh.
 
  • Like
Reactions: EQDAB
hehe, help me :)

lol ok i keep getting links to the codes...how do you turn the code into a macro?:) Not smart enough to figure that out! Im used to prepackaged macros that i click and load:) Seeing the code just makes me realize why I didn't persue a career as a programmer ;) Fishing macros arent normally included in the compiles so I guess i need to save it for next update.
 
You copy/paste the code into notepad, and save it in the macro directory as HyperFish.mac. If windows is being picky and keeps adding .txt to it, then save it as "HyperFish.mac". Using the quotes will force it to not add .txt

There is no converting a macro. It's just as plasin as you see it, which makes it so easy to pick up and learn. Most the commands can be followed along in English without any prior knowledge of coding (though granted, this particular macro isn't exactly among the 'easy' ones to learn on)
 

Attachments

  • HyperFish.mac
    13.9 KB · Views: 177
  • HyperFish.ini
    340 bytes · Views: 185
  • Like
Reactions: EQDAB
Since we're on the n00by question answering spree, I've got one or ten for ya =)

OK, I'm a tiny bit familiar with MQ2. I learned how to download and compile the code using Visual C++ 2005, and I know how to update the mq2auth file. I can even launch a few macros... But that's about where it stops.

Then, I get turned on to this site from another person, and start seeing how much more there is that can be done (I never paid for MQ2 support, maybe that's why I didn't see much).

I've seen a few macros that look neat and would like to try (like this fishing one) and my question is this... Do I need a specific compiled version of MQ2 in order to say run this "hyperfish.mac" or can I just copy/paste the 2 files into my macros folder in my working MQ2 directory for now and run it like that? I've got a similar foraging one that works fine and uses a similar ini file.

Also, can anyone point me (haven't found it yet, but just starting to look) at a "Beginners Guide to MMOBugs and MQ2 Use" or an "MQ2 & MMOBugs for Dummies" would be just as acceptible =)

Basically I need to know from start to finish how/what/why/when.
 
Version doesn't matter. There is only really one version of MQ2 -- the one that has the most recent offsets.

The powerful things like warping, zoning, ghosting, cross zone npc hand ins, etc come from the plugins provided on this site. As you know vanilla MQ2 only gives you the ability to macro and see things on the map to target.

99% of the macros you come across will work just fine by dumping them in your macro folder.

As to the whole in-depth MQ2, you will have to read a lot. I don't know of a fully comprehensive guide on how to use it, write your own stuff, etc. Those that really care enough to learn, will learn. We have a list in the Compile forum with a lot of the commands for the plugins, which is available [ame="http://www.mmobugs.com/forums/showthread.php?t=681"]here[/ame]
 
  • Like
Reactions: EQDAB
Thank you Taron.

I ran into my first problem last night trying to run Forageaa mac, but I'll have to capture the error message later, I'm at work now.

MMOBugstools plugin, do I need that present and loaded at all times, or just some times?

Also I'll start digging in to that Compile forum and such and see what I can absorb.
 
  • Like
Reactions: EQDAB
Rook stepping up to learn

So i have been using mq2 for a while now and am completely loving it. I find when its down I am lost in game now 8>)

I have played with practically everything i can in the plug in list, however decided there was so much i was missing from reading the chat boards, without learning how to use some of the other posted programs out there so i decided to begin searching for others who have learned to use other macros through the boards. (i have found that practically everything i have ever had a question on I can find an answer just by searching...) Found this thread and figured fishing had to be easy enough to try as my first like this guy did.

So here i am. Trying to copy and paste my first official macro that was not in the base program.

I did everything like it said. Copied both files above in to my macro folder, saved them as the ini and mac like stated. Now heres where my confusion is at this time. How do I run the program? I tried things like /plugin mq2 hyperfish (like you load other programs) i have read the files to see if there were commands listed, like possibly /fish, or /doability fishing, but it does not work to begin the mac. I am sure every case is different, but in general, when using this program, and others i am sure to attempt using in the near future, how do you load a file into game once you have created the proper files in your mac folder?

Thanks a ton in advance! ~ Nikki:D
 
U R Awesome!

Thanks so much for your help!

I have it working 8>) i am so excited to begin giving some of these other programs out there a try!

Thanks again!
 
  • Like
Reactions: EQDAB
Always keep in mind that some of these macros are old and not updated they may not do what they where coded to do and may need to be edited, glad your up and running :D
 
I love how information on this board never goes away, and even three years later it can help someone out. Just a quick This Board Rawks!

Mmm fish. Makes me want to have fish for dinner.
 
  • Like
Reactions: EQDAB
stupid question

Is there a standard way to turn off a mac? IE hyperfish?

I just picked up my Fishermans companion and it deleted it lol...
 
Something has changed

Subroutine Main not found. Ending macro.
 
Having issues with broken poles

I have put the fishing companion in first slot first bag ...no luck , i have summoned 10 poles and placed them in first bag , broken pole gets the macro to stop , what am i doing wrong? I looked for a wikki or sticky on how the program works , it works fine except if i get a broekn pole then it stops
 
Nevermind, went to mq2 VIP forums and downloaded a slightly different version of hyperfish and it's working great now. Also uses the Anizok's Bait Dispenser.
 
Last edited:
Not working

I tried running this tonight and could not get it to work properly. It would get hung up immediately with the prompt "Attempting to access hyperfish.ini"....loot. I created a "hyperfish.ini" and even created the zone and loot table in it as the mac/post here suggested but even after about 10 minutes, it would go no further than the attempted search. I tried editing the .mac to go to a different loot.ini, I checked and rechecked spelling but nothing...hung up on the attempting to access part. I searched the forums to see if any others had the same issue and found nothing close.