Macro Help!

Macro Help!

by tjobo2 » Mon Mar 30, 2015 12:02 am

Hello, i don't know where to post this so I'll try here and then mod can move it if needed. I need help with a macro / report a bug on the server. I wanna run this script in a macro

"/run if(SpellStopCasting()) then CastSpellByName("Heal") else CastSpellByName("Heal") end"

What this script should do is

1. if I'm not casting anything then it should cast a spell called "Heal".

2. If I'm casting something then it should cancel that cast and cast a spell called heal.

Desired results: When i press the script i want it to cast heal / cancel the current cast and recast the heal spell If i am casting when i press it.

Result i get: First time i press the script while I am casting the spell it cancells it, the second time i press it the castbar dissappears but the spell copntinues casting.

This is really awkward to explain but if you copy the script and try it yourself you will see. ¨Just paste the script into a macro and press it twice (wait for GCD to finish before pressing it again so you can ectually see the results).
Last edited by tjobo2 on Tue Mar 31, 2015 11:33 am, edited 1 time in total.
tjobo2
Tester
 

Re: Macro Help!

by cyklon » Mon Mar 30, 2015 7:01 am

tjobo2 wrote:Hello, i don't know where to post this so I'll try here and then mod can move it if needed. I need help with a macro / report a bug on the server. I wanna run this script in a macro

"/run if(SpellStopCasting()) then CastSpellByName("Heal") else CastSpellByName("Heal") end"

What this script should do is

1. if I'm not casting anything then it should cast a spell called "Heal".

2. If I'm casting something then it should cancel that cast and cast a spell called heal.

Desired results: When i press the script i want it to cast heal / cancel the current cast and recast the heal spell If i am casting when i press it.

Result i get: First time i press the script while I am casting the spell it cancells it, the second time i press it the castbar dissappears but the spell copntinues casting.

This is really awkward to explain but if you copy the script and try it yourself you will see. ¨Just paste the script into a macro and press it twice (wait for GCD to finish before pressing it again so you can ectually see the results).

Ask if you have any more questions cuz im semi-drunk so ye


To get it to work you have to log the spellstopcasting in a variable and call for the variable. if its true cast first heal else cast second.

Cant be done without addon.
User avatar
cyklon
Senior Sergeant
Senior Sergeant
 

Re: Macro Help!

by tjobo2 » Mon Mar 30, 2015 8:56 am

cyklon wrote:
To get it to work you have to log the spellstopcasting in a variable and call for the variable. if its true cast first heal else cast second.

Cant be done without addon.


No mate that's not the prob
tjobo2
Tester
 

Re: Macro Help!

by Cadaver » Mon Mar 30, 2015 8:41 pm

/script SpellStopCasting()
/cast Heal

This will stop cast anything, then cast Heal instead.
Do not spam it.
Cadaver
Private
Private
 

Re: Macro Help!

by tjobo2 » Tue Mar 31, 2015 11:34 am

Cadaver wrote:/script SpellStopCasting()
/cast Heal

This will stop cast anything, then cast Heal instead.
Do not spam it.


I appreciate the answer but you should know to test before you post a "solution". This does not solve the problem that i brought up.
tjobo2
Tester
 

Re: Macro Help!

by Zyfire » Tue Mar 31, 2015 11:53 am

tjobo2 wrote:
Cadaver wrote:/script SpellStopCasting()
/cast Heal

This will stop cast anything, then cast Heal instead.
Do not spam it.


I appreciate the answer but you should know to test before you post a "solution". This does not solve the problem that i brought up.


Are you sure? This looks exactly like what you're looking for?
Image

Knight Zyfire - Lvl 60 Mage <Flashback>
Zyfire
Senior Sergeant
Senior Sergeant
 

Re: Macro Help!

by tjobo2 » Tue Mar 31, 2015 5:18 pm

What he wrote and what I originally posted should function exactly the same, but none of them work.

I'm starting to think it's some server bug instead.
tjobo2
Tester
 

Re: Macro Help!

by macgarthur » Tue Mar 31, 2015 5:27 pm

Might be the limitations of vanilla WoW, download SuperMacro addon.
macgarthur
Senior Sergeant
Senior Sergeant
 

Re: Macro Help!

by tjobo2 » Tue Mar 31, 2015 6:55 pm

Supermacro or not the script should work (and i do have it).
tjobo2
Tester
 

Re: Macro Help!

by imaginary » Tue Mar 31, 2015 7:35 pm

This should work, /run if not IsAutoRepeatAction(59) then SpellStopCasting(); CastSpellByName("Heal"); end

subsitute 59 for where heal is in your bar
you have to mash it twice for it to work
imaginary
Tester
 


Return to Addons & macros