Macro Help: Raise Dead / Sacrificial Pact

I’m playing a Frost Death Knight, on WoW Retail.
I’m looking for a macro that will detect if I’ve summoned my Ghoul via Raise Dead. If the Ghoul is present it casts Sacrificial Pact. If Ghoul is not present it casts Raise Dead. I’m thinking this should be set up something like this:

/cast [nopet] Raise Dead; [pet,exist] Sacrificial Pact
or
/cast [pet,exist] Sacrificial Pact; [nopet] Raise Dead

I’ve also tried it with slightly different syntax of [pet] instead of [pet,exist]. I’ve also broken the maco into two separate macros to test the syntax separately.

The macro will summon the Ghoul however the [pet] conditional does not appear to be seeing that the ghoul is present and thus won’t progress to cast Sacrificial Pact.

Any help would be greatly appreciated.

NOTE: I’ve run this through ChatGPT and Google Gemini and both have suggested the syntax is fine. I’m actually wondering if something within the accepted Lua commands of the WoW engine have not changed with the recent update?

Thanks to a couple of guys on reddit we narrowed it down. It turned out to be much more simple than first thought. Here is the macro:
/cast Sacrificial Pact
/cast Raise Dead

Make sure you have Sacrificial Pact listed on the first line, because you can’t actually cast SP if you don’t have to ghoul active. This will force the script will ignore the illogical command (SP) if they are not present and move on to the next command that it can act on (Raise Dead).

Hope this helps anyone looking for same / similar.

Reference links to original conversations:
Reddit Discussion thread 1 and Reddit Discussion thread 2.

In case anyone is interested, apparently the reason the [@pet] conditional was not working has to do with the way the Frost DK ghoul has been coded. It is not a “pet” in the same way the Unholy ghoul is, nor like a hunter pet, warlock pet, etc are scripted. I won’t pretend to understand why it is coded differently but it is what it is.

1 Like