Page 1 of 1

Lazy Ranger Mac

Posted: Thu Aug 12, 2004 1:04 am
by Ranjah_Down
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


Re: Lazy Ranger Mac

Posted: Thu Aug 12, 2004 1:19 am
by DumbStruck
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 .

Posted: Thu Aug 12, 2004 1:22 am
by Ranjah_Down
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.

Posted: Thu Aug 12, 2004 1:23 am
by DumbStruck
Doh ... Makes perfect sence hehe nice one ..

Posted: Thu Aug 12, 2004 10:44 am
by loadingpleasewait
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..

Posted: Thu Aug 12, 2004 11:45 am
by Ranjah_Down
never thought of that, good idea =)

Posted: Fri Aug 13, 2004 1:31 am
by zanomo
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.

Posted: Wed Aug 18, 2004 7:53 pm
by aChallenged1
Was someone looking for this?

Posted: Thu Aug 26, 2004 1:24 am
by mercdev

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:

Posted: Fri Aug 27, 2004 1:23 am
by zanomo
Oh yea... LOL. Guess i deleted an extra bracket during my cut/paste/edit...

Thanks for the headsup. :smile: