COMMENT out the Orange code to remove snare I didnt feel like putting the code to pass it a value in command line.
Don't forget to change the red code to suit your rangers specific spells. if you dont have nalots patch remove completely.. Enjoy I did take this code from an old mac, however dont remember who to give credit to.
EDIT: Fixed some formatting sorry...
May 11 - UPDATED Events. Blech... also added new check for ranged ready then fires.
Code: Select all
|arch.mac Auto-Archery
|just run this macro, target a mob, and turn on auto attack
|The macro will detect autoattack, turn it back off, and begin firing arrows
|or as I do, just /assist your MA =P
|
|
|If the case happens where arrows are poofing, you can auto melee as |well
|just turn auto attack (For the second time) back on, and run up to yer |target
|the macro will now auto kick and auto disarm.
|
|
|Fire the macro off with a forage variable and it will autoforage
| example: /macro arch.mac forage
|
|the macro will recast self haste of "eyepatch of plunder" CHANGE THIS
|the macro will recast the spell "falcon eye" CHANGE THIS
|although not reliably, it will not detect fizzles, interupts, or stuns.
|
|It will display the experience gain as an echo and popup.
|
| REQUIREMENT Spellcast.inc for reliable spell casting
|
| Modified by Kasodo May 5, 2004 updated to MQ2Data /MQ2Datavars
| Autosnare at 70%
| usage /mac arch <Forage>; enter forage if you want to auto forage
#include spellcast.inc
#turbo 20
#Event exp "#*#experience!#*#"
#Event resist "Your target resisted the Ensare spell#*#"
[color=orange]#Event resist "Your Ensnare spell has worn off."[/color]
Sub Main
/echo "Auto-Arch Macro has begun."
/declare startexp int outer
/declare startaaxp int outer
/declare currentxp int outer
/declare xpgain int outer
/declare currentaa int outer
/declare aagain int outer
/declare needsnare int outer
/declare targetarray[4] string outer
/varcalc startexp ${Me.PctExp}
/varcalc startaaxp ${Me.PctAAExp}
/varset needsnare 1
/if (${Defined[Param0]} && ${String[${Param0}].Equal[forage]}) {
/echo "Auto-Forage enabled"
}
:mainloop
/if (${Me.Combat} && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /call Archery
/if (${String[${Param0}].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
/doability Forage
/delay 20
/if (${Cursor.ID}) /autoinv
}
[color=red] /if (!${Me.Buff[Falcon Eye].ID}) /call Cast "Falcon Eye" gem8
/if (!${Me.Buff[Captain Nalots Quickening].ID}) /call Cast "Eyepatch of Plunder" item [/color]
/doevents
/goto :mainloop
/return
Sub Archery
/attack off
/varset targetarray[1] ${Target.CleanName}
/varset targetarray[2] ${Target.Level}
/varset targetarray[3] ${Target.Name}
/varset targetarray[4] ${Target.ID}
/echo Fighting a ${targetarray[2]} ${targetarray[1]}
/face nolook
:CloserAF
/if (${String[${Param0}].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
/doability Forage
/delay 20
/if (${Cursor.ID}) /autoinv
}
[color=orange] /if (${needsnare}==1 && ${Target.PctHPs}<70) {
/call Cast "Ensnare" gem8
/varset needsnare 0
} [/color]
/doevents
/if (!${Target.ID}) /goto :EndAF
/doevents
[color=red]/if (${Me.RangeAttackReady}) /ranged[/color]
/goto :CloserAF
/return
:EndAF
/echo a ${targetarray[2]} ${targetarray[1]} is dead
[color=orange] /varset needsnare 1 [/color]
/keypress Num_5
/return
Sub Event_exp
/varset currentxp ${Me.PctExp}
/varset xpgain (${Math.Calc[${currentxp}-${startexp}]})
/varset currentaa ${Me.PctAAExp}
/varset aagain (${Math.Calc[${currentaa}-${startaaxp}]})
/popup "Gain: ${xpgain}% xp - ${aagain}% aa ## Cur: ${currentxp}% xp - ${currentaa}% aa"
/echo "Gain: ${xpgain}% xp - ${aagain}% aa ## Cur: ${currentxp}% xp - ${currentaa}% aa"
/varset startexp ${Me.PctExp}
/varset startaaxp ${Me.PctAAExp}
/return
[color=orange]Sub Event_resist
/varset needsnare 1
/return[/color]



