Range to Target Alert

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

Moderator: MacroQuest Developers

mponthepc
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Mar 06, 2005 1:01 pm

Range to Target Alert

Post by mponthepc » Sun Mar 06, 2005 1:06 pm

I get sort of distracted sometimes when I'm on a heal rotation or just healing in a group and I forget to check my range. This is an extremely simple macro that I use to keep my ADD in check. I just messed around with the already created Follow macro that comes with MQ as my programming skills are still under development.

Edit: Updated it to allow for the ability to specify distance.

Code: Select all

| -- Range.mac 
| 
| Program by MPonthePC. 
| Date: 5/08/2005 
| Version: 0.2 
| 
| Overview: Warns if you are out of a specified range of your target via popup.
| Usage: /macro range distance (distance numeric value)
|    NOTE: Distance defaults at 100, which is the default for complete heal.
| 
|      * ex: /macro range 200

#turbo 
Sub Main 
   /declare spellrng int outer 100 
   /echo Range to Target Checker Activated. 
      /if (${Defined[Param0]}) {    
      /varset spellrng ${Param0} 
      /echo Current range is set at ${spellrng} 
   } else /echo No range specified setting range to 100  
   :Loop 
      /if (${Target.Distance}>=${spellrng}) /popup ${Target.CleanName} is Out of Range! Get Closer. 
      /if (${Target.Distance}<${spellrng}) /goto :Loop 
      /delay 1S 
   /if (${Target.ID}) /goto :Loop 
/return 

Last edited by mponthepc on Tue Mar 08, 2005 3:52 pm, edited 5 times in total.

TheNewGuy
a snow griffon
a snow griffon
Posts: 307
Joined: Sat Jul 10, 2004 9:33 am
Contact:

Post by TheNewGuy » Sun Mar 06, 2005 1:21 pm

Hmmm I think I like it...
[quote="dont_know_at_all"][quote="sybarite"]Um.. search works fine for me (used spell_routines.inc)... Try scrolling down you lazy fuck.

http://www.macroquest2.com/phpBB2/viewtopic.php?t=8964&highlight=spellroutines+inc[/quote]

That's great but he's looking for move.inc, you fucking spastic colon.[/quote]

RedManCommeth
a hill giant
a hill giant
Posts: 185
Joined: Sun Jul 11, 2004 12:15 pm

Post by RedManCommeth » Mon Mar 07, 2005 10:26 am

You might want to put a warning in when you are within 5% of the max range.

If you want to get really crazy, you could put some code in there to automatically move you closer if the target started moving out of range. Probably a bad idea though, if the MT got feared or something you'd start chasing him, kinda obvious.

RMC










xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Range to Target Alert

Post by xyilla » Mon Jan 05, 2026 1:33 am