Page 1 of 1

LF macro help!

PostPosted: Fri Jan 15, 2016 11:16 pm
by Myskillkills
Hello everyone.
I managed to make a mousover macro for my pet.
I've got the macro, which when I use it makes my pet attack the target that Im mouseovering even when I have another target in my target, without losing the current target. Well, if to say simply, I've got 2 enemies in front of me, and one is in my target, and one is not, but Im mouseovering the 2nd one (who is not in my target) and use the macro, and it makes my pet attack that guy without targeting him, and not losing my current enemy from target.
It looks like this:

/script if UnitCanAttack("player","mouseover") then TargetUnit("mouseover");PetAttack();TargetUnit("playertarget"); else PetAttack(); end

My question is if its possible to make same macros but not for /script PetAttack();, but for my spells from the spellbook, aka /cast Scatter Shot, for example? Cant make it wotking :|

Re: LF macro help!

PostPosted: Fri Jan 15, 2016 11:27 pm
by LYQ
did you try it with
CastSpellByName("Scatter Shot")
?

Re: LF macro help!

PostPosted: Sat Jan 16, 2016 7:04 pm
by Myskillkills
Ty mate, works just perfect!

Re: LF macro help!

PostPosted: Sat Jan 16, 2016 7:21 pm
by Levinas
So how would the full macro look with Scatter Shot? Just interested at this point really, but as a Warlock this could be interesting.

Re: LF macro help!

PostPosted: Sat Jan 16, 2016 8:49 pm
by Myskillkills
/script if UnitCanAttack("player","mouseover") then TargetUnit("mouseover");CastSpellByName("Scatter Shot");TargetUnit("playertarget"); else CastSpellByName("Scatter Shot"); end

If you want to make a macro with some spell that has different ranks, write it as well, like CastSpellByName("YourSpell(Rank X)")

Re: LF macro help!

PostPosted: Sat Jan 16, 2016 9:06 pm
by Levinas
Thanks, man.

<3

Re: LF macro help!

PostPosted: Mon Feb 15, 2016 3:57 pm
by Bobosinio1
Gotta question. How can i remove the global cooldown from this macro? I try to cast no global cooldown spell and it still waits till gcd wears off... Thanks for help.

Re: LF macro help!

PostPosted: Tue Feb 16, 2016 9:20 am
by Dreez
some spells will still require a GCD although they do not trigger one

you can't remove a GCD as it is triggered server side.

If you want a more detailed explanation you'd have to link your macro