Does anyone know if there is a function for check what type of pet you have out? Something like:
PetClass() - returns Ferocity, Tenacity, or Cunning
If not, is there a function to check to see if a spell exists? For example, I could run SpellExists('Dash') and if it returns 1 that means it's Ferocity or Cunning, if it returns 0 that means it's Tenacity.
I'm basically trying to make a macro that I can run that will toggle between passive and defensive/assist - defensive if I have a Tenacity pet out, assist if I have a Cunning or Ferocity pet out. I've got something like this in mind:
Code:
/petfollow [@pettarget,exists]
/petpassive [@pettarget,exists]
/script if PetClass() = 'Tenacity' then
/petdefensive [@pettarget,noexists] else /petassist [@pettarget,noexists]
If I can just check to see if a spell exists, I'd just do a function check to see if "Thunderstomp" exists and go from there.