From the MQ2 Free section, written by bootyjuice modified by mdar. Why am I posting it here then? Mdar's version had several bugs, and I got them worked out. Enjoy.
Instructions:
Copy the code and save it to a text file named "yafm.mac" using notepad or wordpad. Put yafm.mac into your macros folder(which should be in c:\mq2\release\macros or whatever you named your mq2 folder). Go into everquest and type "/macro yafm". Let it run for awhile, and then quit.
It will automatically create a file called "yafm.ini" in your macro folder. Open that file up with notepad and you can edit how much of each item you will keep. It will look like this:
For example, setting "pod of water" to 50 will let you forage up to 50 pods of water and will delete the rest.
Whatever you do, don't set defaultmax or maxsave to 0. That could destroy your equipment if you click on it! Set it to 10 or 100 and you'll be fine.
Rich (BB code):
|yafm.mac
|
|Yet Another Forage Macro
|
|Ini File: yafm.ini
|
| 0 = destroy
| x = keep at most x of this item
|
|New foraged items are added to the ini file automatically and are kept by default.
||||||||||||||||||||
| Main
||||||||||||||||||||
sub Main
/declare DefaultMaxSave int outer
/varset DefaultMaxSave ${Ini[yafm.ini,Default,MaxSave,${NotFound}]}
/if (${DefaultMaxSave}==${NotFound}) {
/ini "yafm.ini" "Default" "MaxSave" "100"
/varset DefaultMaxSave 100
}
/cleanup
| Verify that we have the ability to forage.
/if (${Me.Skill[Forage]}==0) {
/echo You cannot forage, silly person!
/goto :Exit
}
:Forage
| If we can forage then do so.
/if (${Me.AbilityReady[Forage]}) {
| Stand up. Can't forage while sitting.
/if (${Me.State.NotEqual[STAND]}) {
/stand
/delay 5
}
/doability forage
}
| If we successfully foraged something then take care of it.
/if (${Cursor.ID}) {
/call HandleItem
}
/goto :Forage
:Exit
/return
||||||||||||||||||||
| HandleItem
||||||||||||||||||||
sub HandleItem
/declare ItemSetting int local
/declare NotFound int local
/declare ItemsHave int local
/varset NotFound -1
:LootIt
| Look up this item in yafm.ini
/varset ItemSetting ${Ini[yafm.ini,ForageList,${Cursor.Name},${NotFound}]}
/delay 5
| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {
/ini "yafm.ini" "ForageList" "${Cursor.Name}" "${DefaultMaxSave}"
/varset ItemSetting ${DefaultMaxSave}
}
/varset ItemsHave ${FindItem=${Cursor.Name}}
| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}>${ItemsHave}) {
/autoinventory
} else {
/destroy
}
/delay 5
/if (${Cursor.ID}) /goto :LootIt
/return
Instructions:
Copy the code and save it to a text file named "yafm.mac" using notepad or wordpad. Put yafm.mac into your macros folder(which should be in c:\mq2\release\macros or whatever you named your mq2 folder). Go into everquest and type "/macro yafm". Let it run for awhile, and then quit.
It will automatically create a file called "yafm.ini" in your macro folder. Open that file up with notepad and you can edit how much of each item you will keep. It will look like this:
Rich (BB code):
[Default]
MaxSave=100
[ForageList]
Roots=0
Pod of Water=0
Berries=100
Vegetables=100
Fishing Grubs=0
Fruit=100
Griffon Eggs=100
Rabbit Meat=100
For example, setting "pod of water" to 50 will let you forage up to 50 pods of water and will delete the rest.
Whatever you do, don't set defaultmax or maxsave to 0. That could destroy your equipment if you click on it! Set it to 10 or 100 and you'll be fine.



Will try it as asoon as i hit 51 
