Alert bug?

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Alert bug?

Post by DeathSpiral » Sun Sep 29, 2002 11:59 am

Howdy-
Have a possible bug with alerts and PC targets. Say I want to locate the nearest PC who isn't in my alert list. (Trying to buff a group of people, whomever is within range). The following is an excerpt from my code thus far:

Code: Select all

/alert clear 1
/target pc
/goto :CheckDistance

:Retarget
   /target pc noalert 1

:CheckDistance
/if n $target(range)>85 /goto :NoMoreInRange

/cast "Gift of Magic"
/delay 55
/cast Insight
/delay 47
/cast Clarity
/delay 35

/alert add 1 $target(name)
/goto :Retarget

:NoMoreInRange
/end
However, with code like that, after we get done with the absolute nearest person, target gives us

Code: Select all

There are no '' around here.
Which, obviously enough, doesn't work all that well.

If I change the retarget line to

Code: Select all

/target noalert 1
I don't get the bug, but I can also end up with an NPC target, and I really don't need to be wasting my mana on guards...

For the record, I do get the error as well if I use

Code: Select all

/alert add pc $target(name)
.

(Range on GoM and Insight is 100locs, on Clarity its 200locs - checking on 85 just in case they are moving - most people tend to stop when a buff lands on them)

Any thoughts anyone?
I am orc pawn, hear me yell for centurians...

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sun Sep 29, 2002 4:35 pm

how about something like this:

Code: Select all

/alert clear 1 
| Removed redundant code. Targetting a PC with
| noalert 1 and a cleared alert list is the same as
| targetting any PC in the zone.

:Retarget 

| Press esc to clear your target before retargetting
   /press esc
   /delay 1
   /target pc noalert 1 

:CheckDistance 
| NOTE: bugfix, $target(range) does nothing.
| Changed to $target(distance).
|
   /if n $target(distance)>85 /goto :NoMoreInRange 

| If you have no target, $target(distance) returns 0.
   /if n $target(distance)==0 /goto :NoMoreInRange

   /cast "Gift of Magic" 
   /delay 55 
   /cast Insight 
   /delay 47 
   /cast Clarity 
   /delay 35 

   /alert add 1 $target(name) 
/goto :Retarget 

:NoMoreInRange
/end