timed command should be used with the slash command you intend to fire.
Code:
/timed 3 /target pc tank next
On separate lines it's likely parsing them as separate commands.
Also, I'm not sure I understand the purpose of using a timed command here.
For clarity.
means in ## amount of 10ths of a second, use this command. But keep processing code.
So in your command you'd saying in 3 tenths of a second, issue the /target command. (assuming that's the original intent)
Then you
. So you'd be down to a /delay 2 by the time the command even fired. If the intent of the delay is to wait until you have the target. then I'm not sure I see a point in the timed command at all.
You also have
Code:
${If[!${Target.Buff[Ennui].ID},TRUE,FALSE]}
Which is an exaggerated way of getting the result.
Code:
!${Target.Buff[Ennui].ID}
processes the result the same way. Which is to say that if the target doesn't have a buff that starts with "Ennui".
Code:
/if ${FirstTank}!=${Target.Name} /goto :NextBuff
You can't compare names in this fashion using macros. You'll have to instead say
Code:
/if (${FirstTank.NotEqual[${Target.Name}]}) /goto :NextBuff
You could avoid an unnesseary delay by putting the casting logic all into a block statement. Since you're running in a loop, you can avoid accidental bypass of a target because you issue a casting command, but then immediately check to see if you're not casting by adding a delay that makes sure you start casting first.
Code:
/if (!${Target.Buff[Ennui].ID}) {
/casting "Ennui Rk. II" gem13
/delay 1s ${Me.Casting.ID}
/delay 10s !${Me.Casting.ID}
}
You can force clear your target using
, with a
at the start of it to keep it from outputting to the mq2 window. That way when you
you can create an early stop on your delay to stop the delay if you have a target id.
Code:
/squelch /target clear
/delay 1s !${Target.ID}
/target pc tank next
/delay 1s ${Target.ID}
You can use a while loop instead of a goto statement. But either way works.
Code:
Sub Main
/declare FirstTank string outer
/squelch /target clear
/delay 1s !${Target.ID}
/target pc tank next
/delay 1s ${Target.ID}
/varset FirstTank ${Target.Name}
:NextBuff
/if (!${Target.Buff[Ennui].ID}) {
/casting "Ennui Rk. II" gem13
/delay 1s ${Me.Casting.ID}
/delay 10s !${Me.Casting.ID}
}
/squelch /target clear
/delay 1s !${Target.ID}
/target pc tank next
/delay 1s ${Target.ID}
/if (${FirstTank.NotEqual[${Target.Name}]}) /goto :NextBuff
/echo We are targeting original tank, ending macro.
/return