Download
(15 Kb)
Download
Updated: 09-10-13 04:52 AM
Compatibility:
Siege of Orgrimmar (5.4)
Escalation (5.3)
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:09-10-13 04:52 AM
Created:08-27-12 04:04 PM
Downloads:4,001
Favorites:35
MD5:
5.4
infMopTalentMacros
Version: 1.6
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.
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 (6)
File Name
Version
Size
Author
Date
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 02-16-14, 04:57 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3706
File comments: 1863
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: 1
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: 11
File comments: 163
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: 119
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: 1
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
Old 05-23-13, 04:05 AM  
infin1te
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 14
Uploads: 1
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
Last edited by infin1te : 05-23-13 at 04:07 AM.
infin1te is offline Report comment to moderator  
Reply With Quote
Old 05-18-13, 04:40 AM  
circatm2001
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Problem:
http://www.twitch.tv/circatm2001/b/405014416

Solution:
infMopTalentMacros.zip (1 KB)


Before:
Code:
----------------------------------------------
-- infMopTalentMacroes
----------------------------------------------

local function OnEvent(self, event, ...)
	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
end

local infMopTalentMacroes = CreateFrame("Frame")
infMopTalentMacroes:RegisterEvent("PLAYER_LOGIN")
infMopTalentMacroes:RegisterEvent("PLAYER_TALENT_UPDATE")
infMopTalentMacroes:SetScript("OnEvent", OnEvent)
After:
Code:
----------------------------------------------
-- infMopTalentMacroes
----------------------------------------------

local function OnEvent(self, event, ...)
-- Check to see whether the player is in combat before attempting to call protected function EditMacro()
    if InCombatLockdown() then
        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
end

local infMopTalentMacroes = CreateFrame("Frame")
infMopTalentMacroes:RegisterEvent("PLAYER_LOGIN")
infMopTalentMacroes:RegisterEvent("PLAYER_TALENT_UPDATE")
infMopTalentMacroes:SetScript("OnEvent", OnEvent)
Last edited by circatm2001 : 05-18-13 at 06:38 PM.
circatm2001 is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: