Page 1 of 1

Modifiers macros

PostPosted: Sat Jan 02, 2016 12:51 am
by Shabloshuura
Hi. I spended a little time on trying to do vanilla version of modifier macros implemented in TBC that look like

/cast [mod:shift] Greater Heal
/cast [mod:alt] Flash Heal
/cast [mod:ctrl] Dispell Magic

It changes casted spell depending on what else are you holding. Saves bars and can be used for self-casts too.

So, in pre-bc it should looks like this, for example:

/script c=IsControlKeyDown()if(c)then CastSpellByName('Dispell Magic') end
/script d=IsAltKeyDown()if(d)then CastSpellByName('Flash Heal', 1) end
/script e=IsShiftKeyDown()if(e)then CastSpellByName('Flash Heal') end
/cast Greater Heal

It causes that, if are you holding SHIFT while pressing macro, you will cast Flash heal on your target, Dispell Magic if you are holding CTRL, Flash Heal on you while pressing ATL and Greater Heal on your target while you are not pressing nothing else. As you can see, adding ", 1" forces spell to be casted on you. And "/cast Greater heal" have to be at the end, so system firstly check conditions, than do Greater.

You can write any spell or action you want instead of that ones, ofc.
Maybe it will help to someone. :)

Bye

Re: Modifiers macros

PostPosted: Sat Jan 02, 2016 11:54 am
by Dreez
if you're looking for a shorter version of this:
Code: Select all
/run local s=IsShiftKeyDown()c=IsControlKeyDown()x=IsAltKeyDown()n=CastSpellByName if(s)then n("Fireball")else if(c)then n("Flamestrike(Rank 1)")else if(x)then  n("Fireball(Rank 1)")else n("Scorch") end end end

it's also advised to declare the variables as local

Re: Modifiers macros

PostPosted: Thu Nov 02, 2017 9:14 pm
by mapoo
Hello,

thank you for this helpfull post. I'm trying to make this type of macro but with 2 modifiers (Alt+shift) pressed at the same time for healing wave.

it would be something like this:

nomodifier = healing wave
alt= rank 5
shift= healing wave on self
alt+shift= rank 5 healing wave on self.


but i'm strugging with the synthax ...