New MQ2Data working archery macro.

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

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

New MQ2Data working archery macro.

Post by loadingpleasewait » Tue Apr 27, 2004 12:23 pm

New MQ2Data working archery macro.

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 and /autoequip everything
| example:  /macro arch.mac forage
|
|the macro will recast self haste of "eyepatch of plunder" 
|the macro will recast the spell "eagle eye"
|although not reliably, it will not detect fizzles, interupts, or stuns.
|
|It will display the experience gain as an echo and popup.

#turbo 40
#Event exp "experience!"
#event haste "The quickening spirit departs"
#event eagle "The avian presence departs"


Sub Main(Arg)
/zapvars
   /echo "Auto-Arch Macro has begun."
   /declare startexp global
   /declare startaaxp global
   /declare currentxp global
   /declare xpgain global
   /declare currentaa global
   /declare aagain global 
   /declare Arg global
   /declare targetarray array 

   /varcalc startexp ${Me.Exp}/3.30
   /varcalc startaaxp ${Me.AAExp}/3.30

/if (${Defined[Arg]} && ${String[@Arg].Equal[forage]}) { 
   /echo "Auto-Forage enabled"
   }
      :mainloop
   /if (${Me.Combat} && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /call Archery
         /if (${String[@Arg].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
            /doability Forage
            /autoinventory
         }
         /doevents
      /goto :mainloop
/return

Sub Archery
  /attack off
  /varset targetarray(0) ${Target.CleanName} 
  /varset targetarray(1) ${Target.Level} 
  /varset targetarray(2) ${Target.Name} 
  /varset targetarray(3) ${Target.ID} 
    /echo Fighting  @targetarray(1) @targetarray(0) 
  /face nolook
  :CloserAF   
  /ranged
         /if (${String[@Arg].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
            /doability Forage
            /autoinventory
         }
    /if (${Target.Distance}<11 && $(Me.AbilityReady[Kick]} /doability Kick
    /doevents
    /if (${Target.Distance}<11 && $(Me.AbilityReady[Disarm]} /doability Disarm
    /if ${Target.ID}!=@targetarray(3) /goto :EndAF 
     /doevents
    /goto :CloserAF 
/return

:EndAF 
    /echo @targetarray(1) @targetarray(0) is dead 
    /varset targetarray(3) 0 
    /keypress Num_5 
/return 


Sub Event_exp
   /varcalc currentxp ${Me.Exp}/3.30
   /varcalc xpgain @currentxp-@startexp
   /varcalc currentaa ${Me.AAExp}/3.30
   /varcalc aagain @currentaa-@startaaxp
      /popup "Gain: @xpgain% xp - @aagain% aa ## Cur: @currentxp% xp - @currentaa% aa"
      /echo "Gain: @xpgain% xp - @aagain% aa ## Cur: @currentxp% xp - @currentaa% aa"
   /varcalc startexp ${Me.Exp}/3.30
   /varcalc startaaxp ${Me.AAExp}/3.30
/return

Sub event_eagle
      /cast  "Eagle Eye"
      /delay 5s
/return

Sub event_haste
      /cast item "Eyepatch of Plunder"
      /delay 4s
/return   

LOADING PLEASE WAIT...

llama
orc pawn
orc pawn
Posts: 20
Joined: Mon Dec 29, 2003 8:13 am

Post by llama » Tue Apr 27, 2004 7:17 pm

I did this to check for buff and rebuff. Havent tested "Mask of war" yet.

Code: Select all

|| Bow Buff 
:hawk 
/if (!${Me.Buff[Hawk Eye].ID}) { 
/Cast "Hawk Eye" 
/delay 3 
/goto :hawk 
} 
This for equipped item:

Code: Select all

|| click item
/if (!${Me.Buff[Yalp II].ID}) {
/cast item "Mask of war"
}