Script to Identify Presence of PVP Talent

Before I go looking up how to do it, I wanted to see if anyone with knowledge of scripts knows if its possible.

I want the script to check to see if I have learned a certain PVP Talent. If I have, then I want to display it. If I haven’t learned that PVP Talent, then I want to display a different (baseline) ability.

Thanks guys!

I would like to know the answer as well.

Over at the WoWInterface forums I was able to get help from “DahkCeles” with the answer!

local macro1 = [=[#showtooltip
/cast Thoughtsteal]=]

local macro2 = [=[#showtooltip Shadowfiend]=]

local f = CreateFrame(“Frame”)
f:RegisterEvent(“PLAYER_PVP_TALENT_UPDATE”)
f:SetScript(“OnEvent”, function()
EditMacro(“myFavouriteMacro”, nil, nil, GetSpellInfo(“Thoughtsteal”) and macro1 or macro2)
end)

I run this as an addon and it works flawlessly!