Lazy Ranger Mac

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

Moderator: MacroQuest Developers

Ranjah_Down
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Aug 12, 2004 12:40 am

Lazy Ranger Mac

Post by Ranjah_Down » Thu Aug 12, 2004 1:04 am

first mac =)
open to suggestions

basicly just run the mac and it will keep essential self buffs up, as well as snare enc's pets, and buff others on request.
you can get spellcast.inc from Here
-Aug 12 2004 - Changed to the || shit for less clutter, added auto forage, and auto consent on death...
lazyranger.mac

Code: Select all

|lazyranger.mac 
|Ranger Self Buff/Assist Snare Pet macro 
|By Ranjah_Down
|Version 1.1 

#include spellcast.inc 
#chat tell
#Event Slainby "#*#You have been slain by#*#" 

Sub Main 

/echo Lazy Ranjah Loaded... 

  :loop 
|====[Self Buffs]==================================
/if (!${Me.Buff[Eagle Eye].ID}) { 
    /target ${Me} 
    /call cast "Eagle Eye" 
} 
  
/if (!${Me.Buff[Mask of the Stalker].ID}) { 
    /target ${Me} 
    /call cast "Mask of the Stalker" 
} 

/if (!${Me.Buff[Protection of the Wild].ID}) { 
    /target ${Me} 
    /call cast "Protection of the Wild" 
} 

/if (!${Me.Buff[Nature's Precision].ID}) { 
    /target ${Me} 
    /call cast "Nature's Precision" 
}

|====[Forage]=======================================
/if (${Cursor.ID}) /autoinventory 
/if (${Me.AbilityReady[Forage]}) /doability Forage
 
    /doevents 
    /goto :loop 
    /return 

Sub Event_Chat(ChatType,Sender,ChatText) 
|====[Snare]======================================== 
    /if (${ChatText.Equal[snare]} || ${ChatText.Equal[snare pet]}) { 
        /target ${Sender} 
        /delay 2s 
        /assist ${Sender} 
        /delay 2s 
        /call cast "Ensnare" 
        /tell ${Sender} Inc Snare on %T. 
    } 

|====[SoE]========================================== 
    /if (${ChatText.Equal[soe]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Spirit of Eagle" 
        /tell ${Sender} inc soe 
    } 

|====[SoT]========================================== 
    /if (${ChatText.Equal[sot]} || ${ChatText.Equal[tunare]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Strength of Tunare" 
        /tell ${Sender} inc sot    
    } 

|====[SoP]========================================== 
    /if (${ChatText.Equal[sop]} || ${ChatText.Equal[predator]} || ${ChatText.Equal[pred]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Spirit of the Predator" 
        /tell ${Sender} inc sop 
    } 

|====[CoR]========================================== 
    /if (${ChatText.Equal[cor]} || ${ChatText.Equal[rathe]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Call of the Rathe" 
        /tell ${Sender} inc cor 
    }  
      
    /return

|====[Slain By]=====================================
Sub Event_Slainby
   /echo Ranger Down =(
   /consent raid
   /delay 1s
   /consent guild
   /delay 1s
   /consent group
   /return

Last edited by Ranjah_Down on Thu Aug 12, 2004 12:32 pm, edited 3 times in total.
You have been slain by a Fire Beetle.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Re: Lazy Ranger Mac

Post by DumbStruck » Thu Aug 12, 2004 1:19 am

Ranjah_Down wrote: /if (${ChatText.Equal[snare pet]}) {
/target ${Sender}
/delay 2s
/assist ${Sender}
/delay 2s
/call cast "Ensnare"
/tell ${Sender} Inc Snare on %T.

[/code]
Hmm wont this just assist the senders target ? that wont target his pet .. Dont think thats gonna get it .

Ranjah_Down
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Aug 12, 2004 12:40 am

Post by Ranjah_Down » Thu Aug 12, 2004 1:22 am

if the pet has broke, then you cant really use ${Sender.Pet} since its not their pet anymore, usually the enc will target their x pet since they are running for their life and trying to mez/tash it. that was the best way i could figure to do it.
You have been slain by a Fire Beetle.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Thu Aug 12, 2004 1:23 am

Doh ... Makes perfect sence hehe nice one ..

loadingpleasewait
a snow griffon
a snow griffon
Posts: 332
Joined: Sat Sep 14, 2002 8:46 am

Post by loadingpleasewait » Thu Aug 12, 2004 10:44 am

Why not use OR??

Code: Select all

||    means  OR
so instead of all you've typed, do this:

Code: Select all

|lazyranger.mac 
|Ranger Self Buff/Assist Snare Pet macro 
|By Ranjah_Down 

#include spellcast.inc 
#chat tell 

Sub Main 

/echo Lazy Ranjah Loaded... 

  :loop 
/if (!${Me.Buff[Eagle Eye].ID}) { 
    /target ${Me} 
    /call cast "Eagle Eye" 
} 
  
/if (!${Me.Buff[Mask of the Stalker].ID}) { 
    /target ${Me} 
    /call cast "Mask of the Stalker" 
} 

/if (!${Me.Buff[Protection of the Wild].ID}) { 
    /target ${Me} 
    /call cast "Protection of the Wild" 
} 

/if (!${Me.Buff[Nature's Precision].ID}) { 
    /target ${Me} 
    /call cast "Nature's Precision" 
} 

    /doevents 
    /goto :loop 
    /return 

Sub Event_Chat(ChatType,Sender,ChatText) 
|====[Snare]======================================== 
    /if (${ChatText.Equal[snare]} || ${ChatText.Equal[snare pet]}) { 
        /target ${Sender} 
        /delay 2s 
        /assist ${Sender} 
        /delay 2s 
        /call cast "Ensnare" 
        /tell ${Sender} Inc Snare on %T. 
    } 

|====[SoE]========================================== 
    /if (${ChatText.Equal[soe]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Spirit of Eagle" 
        /tell ${Sender} inc soe 
    } 

|====[SoT]========================================== 
    /if (${ChatText.Equal[sot]} || ${ChatText.Equal[tunare]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Strength of Tunare" 
        /tell ${Sender} inc sot    
    } 

|====[SoP]========================================== 
    /if (${ChatText.Equal[sop]} || ${ChatText.Equal[predator]} || ${ChatText.Equal[pred]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Spirit of the Predator" 
        /tell ${Sender} inc sop 
    } 

|====[CoR]========================================== 
    /if (${ChatText.Equal[cor]} || ${ChatText.Equal[rathe]}) { 
        /target ${Sender} 
        /delay 2s 
        /call cast "Call of the Rathe" 
        /tell ${Sender} inc cor 
    }  
      
    /return 
I dunno, hehe, I just like to reduce code whenever possible..
LOADING PLEASE WAIT...

Ranjah_Down
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Aug 12, 2004 12:40 am

Post by Ranjah_Down » Thu Aug 12, 2004 11:45 am

never thought of that, good idea =)
You have been slain by a Fire Beetle.

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Fri Aug 13, 2004 1:31 am

I do something similar... Incorporating the codes I have into yours for better structure.

Code: Select all

|lazyranger.mac
|Ranger Self Buff/Assist Snare Pet macro
|By Ranjah_Down 

#include spellcast.inc 
#chat tell 

Sub Main
/declare j int outer
/declare MyBuffs[4] string outer
/varset MyBuffs[1] "Eagle Eye"
/varset MyBuffs[2] "Mask of the Stalker"
/varset MyBuffs[3] "Protection of the Wild"
/varset MyBuffs[4] "Nature's Precision"

/declare TargetBuff[5] string outer
/declare TBuffsName[5] string outer
/varset TBuffsName[1] "soe"
/varset TargetBuff[1] "Spirit of Eagle"
/varset TBuffsName[2] "sot"
/varset TargetBuff[2] "Strength of Tunare"
/varset TBuffsName[3] "tunare"
/varset TargetBuff[3] "Strength of Tunare"
/varset TBuffsName[4] "sop"
/varset TargetBuff[4] "Spirit of the Predator"
/varset TBuffsName[5] "cor"
/varset TargetBuff[5] "Call of the Rathe"

/declare AssistBuff[2] string outer
/declare ABuffsName[2] string outer
/varset ABuffsName[1] "snare"
/varset AargetBuff[1] "Ensnare"
/varset ABuffsName[2] "snare pet"
/varset AargetBuff[2] "Ensnare"

/echo Lazy Ranjah Loaded... 

  :loop
|====[Self Buffs]========================================
/for j 1 to ${MyBuffs.Size}
    /if (!${Me.Buff[${MyBuffs[${j}]}].ID) {
        /target ${Me}
        /call Cast ${MyBuffs[${j}]}
    }
/next j

    /doevents 
    /goto :loop 
    /return 

Sub Event_Chat(ChatType,Sender,ChatText)

|====[Target Buffs]========================================
/for j 1 to ${TargetBuff.Size}
    /if (${ChatText.Equal[${TBuffName[${j}]]}) {
        /target ${Sender}
        /delay 2s
        /call cast ${TargetBuff[${j}]}
        /tell ${Sender} inc ${TBuffName[${j}]}
    }
/next j

|====[Assist Buffs]========================================
/for j 1 to ${AssistBuff.Size}
    /if (${ChatText.Equal[${ABuffName[${j}]]}) {
        /target ${Sender}
        /delay 2s 
        /assist ${Sender}
        /delay 2s 
        /call cast ${AssistBuff[${j}]}
        /tell ${Sender} Inc Snare on %T.
    }
/next j

/return

edited: added all the missing brackets.
Last edited by zanomo on Fri Aug 27, 2004 1:26 am, edited 1 time in total.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Wed Aug 18, 2004 7:53 pm

Was someone looking for this?
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

mercdev
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Jul 29, 2004 7:22 pm

Post by mercdev » Thu Aug 26, 2004 1:24 am

Code: Select all

/tell ${Sender} inc ${TBuffName[${j}] 
should be

Code: Select all

/tell ${Sender} inc ${TBuffName[${j}]}
otherwise you got some nifty tells being sent to people :wink:
1. [url=http://macroquest2.com/includes/manual.php]RTFM[/url]
2. [url=http://macroquest2.com/phpBB2/search.php]Search is your friend[/url]
3. [url=http://www.macroquest2.com/main.php?p=download]Download MQ2[/url]

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Fri Aug 27, 2004 1:23 am

Oh yea... LOL. Guess i deleted an extra bracket during my cut/paste/edit...

Thanks for the headsup. :smile: