Quantcast
Script that checks if I learned PvP Talent and display tooltip accordingly - WoWInterface
Thread Tools Display Modes
10-15-20, 07:14 PM   #1
Cretch21
A Murloc Raider
Join Date: Oct 2020
Posts: 6
Script that checks if I learned PvP Talent and display tooltip accordingly

Hey guys, I'm looking to see if its possible to create a script that can identify if I've chosen a specific PvP Talent and then display it on my bars. If I haven't chosen that specific PvP Talent, it would then display a different (baseline) ability. Does it sound doable? Thank you!
  Reply With Quote
10-15-20, 07:49 PM   #2
Cretch21
A Murloc Raider
Join Date: Oct 2020
Posts: 6
And if someone develops this there will definitely be a donation headed your way!
  Reply With Quote
10-16-20, 06:13 AM   #3
Sylen
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 49
I remember this beeing not possible as it is not supported by the Blizzard API since they switched from the Legion design to the BfA / SL design.
  Reply With Quote
10-16-20, 11:39 AM   #4
Cretch21
A Murloc Raider
Join Date: Oct 2020
Posts: 6
On Reddit, user "Draakex" was able to show me a script he/she uses that is almost what I'm looking for.

local frame = CreateFrame("FRAME", "PvPTalentMacros");
frame:RegisterEvent("PLAYER_PVP_TALENT_UPDATE");
frame:RegisterEvent("ADDON_LOADED");
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
local function eventHandler(self, event, ...)
for mi = 1, _G.MAX_ACCOUNT_MACROS + _G.MAX_CHARACTER_MACROS do
local name, icon, body = GetMacroInfo(mi)
local currentSpec = GetSpecialization()
local playerClass, englishClass = UnitClass("player")
if englishClass == "PRIEST" and currentSpec == 1 then
print(englishClass,currentSpec,name)
if string.find(body,"Archangel") then
local G=GetSpellInfo SetMacroSpell(name, G"Archangel(PvP Talent)" or G"Dark Archangel(PvP Talent)")
break
end
end
end
end
frame:SetScript("OnEvent", eventHandler);

The only difference is that it displays two different PvP Talents. I would like a script that either displays the PvP Talent if its talented, or displays a baseline ability if its not.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Script that checks if I learned PvP Talent and display tooltip accordingly

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off