Playing a ranger myself I've made this macro for Auto Archery. My ranged attack was on hotbutton two as well, but numpad 0 also pushes hotbutton 2, this makes it such that you can still type while autoshooting and not get strings of 2222s in your text:
Code: Select all
#turbo
Sub Main
/echo Autofire ON
:Loop
/if $target(type)==NPC {
/if $char(casting)==FALSE {
/press Num_0
/delay 1
}
/goto :Loop
} else {
/echo No NPC targeted
}
/echo Autofire OFF
/return
The macro stops if your target is no longer an NPC, so you can hit escape to stop it.. or target a player for buff or heal easily.
After using it for a few weeks I wanted to have a macro that I would start when I logged on and that would be perma running. Events set an autoarchery toggle, so in order to turn it on or off you make a hotbutton with "/echo Auto-Archery". Code for this last macro looks like:
Code: Select all
#turbo
#event eToggleArchery "Auto-Archery"
Sub Main
/declare vArcheryToggle global
/varset vArcheryToggle "FALSE"
/echo Ranger Assistant Started
:MainLoop
/if "@vArcheryToggle"=="TRUE" {
/if $target(type)==NPC {
/if $char(casting)==FALSE {
/press Num_0
/delay 1
}
} else {
| /varset vArcheryToggle "FALSE"
/echo Auto-Archery
}
}
/doevents
/goto :MainLoop
/return
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Event_eToggleArchery
/if "@vArcheryToggle"!="TRUE" {
/varset vArcheryToggle "TRUE"
/echo ON
} else {
/varset vArcheryToggle "FALSE"
/echo OFF
}
/return | Event_eToggleArchery