Ranja.mac

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

Moderator: MacroQuest Developers

sturmvogel
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Jun 02, 2012 8:16 am

Ranja.mac

Post by sturmvogel » Sat Jun 02, 2012 8:19 am

Just a simple hybrid I made of tracker.mac and yafm.mac that autoforages and skillsup tracking, I'll look into getting it to stop tracking when max skill and continuing to forage later, but for the moment was jsut something I whipped up in the office in 30s.(requires yafm.ini - or creates it if you dont have it) for afk skillups on my ranger while leveling. Enjoy:

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  

sturmvogel
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Jun 02, 2012 8:16 am

Re: Ranja.mac

Post by sturmvogel » Sat Jun 09, 2012 12:56 am

Tweaked for no popups(they do get a tad annoying at times):

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]}!
   /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]}!
      /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]}!
        /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]}!
        /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  

FrankJScott
naggy
naggy
Posts: 2120
Joined: Sun Feb 19, 2023 7:11 am

Excellent Product Website

Post by FrankJScott » Fri Jan 12, 2024 2:55 am

Please try Google before asking about Great Product Info a61d1ac