Conditional to check if casting? (WoW classic)

I may be missing something here… but WHY oh WHY is there a channeling conditional but no casting conditional??

(note: WoW Classic, and I’m using addon, MacroTalkClassic, that adds some macro chat functionality)

I want macro to cast a spell, then call out in party chat if I’m casting the spell. I don’t want it to say anything if I’m NOT casting the spell (i.e., if the cast fails because I’m moving/casting something else, etc.).

Currently looks like this:
/cast [nomod, @player]Lesser Heal
/optparty [nomod]Casting Lesser Heal on %n //note /optparty is from MacroTalk addon

BUT, if my cast of Lesser Heal fails, I want it to NOT announce to party. So something like:

/optparty [nomod, casting:Lesser Heal]Casting Lesser Heal on %n

This doesn’t work though, cause there’s no “casting” conditional.
If this was a channeled spell (i.e., Arcane missiles for mage) I could use [channeling:Arcane Missiles] but there doesn’t seem to be a casting equivalent.

Am I missing something?

Because channeled spells get interrupted when you start another cast, casted spells don’t.

You can’t solve this with MacoTalk but I think you can do it with a script.

well yes… I assume that IS the reasoning behind having a channeling conditional but no casting conditional.

But the “WHY oh WHY” was rhetorical, and answering only that part of my post isn’t helpful.

Am I missing something? Or, can you think of any way to accomplish what I’m looking for (whether it’s along the lines of what I have already or a completely different approach)?

[I’m not very familiar with scripting. Can you point me in the right direction?]

/cast [@player] Lesser Heal
/run if UnitCastingInfo("player") then SendChatMessage("Casting Lesser Heal on myself","PARTY") end

Something like that

[added]
You’ll probably want to use some of the returns from the function to reduce spamming the channel etc.

Thanks. This isn’t reporting anything though. The heal goes off of course, but I don’t see any announcement to party chat. If you have any ideas as to why not, please let me know. :slight_smile:

That said, I’ve been meaning to learn and develop my scripting/addon programming skills (I already have a foundation in c# but just haven’t ever bothered to learn much about WoW Lua), so this will at least be an excuse to dive into it.

Capital If was messing it up, but it also looks like the cast doesn’t start quickly enough for the function to return true (it does work if you spam the key though).

1 Like

is it possible with scripting (I know you cant with macros typically) to add like a quarter second delay?
(I’m assuming no, cause that would probably be too strong to circumvent GCD)

Ya.

/run C_Timer.After(0.25,function() if UnitCastingInfo("player") then SendChatMessage("Casting Lesser Heal on myself","PARTY") end end)

Awesome! That works like a charm!

Thank you for the help!

Now to see if I can implement the rest of what I want without going over character limit. :slight_smile: (hint: I can’t)

I use weak auras for this.

Trigger Event Spell cast success
Enter the name of the spell and select player as source
Actions tab check chat and put in what you want.

1 Like