View Single Post
10-17-20, 09:48 AM   #4
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
https://wow.gamepedia.com/API_EditMacro

Before installing this script, create a macro called "myFavouriteMacro" and drag it to an action bar.

You can turn the script into an addon using https://addon.bool.no/


Lua Code:
  1. local macro1 = [=[#showtooltip
  2. /cast Thoughtsteal]=]
  3.  
  4. local macro2 = [=[#showtooltip
  5. /cast Shadowfiend]=]
  6.  
  7. local f = CreateFrame("Frame")
  8. f:RegisterEvent("PLAYER_PVP_TALENT_UPDATE")
  9. f:SetScript("OnEvent", function()
  10.   EditMacro("myFavouriteMacro", nil, nil, GetSpellInfo("Thoughtsteal") and macro1 or macro2)
  11. end)
  Reply With Quote