Quantcast WoWInterface - View Single Post - function to check if pet is ferocity or tenacity
View Single Post
02-26-12, 01:02 PM   #4
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,732
Originally Posted by Aalwein View Post
/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.
Note a couple things. First, /script runs the argument as Lua code, which throws errors if you try to mix macro commands in it. Also you can use /cast for a spell that isn't available to you currently, the game will cast it if you have it or completely ignore the command if you don't.
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote