Help with code

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

User avatar
Aarrow
a lesser mummy
a lesser mummy
Posts: 30
Joined: Thu Aug 12, 2004 2:38 pm

Help with code

Post by Aarrow » Thu Aug 12, 2004 2:46 pm

Can anyone help me with this code... kinda a noob, never really programed that much, etc.
What I'm trying to do is display if you're close enough to cast on something (If you are it will display 0, if not, it will display how much closer you need to be)

Code: Select all

${If[${Math.Calc[${Target.Distance}-${If[${Me.Gem[1].Range}==0,,${Me.Gem[1].Range}]}]}<=0,0,${Int[${Math.Calc[${Target.Distance}-${If[${Me.Gem[1].Range}==0,,${Me.Gem[1].Range}]}]}]}]}
I'm sure it's something simple, but if anyone can help, thanks.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 12, 2004 2:54 pm

/em looks around and notices that this is not the help forum and walks away.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Aarrow
a lesser mummy
a lesser mummy
Posts: 30
Joined: Thu Aug 12, 2004 2:38 pm

Post by Aarrow » Thu Aug 12, 2004 2:58 pm

err, oops... :oops:
I saw a bunch of other help posts here, but moving to the help forum now.