Distance to $spawn

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

ImaNoob
a ghoul
a ghoul
Posts: 89
Joined: Mon Mar 08, 2004 4:37 am

Distance to $spawn

Post by ImaNoob » Sun Mar 21, 2004 10:30 pm

I'm missing something horribly obvsious I think, but assuming $tid is the SpawnID of my target

/varset disttotarget $spawn(@tid,distance)

Would this place the distance to the mob I have targeted into disttotarget, if so it makes my life a hell of a lot easier, and /hug to whoevers idea that was :)
Last edited by ImaNoob on Mon Mar 22, 2004 12:30 am, edited 1 time in total.

[40oz]
a hill giant
a hill giant
Posts: 156
Joined: Tue Nov 12, 2002 12:14 pm

Post by [40oz] » Sun Mar 21, 2004 10:37 pm

First off your syntax is wrong.

$ - used at the beginning of MQ built-in variables that return a value
@ - returns the value of user defined variable

Code: Select all

/varset dist_to_target $spawn(@target_id,dist)
Would be the proper way to use the variables in your question there. Whether that's the right useage of $spawn, you'd have to check the manual because I don't remember off the top of my head.

ImaNoob
a ghoul
a ghoul
Posts: 89
Joined: Mon Mar 08, 2004 4:37 am

Ooops!

Post by ImaNoob » Mon Mar 22, 2004 12:30 am

Ok I see that, issue