Looking for help for cast on target's target.

Looking for help for cast on target's target.

by Myskillkills » Fri Feb 19, 2016 3:31 pm

My problem is....
Lets say, I have 4 different ranks of spell and I use 2 of them, the last rank and somewhat around rank 2.
So I bind last rank on E, and rank 2 on ctrl + e.
And I have a macro to cast a spell on my target's target without losing my target, and I have it binded with alt, so lets say if I just want to cast a spell I press E, but when I want my spell to be casted on target's target I just add alt before I press e, so it casts on assist, it looks like:

/Script if UnitIsFriend("player", "target") then TargetUnit("targettarget") CastSpellByName("shadow word: pain") TargetLastTarget() else CastSpellByName("shadow word: pain") end
/script TargetLastEnemy()

Works perfect except one thing, I cant bind rank 2 to be casted on my target's target, since.... The bind will look like alt+ctrl+e, its simply not possible to do in keybindings menu.
What can you suggest? Is there any command like "IfAltIsPressed" or something, so I can have smth like if alt is pressed, then blabla script above, else /cast spell?
User avatar
Myskillkills
Senior Sergeant
Senior Sergeant
 

Re: Looking for help for cast on target's target.

by Dreez » Fri Feb 19, 2016 6:43 pm

IsAltKeyDown()
IsShiftKeyDown()
IsControlKeyDown()

Code: Select all
/run c=CastSpellByName if IsAltKeyDown() then TargetUnit("targettarget") if IsControlKeyDown()then c("Shadow Word: Pain(Rank 2)")else c("Shadow Word: Pain")end TargetLastTarget() else c("Shadow Word: Pain")end

this should work
Dreez - PvP server
<Endzeit>
User avatar
Dreez
Knight-Lieutenant
Knight-Lieutenant
 

Re: Looking for help for cast on target's target.

by Myskillkills » Fri Feb 19, 2016 9:04 pm

Thank you!!
But from how it looks whats left is to bind rank 2 spell seperately from that macro, right?
Since what we have now:
If no alt and ctrl is pressed, I use last rank on my current target.
If alt is pressed and no ctrl is pressed, I use last rank on my target's target.
If alt is pressed and ctrl is pressed, I use rank 2 on my target's target.
So I still need to bind ctrl + e to cast rank 2 spell on my target, am I missing smth?
User avatar
Myskillkills
Senior Sergeant
Senior Sergeant
 

Re: Looking for help for cast on target's target.

by Dreez » Sat Feb 20, 2016 12:23 am

yeah missed that one and too lazy to add it + make it fit into a macro

you could always just bind it on separate keys you know
Dreez - PvP server
<Endzeit>
User avatar
Dreez
Knight-Lieutenant
Knight-Lieutenant
 


Return to Addons & macros