Edit: Never did look into skill echos, or stopping a skill once capped, just added Hide and Sneak into the macro so they'd skill up as well. Maybe I'll get to the rest sunday-ish, too busy with work this week. Note that Hide-Sneak-Tracking-Forage need to be on the abilities page for the macro to work, same as with tracker.mac and yafm.
Edit2: After some review of MonkTrainer I added in skillechos, decided I didn't really care if the skill kept being used after capping, final version(maybe I'll tweak it more later for personal preference) below.
Code: Select all
|ranja.mac
|
|Based on YAFM, Tracker and MonkTrainer Macros.
|
|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
/declare OldSkillforage int outer
/declare OldSkilltracking int outer
/declare OldSkillhide int outer
/declare OldSkillsneak int outer
/varset OldSkillforage ${Me.Skill[Forage]}
/varset OldSkilltracking ${Me.Skill[Tracking]}
/varset OldSkillhide ${Me.Skill[Hide]}
/varset OldSkillsneak ${Me.Skill[Sneak]}
/echo Forage currently ${Me.Skill[Forage]}
/echo Tracking currently ${Me.Skill[Tracking]}
/echo Hide currently ${Me.Skill[Hide]}
/echo Sneak currently ${Me.Skill[Sneak]}
/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 (${Me.Skill[Forage]}>${OldSkillforage}) {
/echo Skillup! Forage now ${Me.Skill[Forage]}!
/popup Skillup! Forage now ${Me.Skill[Forage]}!
/varset OldSkillforage ${Me.Skill[Forage]}
}
| If we successfully foraged something then take care of it.
/if (${Cursor.ID}) {
/call HandleItem
}
/goto :Track
:Track
/delay 1s
| If we can track then do so.
/if (${Me.AbilityReady[Tracking]}) {
/doability tracking
/delay 2
/notify TrackingWnd DoneButton leftmouseup
}
/if (${Me.Skill[Tracking]}>${OldSkilltracking}) {
/echo Skillup! Tracking now ${Me.Skill[Tracking]}!
/popup Skillup! Tracking now ${Me.Skill[Tracking]}!
/varset OldSkilltracking ${Me.Skill[Tracking]}
}
/goto :Hide
:Hide
/if (${Me.AbilityReady[Hide]}) {
/doability Hide
/delay 1s
/doability Hide
}
/if (${Me.Skill[Hide]}>${OldSkillhide}) {
/echo Skillup! Hide now ${Me.Skill[Hide]}!
/popup Skillup! Hide now ${Me.Skill[Hide]}!
/varset OldSkillhide ${Me.Skill[Hide]}
}
/goto :Sneak
:Sneak
/if (${Me.AbilityReady[Sneak]}) {
/doability Sneak
/delay 1s
/doability Sneak
}
/if (${Me.Skill[Sneak]}>${OldSkillsneak}) {
/echo Skillup! Sneak now ${Me.Skill[Sneak]}!
/popup Skillup! Sneak now ${Me.Skill[Sneak]}!
/varset OldSkillsneak ${Me.Skill[Sneak]}
}
/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

