adv_fishing.mac (Advanced Fishing Macro. v1.0beta 01/07/04)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Thranxx
orc pawn
orc pawn
Posts: 10
Joined: Tue Aug 17, 2004 3:45 pm

Post by Thranxx » Fri Sep 10, 2004 10:39 pm

So I'm fiddling... but I'm not very good yet...

How could this be modified to have a toggle to loot everything... like the boolean for displaying the stats or not...

n00ibly yours,
Thranx

LostInMyself
decaying skeleton
decaying skeleton
Posts: 2
Joined: Wed Oct 06, 2004 7:50 am

...

Post by LostInMyself » Wed Oct 06, 2004 7:53 am

I use this macro and I love it so far...
The only problem is in The Gulf of Gunthak, it always drops my Gunthak Gourami and the jellyfish...and the Deep Sea Urchin's i would like to sell...
I'll try to slower delay time thing, but it's still awsome.
Verry nice, make more :twisted:

MacRogue
a lesser mummy
a lesser mummy
Posts: 38
Joined: Sat Nov 20, 2004 8:34 pm

Post by MacRogue » Sat Nov 20, 2004 10:34 pm

For those too lazy to look it up here is a list from eqtrades.com of all the odd fish by zone =)
cut&paste, edit the names and you have a ini for all rare fish

Abysmal Sea(Gates of Discord)
1 lb. Saltwater Crab, 1 lb. Saltwater Tuna, 10 lb. Saltwater Crab, 10 lb. Saltwater Tuna, 11 lb. Saltwater Crab, 11 lb. Saltwater Tuna, 12 lb. Saltwater Crab, 12 lb. Saltwater Tuna, 13 lb. Saltwater Crab, 13 lb. Saltwater Tuna, 14 lb. Saltwater Crab, 14 lb. Saltwater Tuna, 15 lb. Saltwater Crab, 15 lb. Saltwater Tuna, 2 lb. Saltwater Crab, 2 lb. Saltwater Tuna, 3 lb. Saltwater Crab, 3 lb. Saltwater Tuna, 4 lb. Saltwater Crab, 4 lb. Saltwater Tuna, 5 lb. Saltwater Crab, 5 lb. Saltwater Tuna, 6 lb. Saltwater Crab, 6 lb. Saltwater Tuna, 7 lb. Saltwater Crab, 7 lb. Saltwater Tuna, 8 lb. Saltwater Crab, 8 lb. Saltwater Tuna, 9 lb. Saltwater Crab, 9 lb. Saltwater Tuna
Ak'Anon(Original)
clockwork koi
Blackburrow(Original)
hound pike
Butcherblock Mountains(Original)
stonefish
Chardok(Kunark)
chokai bass
City of Mist(Kunark)
fogwater trout, ikfish
Cobalt Scar(Velious)
cobalt cod, dragon bay snapper
Crushbone(Original)
boar carp
Crystal Caverns(Velious)
crystalline cave fish
Dagnor's Cauldron(Original)
cauldron trout
Deepest Guk(Lost Dungeons of Norath)
cave guppy, eyeless whitefish, muckskipper fish, slime covered planarian
Dulak(Legacy of Ykesha)
abalone, frilled anemone, sea cucumber
East Cabilis(Kunark)
10lb fetid bass, 11lb fetid bass, 12lb fetid bass, 13lb fetid bass, 14lb fetid bass, 15lb fetid bass, 16lb fetid bass, 17lb fetid bass, 2lb fetid bass, 3lb fetid bass, 4lb fetid bass, 5lb fetid bass, 6lb fetid bass, 7lb fetid bass, 8lb fetid bass, 9lb fetid bass, giant fetid bass, gigantic fetid bass, humongous fetid bass, large fetid bass, large fetid bass, large fetid bass, large fetid bass, salt minnow, sewer catfish, tiny fetid bass
East Karana(Original)
thunder salmon
Eastern Wastes(Velious)
rygorrian toothfish
Erud's Crossing(Original)
barren flounder
Feerrott(Original)
thullian mudskipper
Firiona Vie(Kunark)
10lb fetid bass, 11lb fetid bass, 12lb fetid bass, 13lb fetid bass, 14lb fetid bass, 15lb fetid bass, 16lb fetid bass, 17lb fetid bass, 2lb fetid bass, 3lb fetid bass, 4lb fetid bass, 5lb fetid bass, 6lb fetid bass, 7lb fetid bass, 8lb fetid bass, 9lb fetid bass, giant fetid bass, gigantic fetid bass, humongous fetid bass, large fetid bass, large fetid bass, large fetid bass, large fetid bass, salt minnow, sewer catfish, tiny fetid bass
Gulf of Gunthak(Legacy of Ykesha)
deep sea urchin, gunthak gourami, moray eel, ovate jellyfish
Highpass Hold(Original)
highland pike
Hollowshade Moor(Luclin)
fish scales, fresh fish, rusty dagger
Iceclad Ocean(Velious)
iceclad cutlassfish, salty whitefish
Innothule Swamp(Original)
rujarkian chub, thullian mudskipper
Jaggedpine Forest(Free)
thunder salmon
Kael Drakkel(Velious)
frosty cave trout
Karnor's Castle(Kunark)
wulf fish
Kedge Keep(Original)
kedge carp
Kerra Ridge(Original)
kerra catfish
Lake Rathetear(Original)
rathe muskie
Mines of Nurga(Kunark)
cave guppy, sponge mushroom
Multiple Zones(Original)
fish scales, fresh fish, rusty dagger, tattered cloth sandal
Natimbi(Gates of Discord)
1 lb. Saltwater Crab, 1 lb. Saltwater Tuna, 2 lb. Saltwater Crab, 2 lb. Saltwater Tuna, 3 lb. Saltwater Crab, 3 lb. Saltwater Tuna, 4 lb. Saltwater Crab, 4 lb. Saltwater Tuna, 5 lb. Saltwater Crab, 5 lb. Saltwater Tuna, Ginseng
Nedaria`s Landing(Free)
thunder salmon
North Felwithe(Original)
koada cichlid
North Karana(Original)
thunder salmon
Ocean of Tears(Original)
gunthak mackerel, saltwater seaweed
Plane of Disease(Planes of Power)
diseased fish
Plane of Nightmares(Planes of Power)
crawdad, nightmare cichlid, waterleaf scale
Plane of Storms(Planes of Power)
storm salmon
Plane of Tranquility(Planes of Power)
quellian koi, waterleaf scale, worn turban(lore)
Plane of Valor(Planes of Power)
crawdad, vallorian discus
Plane of Water(Planes of Power)
giant halibut, giant snapper
Rujarkian Hills(Lost Dungeons of Norath)
cave guppy
Siren's Grotto(Velious)
grotto bluegill
Sleeper's Tomb(Velious)
weary wrass
South Felwithe(Original)
koada cichlid
South Karana(Original)
thunder salmon
Surefall Glade(Original)
pine cichlid
Swamp of No Hope(Kunark)
despair chub, krup guppy
The Overthere(Kunark)
danak grouper
The Ruins of Old Paineel (The Hole)(Free)
hatch dace
The Ruins of Sebilis (Old Sebilis)(Kunark)
kunzar koi
Timorous Deep(Kunark)
saltwater seaweed, timorous tuna
Togiran Mines(Legacy of Ykesha)
bay seaweed, blowfish barb, gunthak gourami
Toxxulia Forest(Original)
greengill salmon
Txevu(Gates of Discord)
10 lb. Saltwater Crab, 11 lb. Saltwater Crab, 11 lb. Saltwater Tuna, 12 lb. Saltwater Tuna, 7 lb. Saltwater Crab, 7 lb. Saltwater Tuna, 8 lb. Saltwater Crab, 8 lb. Saltwater Tuna, 9 lb. Saltwater Tuna, fish scales, rusty dagger
Warslik's Woods(Kunark)
evergreen salmon
West Cabilis(Kunark)
10lb fetid bass, 11lb fetid bass, 12lb fetid bass, 13lb fetid bass, 14lb fetid bass, 15lb fetid bass, 16lb fetid bass, 17lb fetid bass, 2lb fetid bass, 3lb fetid bass, 4lb fetid bass, 5lb fetid bass, 6lb fetid bass, 7lb fetid bass, 8lb fetid bass, 9lb fetid bass, giant fetid bass, gigantic fetid bass, humongous fetid bass, large fetid bass, large fetid bass, large fetid bass, large fetid bass, sewer catfish, tiny fetid bass
West Karana(Original)
thunder salmon
Western Wastes(Velious)
red roughy

Macro_Lover
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Jan 06, 2005 3:41 pm

Post by Macro_Lover » Thu Jan 06, 2005 3:43 pm

save as fishingloot.ini

Code: Select all


[Abysmal Sea]
Loot1=1 lb. Saltwater Crab
Loot2=1 lb. Saltwater Tuna
Loot3=10 lb. Saltwater Crab
Loot4=10 lb. Saltwater Tuna
Loot5=11 lb. Saltwater Crab
Loot6=11 lb. Saltwater Tuna
Loot7=12 lb. Saltwater Crab
Loot8=12 lb. Saltwater Tuna
Loot9=13 lb. Saltwater Crab 
Loot10=13 lb. Saltwater Tuna 
Loot11=14 lb. Saltwater Crab 
Loot12=14 lb. Saltwater Tuna 
Loot13=15 lb. Saltwater Crab 
Loot14=15 lb. Saltwater Tuna 
Loot15=2 lb. Saltwater Crab 
Loot16=2 lb. Saltwater Tuna 
Loot17=3 lb. Saltwater Crab 
Loot18=3 lb. Saltwater Tuna 
Loot19=4 lb. Saltwater Crab 
Loot20=4 lb. Saltwater Tuna 
Loot21=5 lb. Saltwater Crab 
Loot22=5 lb. Saltwater Tuna 
Loot23=6 lb. Saltwater Crab 
Loot24=6 lb. Saltwater Tuna 
Loot25=7 lb. Saltwater Crab 
Loot26=7 lb. Saltwater Tuna 
Loot27=8 lb. Saltwater Crab 
Loot28=8 lb. Saltwater Tuna 
Loot29=9 lb. Saltwater Crab
Loot30=9 lb. Saltwater Tuna 

[Ak'Anon]
Loot1=clockwork koi 

[Blackburrow]
Loot1=hound pike 

[Butcherblock Mountains] 
Loot1=stonefish 

[Chardok] 
Loot1=chokai bass 

[City of Mist]
Loot1=fogwater trout
Loot2=ikfish 

[Crushbone]
Loot1=boar carp 

[Crystal Caverns]
Loot1=crystalline cave fish 

[Cobaltscar] 
Loot1=Cobalt Cod
Loot2=dragon bay snapper

[Dagnor's Cauldron] 
Loot1=cauldron trout 

[Deepest Guk]
Loot1=cave guppy 
Loot2=eyeless whitefish 
Loot3=muckskipper 
Loot4=fish slime 
Loot5=covered planarian 

[Dulak]
Loot1=abalone 
Loot2=frilled anemone 
Loot3=sea cucumber 

[East Cabilis] 
Loot1=10lb fetid bass 
Loot2=11lb fetid bass 
Loot3=12lb fetid bass 
Loot4=13lb fetid bass 
Loot5=14lb fetid bass 
Loot6=15lb fetid bass 
Loot7=16lb fetid bass 
Loot8=17lb fetid bass 
Loot9=2lb fetid bass 
Loot10=3lb fetid bass 
Loot11=4lb fetid bass 
Loot12=5lb fetid bass 
Loot13=6lb fetid bass 
Loot14=7lb fetid bass 
Loot15=8lb fetid bass 
Loot16=9lb fetid bass 
Loot17=giant fetid bass 
Loot18=gigantic fetid bass 
Loot19=humongous fetid bass 
Loot20=large fetid bass 
Loot21=large fetid bass 
Loot22=large fetid bass 
Loot23=large fetid bass 
Loot24=salt minnow sewer 
Loot25=catfish tiny 
Loot26=fetid bass 

[East Karana]
Loot1=thunder salmon 

[Eastern Wastes]
Loot1=rygorrian toothfish 

[Erud's Crossing]
Loot1=barren flounder 

[Feerrott]
Loot1=thullian mudskipper 

[Firiona Vie] 
Loot1=10lb fetid bass 
Loot2=11lb fetid bass 
Loot3=12lb fetid bass 
Loot4=13lb fetid bass 
Loot5=14lb fetid bass 
Loot6=15lb fetid bass 
Loot7=16lb fetid bass 
Loot8=17lb fetid bass 
Loot9=2lb fetid bass 
Loot10=3lb fetid bass 
Loot11=4lb fetid bass 
Loot12=5lb fetid bass 
Loot13=6lb fetid bass 
Loot14=7lb fetid bass 
Loot15=8lb fetid bass 
Loot16=9lb fetid bass 
Loot17=giant fetid bass 
Loot18=gigantic fetid bass 
Loot19=humongous fetid bass 
Loot20=large fetid bass large 
Loot21=fetid bass 
Loot22=large fetid bass 
Loot23=salt minnow sewer 
Loot24=catfish 
Loot25=tiny fetid bass 

[Gulf of Gunthak]
Loot1=deep sea urchin 
Loot2=gunthak gourami 
Loot3=moray eel 
Loot4=ovate jellyfish 

[Highpass Hold]
Loot1=highland pike 

[Hollowshade Moor]
Loot1=fish scales 
Loot2=fresh fish 
Loot3=rusty dagger 

[Iceclad Ocean] 
Loot1=iceclad cutlassfish 
Loot2=salty whitefish 

[Innothule Swamp]
Loot1=rujarkian chub 
Loot2=thullian mudskipper 

[Jaggedpine Forest] 
Loot1=thunder salmon 

[Kael Drakkel]
Loot1=frosty cave trout 

[Karnor's Castle] 
Loot1=wulf fish 

[Kedge Keep] 
Loot1=kedge carp 

[Kerra Ridge] 
Loot1=kerra catfish 

[Lake Rathetear] 
Loot1=rathe muskie 

[Mines of Nurga] 
Loot1=cave guppy 
Loot2=sponge mushroom 

[Natimbi] 
Loot1=1 lb. Saltwater Crab 
Loot2=1 lb. Saltwater Tuna 
Loot3=2 lb. Saltwater Crab 
Loot4=2 lb. Saltwater Tuna 
Loot5=3 lb. Saltwater Crab 
Loot6=3 lb. Saltwater Tuna 
Loot7=4 lb. Saltwater Crab 
Loot8=4 lb. Saltwater Tuna 
Loot9=5 lb. Saltwater Crab 
Loot10=5 lb. Saltwater Tuna 
Loot11=Ginseng 

[Nedaria`s Landing]
Loot1=thunder salmon 

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


[North Felwithe] 
Loot1=koada cichlid 

[North Karana] 
Loot1=thunder salmon 

[Ocean of Tears] 
Loot1=gunthak mackerel 
Loot2=saltwater 
Loot3=seaweed 

[The Plane of Disease] 
Loot1=diseased fish 

[The Plane of Nightmares] 
Loot1=Fresh Fish 
Loot2=Fish Scales 
Loot3=Crawdad 
Loot4=Waterleaf Scale 
Loot5=Nightmare Cichlid 

[The Plane of Storms] 
Loot1=storm salmon 

[The Plane of Tranquility] 
Loot1=quellian koi 
Loot2=waterleaf scale 
Loot3=worn turban

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

[The Plane of Water] 
Loot1=giant halibut 
Loot2=giant snapper 

[Rujarkian Hills]
Loot1=cave guppy 

[Siren's Grotto]
Loot1=grotto bluegill 

[Sleeper's Tomb]
Loot1=weary wrass 

[South Felwithe] 
Loot1=koada cichlid 

[South Karana] 
Loot1=thunder salmon 

[Surefall Glade]
Loot1=pine cichlid 

[Swamp of No Hope]
Loot1=despair chub 
Loot2=krup guppy 

[The Overthere] 
Loot1=danak grouper 

[The Ruins of Old Paineel]
Loot1=hatch dace 

[The Ruins of Sebilis]
Loot1=kunzar koi 

[Timorous Deep] 
Loot1=saltwater seaweed 
Loot2=timorous tuna 

[Togiran Mines]
Loot1=bay seaweed 
Loot2=blowfish barb 
Loot3=gunthak gourami 

[Toxxulia Forest] 
Loot1=greengill salmon 

[Txevu] 
Loot1=10 lb. Saltwater Crab 
Loot2=11 lb. Saltwater Crab 
Loot3=11 lb. Saltwater Tuna 
Loot4=12 lb. Saltwater Tuna 
Loot5=7 lb. Saltwater Crab 
Loot6=7 lb. Saltwater Tuna 
Loot7=8 lb. Saltwater Crab 
Loot8=8 lb. Saltwater Tuna 
Loot9=9 lb. Saltwater 
Loot10=Tuna 
Loot11=fish scales 
Loot12=rusty dagger 

[Warslik's Woods] 
Loot1=evergreen salmon 

[West Cabilis] 
Loot1=10lb fetid bass 
Loot2=11lb fetid bass 
Loot3=12lb fetid bass 
Loot4=13lb fetid bass 
Loot5=14lb fetid bass 
Loot6=15lb fetid bass 
Loot7=16lb fetid bass 
Loot8=17lb fetid bass 
Loot9=2lb fetid bass 
Loot10=3lb fetid bass 
Loot11=4lb fetid bass 
Loot12=5lb fetid bass 
Loot13=6lb fetid bass 
Loot14=7lb fetid bass 
Loot15=8lb fetid bass 
Loot16=9lb fetid bass 
Loot17=giant fetid bass 
Loot18=gigantic fetid bass 
Loot19=humongous fetid bass 
Loot20=large fetid bass 
Loot21=sewer catfish 
Loot22=tiny fetid bass 

[West Karana] 
Loot1=thunder salmon 

[Western Wastes]
Loot1=red roughy


vrraider
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Jan 09, 2005 5:41 pm

Post by vrraider » Sun Jan 09, 2005 6:14 pm

This is an excellent Macro ... My complements to the Programmer.......even thought I know very little about them...macro's that is.

After I figured out How to run a Macro then ran this Fishing macro ....I too had some problems with the occasional Good Drop of items that I wanted to keep. It seems to be more of a timing error rather than a Delay time error ( Uh, that made no sense ...did it?).
At first I thought it was a delay time issue and started to increased timer delays, even added a few, but no matter what it still seemed to drop the occasional Good Catch.
After some experimenting and a lot of Trial and Error I noticed that every once in a while I would get the "can not fish while holding an item" error. This led me to believe that items were popping up in the middle of Subroutines and causing it to misfire. Everything seemed to hinge on the “Looting” subroutine.
So I move the
/if (${Cursor.ID}) /call Looting
to after the AbilityReady[Fishing] If Statement and right before the
/doability Fishing
and it seems to have resolve all my minor problems.
Mine now looks like this:
---------------------------------------------------

:Start
/call GMCheck
/delay 2s
/if (${Me.AbilityReady[Fishing]}) {
/delay 1s
/varcalc int_TotalCasts ${int_TotalCasts}+1
/if (${Cursor.ID}) /call Looting
/doability Fishing
}
/doevents
/goto :Start
/return

--------------------------------------------

Hope this helps.

graywolfice
decaying skeleton
decaying skeleton
Posts: 1
Joined: Thu Jan 27, 2005 1:56 pm

Post by graywolfice » Thu Jan 27, 2005 2:24 pm

Hi

ON the auto fishing script how would one put a new fishing pole in his hand when his pole gets broken. I mean I am fishing and my pole gets broken. I have to stop the macro and get a new pole. Where I could have say 5 poles in my equpiment and when the marco runs it checks if I have a pole in my primary if not get one from the equipment and load one. Then when you dont have any poles then quit the macro, the same with the bait. It would be cool if someone can do this or show how to do it.

thanks a million for a create program. EQ has become much more plesureable to play now.

lil6rasca
orc pawn
orc pawn
Posts: 15
Joined: Mon Feb 28, 2005 12:53 am

Post by lil6rasca » Mon Feb 28, 2005 12:56 am

nm i got it... yea i was right im a dumb ass lol

MILFhunter
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri May 13, 2005 10:21 am
Location: Mobs Id Like to Farm...

Post by MILFhunter » Mon Jul 04, 2005 9:42 am

Any one having troubles with this macro after the last patch?
MILFhunter
(MoB's Id Like to Farm hunter - not the other one - jeez)

RaidNazi
a lesser mummy
a lesser mummy
Posts: 67
Joined: Tue Feb 24, 2004 3:12 am
Location: New Zealand

Post by RaidNazi » Tue Jul 05, 2005 6:41 pm

Any one having troubles with this macro after the last patch?
It used ${String
[b]Yelling at noobs on raids since 1999[/b]

User avatar
CodeCaster
orc pawn
orc pawn
Posts: 18
Joined: Sat Apr 30, 2005 12:39 pm

Post by CodeCaster » Sun Jul 17, 2005 2:08 pm

maybe a second set of eyes on this...

Trying to re-work this macro around the string handling functionality downgrade nerf.

${Ini[${FileName},${SectionName},${ArrayType}${nValues}].Equal[NULL]} returns null instead of the bool value it's supposed to.

${Ini[${FileName},${SectionName},${ArrayType}${nValues}]} does return null, but the .Equal isn't working for some reason. Tried quotes and whatnot. According to the manual, ${ini} does have access to String, so .Equal should work.

Thoughts?
"I believe the problem lies somewhere between the keyboard and the chair..."

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sun Jul 17, 2005 3:43 pm

Can something really be equal to nothing?

hmmmmm

(Note that this is NOT a rhetorical question and holds the answer to your problem.)
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
CodeCaster
orc pawn
orc pawn
Posts: 18
Joined: Sat Apr 30, 2005 12:39 pm

Post by CodeCaster » Sun Jul 17, 2005 4:05 pm

Well, nothing can be equal to nothing.

NULL == NULL
blah != NULL
"I believe the problem lies somewhere between the keyboard and the chair..."

BigGuy
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun May 08, 2005 7:01 pm

Post by BigGuy » Sun Jul 17, 2005 11:42 pm

i had posted in the wiki about this.

http://www.macroquest2.com/wiki/index.php/Macro_Error

User avatar
CodeCaster
orc pawn
orc pawn
Posts: 18
Joined: Sat Apr 30, 2005 12:39 pm

Post by CodeCaster » Wed Jul 20, 2005 9:27 pm

Oustanding fix, BigGuy... Thanks. For the sake of correctness, Here's the new code for all to use:

Code: Select all

|---------------------------------------------------------------------------------
| 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  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
   |------------------------------------------------------------
   |Load in Loot Table.
   |------------------------------------------------------------
   /call ReadINI FishingLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Table Created... Please create one.
      /endmacro
   }

   /autoinventory

   :Start
      /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 :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 (${Ini[${FileName},${SectionName},${ArrayType}${nValues},NULL].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
"I believe the problem lies somewhere between the keyboard and the chair..."

ionsf
a ghoul
a ghoul
Posts: 94
Joined: Wed Jan 14, 2004 10:19 pm

Post by ionsf » Mon Aug 08, 2005 12:53 am

Thanks guys.