Help with macro to check if hidden tome spells have been learned

I’ve been making macros for various characters to check whether I have learned certain spells (or the like) which are taught by items but do not show up in the spell book. For example, I made this macro to track the progress of the various Shaman-specific weapon illusions (since there’s no real way to easily identify them once learned)…

/script a={"Earthliving","Flametongue","Frostbrand","Rockbiter","Windfury"}; b={42941,42942,42943,42944,42945} for c = 1, 5 do print(format("%s: %s", a[c], IsQuestFlaggedCompleted(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))

I was trying to make macros for my hunter to check whether I have learned the various tomes which unlock the ability to tame new pet families. One works just fine (despite the latter two families not being available until Shadowlands)…

/script a={"Blood Beasts","Cloud Serpents","Undead"}; b={54753,62254,62255} for c = 1, 3 do print(format("%s: %s", a[c], IsQuestFlaggedCompleted(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))

The other macro won’t work however…

/script a={"Direhorns","Mechanicals","Feathermanes"}; b={138430,205154,242155} for c = 1, 3 do print(format("%s: %s", a[c], IsSpellKnown(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))

The reason it isn’t working is because the first three item-locked pet families added to the game (which also happen to be the only ones which are character-specific unlocks, not account wide) don’t flag a hidden quest as complete when learned but rather teach a spell which is not listed in your spellbook. I was wondering if there is a different way to determine whether the spells are known, maybe by determining if the tomes are no longer usable? Any ideas?

It’s not an in-game solution but you could try using the Wowhead Profiles tool.

Import your characters then pin them and you’ll get a green dot associated with things your characters have done.

Just tried it on my hunter, who I know has the Feathermane tome, and it wasn’t displaying as completed there either.

Yeah, I use Wowhead’s profiles as well but these aren’t shown as learned on there. I know my main has learned them all but it would be nice to figure this macro out for alts. Ironically, the one that works is less important since the families it tracks are all account-wide unlocks. It’s the broken one which would be far more useful since it tracks the three character-specific unlocks. Anyone else have any ideas?

So I figured out how to fix the macro. Using IsPlayerSpell instead of IsSpellKnown appears to fix it, so the working version would be…

/script a={“Direhorns”,“Mechanicals”,“Feathermanes”}; b={138430,205154,242155} for c = 1, 3 do print(format("%s: %s", a[c], IsPlayerSpell(b[c]) and “\124cff00ff00Yes\124r” or “\124cffff0000No\124r”))

1 Like

I have been trying to find macros for just this purpose. Thanks! However, when I put these into a macro on my hunter, and then run them, I get no output. (This is on 9.0.1.) Any thoughts?

1 Like

So I just checked them now that pre-patch has gone live and it seems the fix for the formerly broken one is still working, however the one which had always worked is now broken… >_< I’ll try to find a fix and update here if I figure it out.

1 Like

I think I got it fixed. I also added blood beasts and the new Cloud Serpents.

/script a={'Blood Beasts','Direhorns','Mechanicals','Feathermanes','Cloud Serpents'}; b={288956,138430,205154,242155,340826} for c = 1, 5 do print(format('%s: %s', a[c], IsPlayerSpell(b[c]) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end

Could do it this way too. Just makes it easier to read/update in the future.

/run for k,v in pairs({['Blood Beasts']=288956,['Direhorns']=138430,['Mechanicals']=205154,['Feathermanes']=242155,['Cloud Serpents']=340826})do print(format('%s: %s', k, IsPlayerSpell(v) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end
1 Like

This is cool thank you. Are you able to add the Gargon pet family from Revendreth’s Gargon Training Manual?

This is very handy thank you. I play 3 Hunters and like to have plenty of variety. Are you able to add the Gargon pet family from Revendreth’s Gargon Training Manual?
It is a drop from Huntmaster Petrus.
Location:
/way 59,7, 73,8 (path entrance)
/way 61,8, 79,0 Huntmaster Petrus (Inside the Building)

I am also interested in checking for undead pets gained by using the Simple Tome of Bone-Binding

With over 5k views, this must be a pretty good topic :slight_smile: I too have been wondering about what I have and haven’t learned/found/bought yet. Playing around with the script here, still can’t get it right, but I am not a programmer either.

Couple things that might help others if I did my research right on the new stuff:
Gargon should be spell 334850
Undead should be spell 340825

so i tired adding to @Elvenbane’s way:
[‘Gargon’]=334850,
[‘Undead’]=340825.

not working for me :slight_smile:

It isn’t working because macros have a 255 character limit, you will need to create a second macro in order to run the other 2.

/run for k,v in pairs({[‘Undead Beasts’]=340825,[‘Gargon’]=334850})do print(format(’%s: %s’, k, IsPlayerSpell(v) and ‘\124cff00ff00Yes\124r’ or ‘\124cffff0000No\124r’)) end

Maybe blizzard should just add them in an achievement or character link in our in game character spellbook under a third tab labeled TOMS

1 Like

I cannot get this to work in a macro at all. >.<

I tried this and can’t get it to work. How do you find the correct names and numbers for undead and gargon? thanks!

Correct macros and verified as working. Enjoy!!!

/run for k,v in pairs({['Direhorns']=138430,['Mechanicals']=205154,['Feathermanes']=242155,['Blood Beasts']=288956,['Cloud Serpents']=340826})do print(format('%s: %s', k, IsPlayerSpell(v) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end
/run for k,v in pairs({['Gargon']=334850,['Undead']=340825})do print(format('%s: %s', k, IsPlayerSpell(v) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end
1 Like

Wrap your code in code tags or the forum breaks all the quotes.

/run for k,v in pairs({['Direhorns']=138430,['Mechanicals']=205154,['Feathermanes']=242155,['Blood Beasts']=288956,['Cloud Serpents']=340826})do print(format('%s: %s', k, IsPlayerSpell(v) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end
/run for k,v in pairs({['Gargon']=61160,['Undead']=62255})do print(format('%s: %s', k, C_QuestLog.IsQuestFlaggedCompleted(v) and '\124cff00ff00Yes\124r' or '\124cffff0000No\124r')) end
2 Likes

Tks for reminding me… I was completely annoyed by how long it took me to figure it all out. Lord forbid similar things have any form of standardization. :roll_eyes:

(Note - the macros don’t take into consideration racially inherited bonus abilities that start you out being able to tame certain pet families. Also, Cloud Serpent, Gargon & Undead are account wide, while Bloodbeast, Direhorn, Feathermanes/Hybride & Mechanicals are per character)

Nice, It works perfect for me