Macro command /cast ins and outs

Work with other players to create your own special custom interfaces and macros.
Post Reply
User avatar
Neack
Posts: 19
Joined: 19 Sep 2013 16:45

Macro command /cast ins and outs

#1 » Post by Neack » 30 Jul 2014 14:15

Hi everyone,

I have a doubt concerning how the /cast command in macros is supposed to work. And no, it is NOT a newbie question from someone who's just starting to write macros. I've been writing them for years. Hence there's no point in giving me a link to some basic macro guide, thank you. :P

So, a few months ago, something like, for example:

Code: Select all

/cast Spirit Walk
/cast !Ghost Wolf
would put you in Ghost Wolf if Spirit Walk wasn't available (no Feral Spirit pet-wolves out or spell on CD).
Currently that doesn't work; it will either cast Spirit Walk, if available, or nothing at all. And this new behavior does seem to be inline with what is said in e.g. Wowwiki:
In general, you cannot cast more than one spell with a single click of a macro. Most spells and some items trigger the global cooldown (GCD) which keeps you from taking too many actions at once. Even if a spell fails to cast, if it would trigger the GCD, it prevents subsequent /casts in the macro from running. This was not the case prior to patch 2.0
I'd never given that much thought about it before, meaning I had assumed that was the behavior for successful casts but failed casts would simply proceed to execute the next line in the macro, no matter what that next line was. And this was indeed as TrueWoW, as well as other private servers worked for years.

But I now have a doubt about a workaround to the new behavior which I'm not sure works as intended or is still something that will be fixed in the future (I'm also writing a guide to macroing on my guild site, so I'd like to know in advance...).
This is the partial workaround:

Code: Select all

/cast [pet] Spirit Walk
/cast !Ghost Wolf
With this macro, I can shift to Ghost Wolf even if my pets are out (provided the Spirit Walk is unsuccessful (on CD)). The alternative way of doing this workaround (one of which I am absolutelly certain works as intended, but not as I want it) would be:

Code: Select all

/cast [pet] Spirit Walk; !Ghost Wolf
But in this later case, Ghost Wolf would only be cast if my pets were not out (but the Spirit Walk possibly on CD, getting neither cast).

So my question is basically: is the second macro I posted working as intended or will it likely be changed sometime in the future?
As a side note, I also use that second macro's mechanic with other spells and other classes. That example was just the latest I bumped on to. Sorry if it wasn't the best... ^_^

Thanks in advance!

User avatar
Cyrius
Posts: 179
Joined: 12 Oct 2010 22:07

Re: Macro command /cast ins and outs

#2 » Post by Cyrius » 30 Jul 2014 18:28

Well... you have basicaly answered your own question with that quote from wowwiki:
Even if a spell fails to cast, if it would trigger the GCD, it prevents subsequent /casts in the macro from running
In the 1st macro that you have linked you are trying to cast 2 spells at the same time without any condition that would exclude the casting of the 1st spell and passing to the 2nd. And since both share a gcd, only the 1st one is casted. In the 2nd and 3rd cases (which are one and the same ,btw, the 3rd is simply a shorter version) the condition is indeed presant ([pet]) therefore a gcd wont triggered for the 1st spell cuz its excluded if you dont have a pet.

Whether or not this is a bug depends on what the definition of a "failed cast" is.

Ive tryed to make a similar macro where i cast 2 spells of different schools, so that when the 1st school is locked i can cast the second spell. Aaand it doenst work cuz, what i asume happens is, the 1st spell is considered as a failed cast (since tree is locked) therefore a gcd activates which prevents the casting of the second ability.

I hope this helps.

User avatar
Neack
Posts: 19
Joined: 19 Sep 2013 16:45

Re: Macro command /cast ins and outs

#3 » Post by Neack » 08 Aug 2014 00:43

Thanks for your reply, Cyrius and sorry for taking so long getting back, been busy IRL.

I agtee with what you said and I do think you depict it as it worked on retail in 3.3.5a.

However.... Concerning this:
Cyrius wrote: In the 2nd and 3rd cases (which are one and the same ,btw, the 3rd is simply a shorter version) the condition is indeed presant ([pet]) therefore a gcd wont triggered for the 1st spell cuz its excluded if you dont have a pet.

Whether or not this is a bug depends on what the definition of a "failed cast" is.
I agree my 2nd and 3rd macros should do exactly the same but they do not. The 3rd one works as intended, I believe, and as you described it but the 2nd doesn't.
More exactly, the 3rd one correctly only casts Ghost Wolf IF AND ONLY IF the condition [pet] is NOT met, i.e. Ghost Wolf is only cast if Feral Spirit is not active (these pets in particular are present for 30 seconds after being summoned).
But Spirit Walk can also fail because it is on cooldown (this buff lasts for 15 seconds and has a 2 minutes cooldown), i.e. you can have your pets out but have Spirit Walk unavailable. If this is the case, the 3rd macro will still not cast Ghost Wolf, even though Feral Spirit failed to cast for reasons other than the pets not being out. The 2nd one however will indeed cast Ghost Wolf even if Spirit Walk fails when the [pet] condition is true.
This I believe is a bug.

More input welcome. ^_^

User avatar
Neack
Posts: 19
Joined: 19 Sep 2013 16:45

Re: Macro command /cast ins and outs

#4 » Post by Neack » 13 Aug 2014 13:17

Sooooo... It turns ou I was being silly... as usual. ^_^

Spirit Walk, being a pet ability, is NOT bound to the GCD. Thus, the macro bellow would actually cast both Spirit Walk (if the pets were out and it was off its CD) and Ghost Wolf at the same time:

Code: Select all

/cast Spirit Walk
/cast !Ghost Wolf
^_^


So, to properly test my case, I used a couple other shaman spells: Earth Shoch ((unchanged) 25 yards range and 6 seconds CD) and Lightning Bolt (30 yards range and no CD).

1. As intended, the macro bellow will cast Earth Shock when it is in range and off its CD. It will never ever cast Lightning Bolt.

Code: Select all

/cast Earth Shock
/cast Lightning Bolt
2. With the macro bellow:
2.1. When the pets are out, it will always try and cast Earth Shock and never ever cast Lightning Bolt - a failed cast of Earth Shock for not being in its 25yds range will not change this, even if you are at Lightning Bolt's range, i.e. if you are precisely at 30yds from your target. :tick:
2.2. When the pets are not out, it will always try and cast Lightning Bolt and never ever cast Earth Shock.

Code: Select all

/cast [pet] Earth Shock
/cast Lightning Bolt
Matter of fact, if you add a line in the begining, "#showtooltip", the icon will change between the two spells depending on whether your pets are out or not. ;)

3. Just for the sake of testing, the macro bellow will always try and cast Earth Shock, Lightning Bolt will never ever be cast. Exactly like the 1st macro in this post.

Code: Select all

/cast [true] Earth Shock
/cast Lightning Bolt
So, I guess it's all working as intended. In other words, like Cyrius said, the 2nd and 3rd macros on my first post work exactly the same. :tick:

Sorry about that messup. :oops:

P.s.: Lock thread?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests