Post
by england20 » Tue Jun 14, 2011 2:56 pm
this is the macro im trying to use.
|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
/return