The nice thing about it is that it creates and appends to its own .ini file. It is also set to KEEP any item !=0 on the list, and not destroy it. When new items are encountered, they're defaulted to =1 (which means keep).
What this does, is if you happen to brain fart, and forget it's running, and pick up your epic... there's no OH FUK! there goes my epic. It in turn adds that item to the .ini file, and sets it to =1, and drops it into your inventory. No harm, no foul.
What I was wondering is this, since I hate all the lil forage turds I leave because I use the foraged water/fruit/veggies to save on my stat food/drink while foraging, can you add a section routine that you could define a # of items to keep, and if that number was not defined, and the setting was keep, it would keep an infinite amount?
Basically I'd like it to keep say 2 stacks of water and roots/fruit, and destroy anything over 40, and not drop them.
Was just wondering. This probably belongs under the YAFM section, so I'll go copy it there, but this seemed a lively discussion at one point =)
***EDIT***
Hrm, just went back through this entire thread, and I'm thinking I got ahold of a mod'd version, because my .mac looks nothing like the full version here. I'm thinking I'll copy this and make a yafm2.mac and see how that works.
Code: Select all
|yafm.mac
|
|Yet Another Forage Macro
|
|Ini File: yafm.ini
|
| 0 = destroy
| 1 = keep
|
|New foraged items are added to the ini file automatically and are kept by default.
||||||||||||||||||||
| Main
||||||||||||||||||||
sub Main
/cleanup
| Verify that we have the ability to forage.
/if (${Me.Skill[Forage]}==0) {
/echo You cannot forage, silly person!
/goto :Exit
}
:Forage
| Stand up. Can't forage while sitting.
/if (${Me.State.NotEqual[STAND]}) {
/stand
/delay 5
}
/delay 1s
| If we can forage then do so.
/if (${Me.AbilityReady[Forage]}) {
/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
/varset NotFound -1
| 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}" "1"
/varset ItemSetting 1
}
| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}==1) {
:LootIt
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :LootIt
} else {
/destroy
}
/return



