Download
(1 Kb)
Download
Updated: 06-08-14 09:11 AM
Compatibility:
Siege of Orgrimmar (5.4)
Escalation (5.3)
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:06-08-14 09:11 AM
Created:08-27-12 04:04 PM
Downloads:4,405
Favorites:44
MD5:
5.4
infMopTalentMacros
Version: 1.7
by: infin1te [More]
A very simple addon that helps you make working macros for the new tier based talents in 5.0.4 (MoP)
At least until they make #showtooltip able to handle the new system.


Technically you could do this kind of macro:
Code:
/cast ability1
/cast ability2
/cast ability3
But then you are stuck with the issue that you wont have the correct icon/tooltip.


You could solve that problem by doing something like this
Code:
/cast ability1
/cast ability2
/run SetMacroSpell("MacroName",GetSpellInfo("ability1") or "ability2")
However the problem with that is that you have to click the macro once for it to update the icon/tooltip correctly.


This addon solves those issues completely and lets you make proper macros.

You simply make an empty macro with any icon but with the name "tier_#", where # is the number of the talent tier you want the macro for. (1-6, top to bottom), it is not case sensitive.
It does not matter if it is in the general or player specific macro section, though of course if you want it available cross-character then I would recommend putting in the general section.
Make sure you get the name right though, it won't work otherwise.

And that is it, the addon will do the rest.

What it does is that it edits your macro to the appropriate ability every time you swap a talent for that tier.

Note that you will most likely need to swap a talent for that tier or swap you spec for the macro to initialize, though this only has to be done the very first time.
Also make sure you do not have more than one macro per tier as it can cause issues.

Cpu usage is essentially zero if anyone was wondering, as it only operates when you swap a talent.


iNFEH @ Twisting Nether EU or methodwow.com
1.7
  • Reverted back to the non-lib version, but kept some in combat error protection since blizzard still hasn't fixed the problem with PLAYER_TALENT_UPDATE firing 'randomly' for some ppl, seems to be especially warlock related, I've never been able to replicate it myself but it's definitely there.
    http://wow.curseforge.com/addons/tellmewhen/tickets/949
  • As I'm not using this addon myself since 5.2~ don't expect anything major to be changed.
    I have also enabled so anyone that has some good changes can upload them here as optional files.

1.6
  • Update TOC for 5.4
  • Added some additional code for handling in-combat scenarios based upon comments.

1.5
  • Update TOC for 5.3

1.4
  • Update TOC for 5.2

1.3
  • Update TOC for 5.1

1.2
  • Cleaned the code a bit. y u heff to be so good nebula169!

1.1
  • Fixed a minor issue that occurred when swapping characters.
Optional Files (0)


Archived Files (7)
File Name
Version
Size
Author
Date
1.6
15kB
infin1te
09-10-13 04:52 AM
1.5
905B
infin1te
05-22-13 03:16 PM
1.4
916B
infin1te
03-05-13 03:09 PM
1.3
916B
infin1te
11-28-12 07:10 AM
1.2
916B
infin1te
09-07-12 06:43 AM
1.1
991B
infin1te
08-30-12 05:18 AM
1.0
1001B
infin1te
08-27-12 04:04 PM


Post A Reply Comment Options
Old 05-10-14, 11:53 AM  
nixchecker
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: finally!

Originally Posted by the-wind-waker
one thing though, would it be possible to use it for macros in general?

for something like:
/cast [stance:1] tier_1; [stance:3] barkskin

that would be amazing! =)
I edited this addon to do exactly this!

Just copy+paste the code below into the lua file (overwrite everything)

It does the same as before, but in addition lets you specify character-specific macros that will be overwritten every time you change your talents. Within these macros you can now make use of spells "T_1" through "T_6" (which represent the chosen skills in each talent tier).

You can insert a list of macros for each charakter. Login to WoW, and add an empty macro with the chosen name. After that, insert a new line in the "macro" table in the lua-file with the same key-name.


In the code code below there are a few sample macros. In table "macros" for the charakter "Charaktername", there are two sample macros.
The second one is a macro named "Macroname2":
Code:
#showtooltip
/use [mod:shift]T_2;T_3
When you use this macro ingame, and press shift while clicking, you use the selected Tier2 talent. When not pressing shift, you will use the talent of Tier3 instead.


Have fun with this addition (maybe the author may want to add it to his already awesome addon )

Code:
----------------------------------------------
-- infMopTalentMacros
----------------------------------------------

infMopTalentMacros = LibStub("AceAddon-3.0"):NewAddon("infMopTalentMacros", "AceEvent-3.0")

local macros = {
  ["Charaktername"] = {
    ["Macroname1"] = [[#showtooltip
/use T_1]];
    ["Macroname2"] = [[#showtooltip
/use [mod:shift]T_2;T_3]];
  };
  ["Ingenium"] = {
    ["RB04"] = [[#showtooltip
/use [stance:1,nomod]Savage Defense;[stance:1,mod:shift]T_6;[stance:3]Tiger's Fury;[stance:5]Wild Mushroom: Detonate;[nostance]Wild Mushroom]];
    ["hotw_inge"] = [[#showtooltip
/use T_6]];
    ["DO5S"] = [[#showtooltip
/use [stance:1]T_5;[stance:3]Thrash;T_3]];
  };
};
local macrosDependencies = {};
local macrosPrepared = {};
local playerName = nil

function infMopTalentMacros:OnEnable()
  playerName = UnitName("player")
  if not macros[playerName] then
    return
  end
  
  for k, v in pairs(macros[playerName]) do
    for i = 1, 6 do
      if v:find("T_"..i) then
        if not macrosDependencies["T_"..i] then
          macrosDependencies["T_"..i] = {};
        end
        table.insert(macrosDependencies["T_"..i], k)
      end
    end
  end

  self:RegisterEvent("PLAYER_TALENT_UPDATE")

  self:MacroUpdate()
end

function infMopTalentMacros:PLAYER_TALENT_UPDATE()
	self:MacroUpdate()
end

function infMopTalentMacros:PLAYER_REGEN_ENABLED()
	self:UnregisterEvent("PLAYER_REGEN_ENABLED")
	self:MacroUpdate()
end

function infMopTalentMacros:MacroUpdate()
	if InCombatLockdown() then
		self:RegisterEvent("PLAYER_REGEN_ENABLED")
		return
	end

  for i=1, MAX_NUM_TALENTS do
		local name, _, tier, _, selected = GetTalentInfo(i)
		if selected then
			EditMacro("TIER_"..tier, nil, "INV_Misc_QuestionMark", "#showtooltip\n/cast "..name)
		end
	end
  
  for k, v in pairs(macros[playerName]) do
    macrosPrepared[k] = v
  end
  for i=1, MAX_NUM_TALENTS do
    local name, _, tier, _, selected = GetTalentInfo(i)
    if selected then
      if macrosDependencies["T_"..tier] then
        for i2, v in ipairs(macrosDependencies["T_"..tier]) do
          macrosPrepared[v] = macrosPrepared[v]:gsub("T_"..tier, name)
        end
      end
    end
  end
  for k, v in pairs(macrosPrepared) do
    EditMacro(k, nil, "INV_Misc_QuestionMark", v)
  end
end
nixchecker is offline Report comment to moderator  
Reply With Quote
Old 05-02-14, 08:01 PM  
macklol
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
I actually made an "addon" like this that works exactly the same, but since I am bit of a scrub in lua language it has more code in it. Though I have some RegisterEvents to update the macros which work perfectly without having to relearn talent. I guess the one that does that is UPDATE_MACROS that triggers when you create the macro. Pretty sure you can remove PLAYER_REGEN_ENABLED if you use UPDATE_MACROS instead. I did get a bug report from a guildmate that wasnt level 90 and couldn't learn higher than 45 talents. I don't have any characters under 90 so couldn't check it myself, but it was only when he logged in so didn't really care to check it out.

I use these RegisterEvents to update the tooltips:

frame:RegisterEvent("PLAYER_LOGIN");
frame:RegisterEvent("PLAYER_TALENT_UPDATE");
frame:RegisterEvent("UPDATE_MACROS");

The difference between yours and my "addon" is that yours overwrite the macro if you change a talent. I'm not sure I like this, but it is a nice touch. As warlock for example, you'd want stopcasting in a macro with Dark Bargain/Sac Pact or Shadowfury/Mortal Coil.

One problem I had, that you also seemed to have is that it does not work for Solace and Insanity for priests in 45 talents. It shows the talent instead of the actual spell you get (the talent is a passive that grants you a spell), Power Word: Solace. It's not a big deal, because it replaces Holy Fire and you probably had that binded somewhere else.

Edit: And yes, what Phanx wrote below.
Last edited by macklol : 05-02-14 at 08:05 PM.
macklol is offline Report comment to moderator  
Reply With Quote
Old 02-16-14, 04:57 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3976
File comments: 1913
Uploads: 38
42kb worth of libraries for an addon that's less than 1kb?!

You can dump the libraries and achieve exactly the same result by replacing your NewAddon line with this:
Code:
local infMopTalentMacros = CreateFrame("Frame", "infMopTalentMacros")
infMopTalentMacros:SetScript("OnEvent", function(self, event, ...) return self[event](self, event, ...) end)
infMopTalentMacros:RegisterEvent("PLAYER_LOGIN")
...and then renaming your OnEnable function to PLAYER_LOGIN, like so:
Code:
function infMopTalentMacros:PLAYER_LOGIN()
	self:RegisterEvent("PLAYER_TALENT_UPDATE")
	self:MacroUpdate()
end
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addon Turn any code into an addon More addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please dont PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline Report comment to moderator  
Reply With Quote
Old 11-22-13, 01:45 AM  
Pobre
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
So simple that I'm inclined to try! Downloading.
Pobre is offline Report comment to moderator  
Reply With Quote
Old 10-23-13, 10:32 AM  
sidelsky18
A Murloc Raider

Forum posts: 4
File comments: 2
Uploads: 0
Originally Posted by infin1te
Originally Posted by sidelsky18
As of the past few days I'm getting spammed with "TalentMacros: Macros will be updated when you leave combat." while I'm in combat.
That's not this addon causing that, sounds like you might have the 'TalentMacros' addon installed?
http://www.wowace.com/addons/talentmacros/

Whoops! My bad!
sidelsky18 is offline Report comment to moderator  
Reply With Quote
Old 10-20-13, 04:12 PM  
infin1te
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 2
Originally Posted by sidelsky18
As of the past few days I'm getting spammed with "TalentMacros: Macros will be updated when you leave combat." while I'm in combat.
That's not this addon causing that, sounds like you might have the 'TalentMacros' addon installed?
http://www.wowace.com/addons/talentmacros/
infin1te is offline Report comment to moderator  
Reply With Quote
Old 10-20-13, 03:52 PM  
sidelsky18
A Murloc Raider

Forum posts: 4
File comments: 2
Uploads: 0
Originally Posted by infin1te
I did actually consider adding a check for if-in-combat originally, however as you can't actually learn nor unlearn talents in combat I never bothered.
Which on the other hand makes me quite curious as to how you managed to produce that error.
I've been using this addon since I made it and I've never encountered an in-combat error.

Anyway if it's causing people problems I can fix it, and cheers for the suggestion circatm2001

As of the past few days I'm getting spammed with "TalentMacros: Macros will be updated when you leave combat." while I'm in combat.
sidelsky18 is offline Report comment to moderator  
Reply With Quote
Old 10-19-13, 10:01 AM  
khurzog
A Frostmaul Preserver
 
khurzog's Avatar

Forum posts: 251
File comments: 191
Uploads: 0
this addon has been very helpful! i would like to make a simple request...

/stopcasting support

thanks
khurzog is offline Report comment to moderator  
Reply With Quote
Old 10-02-13, 03:21 AM  
hexiaa
A Kobold Labourer
 
hexiaa's Avatar

Forum posts: 1
File comments: 51
Uploads: 0
Works great
hexiaa is offline Report comment to moderator  
Reply With Quote
Old 09-28-13, 01:40 PM  
meljen
A Deviate Faerie Dragon

Forum posts: 14
File comments: 260
Uploads: 0
Thank you so much for this. I hope it works, I have been busting my brain trying to have Binding Shot and Intimidation (hunter talents) set to the same keybind without having to drag the button on and off my bar every time I switch out.

Again thank you! I hope you keep this updated!
meljen is offline Report comment to moderator  
Reply With Quote
Old 09-18-13, 12:06 PM  
EKE
A Defias Bandit

Forum posts: 3
File comments: 121
Uploads: 0
oh no there is a lib now O.O

trying to diy nolib version
EKE is offline Report comment to moderator  
Reply With Quote
Old 09-10-13, 05:09 AM  
infin1te
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 2
Originally Posted by Machinelf
Cheers!, appreciate it.
infin1te is offline Report comment to moderator  
Reply With Quote
Old 08-28-13, 04:18 AM  
Machinelf
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
Machinelf is offline Report comment to moderator  
Reply With Quote
Old 07-20-13, 08:20 PM  
circatm2001
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by infin1te
I did actually consider adding a check for if-in-combat originally, however as you can't actually learn nor unlearn talents in combat I never bothered.
Which on the other hand makes me quite curious as to how you managed to produce that error.
I've been using this addon since I made it and I've never encountered an in-combat error.

Anyway if it's causing people problems I can fix it, and cheers for the suggestion circatm2001
Np . I don't know what's causing the talent update event to fire during combat, but it's triggering hundreds of times in short periods of time. Multiple people were experiencing this issue, it must be something on blizzard's end. Have you not noticed this error infin1te? I haven't had a single problem since I modified the code and added the combat check.
Last edited by circatm2001 : 07-20-13 at 10:49 PM.
circatm2001 is offline Report comment to moderator  
Reply With Quote
Old 07-02-13, 09:54 AM  
Kathel
A Kobold Labourer

Forum posts: 1
File comments: 2
Uploads: 0
150x [ADDON_ACTION_BLOCKED] AddOn "infMopTalentMacros" tried to call the protected function "EditMacro()".
!BugGrabber-r193-release\BugGrabber.lua:587: in function <!BugGrabber\BugGrabber.lua:587>
<in C code>
infMopTalentMacros\infMopTalentMacros-1.5.lua:9: in function <infMopTalentMacros\infMopTalentMacros.lua:5>

Locals:
nil
Kathel is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: