Thread Tools Display Modes
02-16-14, 04:00 PM   #1
jonnybegood
A Defias Bandit
Join Date: Feb 2014
Posts: 3
Dynamic Auras

Is there a way to make a dynamic aura in Weak Auras for talents for example lvl 90 talent for priests: Cascade/Divine Star/Halo
Also is there macro script that will check conditions to see what one i have so i dont have to keep changing the talent on my action bar :P

Last edited by jonnybegood : 02-16-14 at 04:18 PM.
  Reply With Quote
02-16-14, 05:57 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I can't help you with WeakAuras, but this addon should help you with the other thing:
http://www.wowinterface.com/download...entMacros.html
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-16-14, 06:49 PM   #3
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
If you are going to use infMopTalentMacros, I suggest you use this code instead. The original author has turned such a simple AddOn into some abomination of Ace libraries.

Lua Code:
  1. -- [url]http://www.wowinterface.com/downloads/info21466-infMopTalentMacros.html[/url]
  2. -- Credit to Infin1te from WoW Interface.
  3. -- I refuse to use the Ace abomination this has become, and I edited/updated
  4. -- the code anyways.
  5.  
  6. -- ===================================================================
  7. -- Local Definitions.
  8. -- ===================================================================
  9.     local EventHandler = CreateFrame("Frame")
  10.  
  11.     local function UpdateMacros()
  12.         for i = 1, MAX_NUM_TALENTS do
  13.             local talentName, _, talentTier, _, isSelected = GetTalentInfo(i)
  14.  
  15.             if (isSelected) then
  16.                 EditMacro("TIER_"..talentTier, nil, "INV_Misc_QuestionMark", "#showtooltip\n/cast [mod:alt, @player] [] "..talentName)
  17.             end
  18.         end
  19.     end
  20.  
  21. -- ===================================================================
  22. -- Core.
  23. -- ===================================================================
  24.     EventHandler:RegisterEvent("PLAYER_TALENT_UPDATE")
  25.  
  26.     -- Only one event is registered, no need to check.
  27.     -- Note: PLAYER_TALENT_UPDATE fires BEFORE PLAYER_LOGIN.
  28.     EventHandler:SetScript("OnEvent", function()
  29.         if not InCombatLockdown() then UpdateMacros() end
  30.     end)

Last edited by Clamsoda : 02-16-14 at 06:52 PM.
  Reply With Quote
02-20-14, 09:51 AM   #4
jonnybegood
A Defias Bandit
Join Date: Feb 2014
Posts: 3
First ty for the code snips guys
As far as making the aura change dynamically depending on what talent you have selected in Weakauras, it is actually quite simple and I feel kind of derp for not seeing it sooner. First you make 3 auras, one for Divine Star, one for Halo and one for Cascade, put them in a grp and stack the icons on top of each other. For each aura go to the load tab, you should notice that the 4th check box option down is talent selected so for D Priest set the 1st 4 check boxes as follows

This would be for the Divine Star Aura:
1st: Player Name = this is optional but not needed so can be unchecked
2nd: Class = Checked with Priest selected in drop down
3rd: Spec = Checked (this is optional as well but for the purpose of this post, lets say Disc) select Discipline from the drop down
4th: Talent Selected = Checked with Divine Star selected in the drop down

Just to make sure it is clear for everybody, make sure to select the same talent from the drop down as the aura that you are working on. If you were working on the Cascade aura then obviously you would want to select Cascade from the drop down instead.

So now if you have Divine Star selected as your lvl 90 talent it looks at the load conditions and sees that you are indeed on a priest, the current spec is Disc and the tier 90 talent selected is Divine Star, all conditions for Divine Star have been met so show this aura.

And there you have it guys
  Reply With Quote
02-20-14, 10:21 AM   #5
jonnybegood
A Defias Bandit
Join Date: Feb 2014
Posts: 3
Originally Posted by Clamsoda View Post
If you are going to use infMopTalentMacros, I suggest you use this code instead. The original author has turned such a simple AddOn into some abomination of Ace libraries.

Lua Code:
  1. -- [url]http://www.wowinterface.com/downloads/info21466-infMopTalentMacros.html[/url]
  2. -- Credit to Infin1te from WoW Interface.
  3. -- I refuse to use the Ace abomination this has become, and I edited/updated
  4. -- the code anyways.
  5.  
  6. -- ===================================================================
  7. -- Local Definitions.
  8. -- ===================================================================
  9.     local EventHandler = CreateFrame("Frame")
  10.  
  11.     local function UpdateMacros()
  12.         for i = 1, MAX_NUM_TALENTS do
  13.             local talentName, _, talentTier, _, isSelected = GetTalentInfo(i)
  14.  
  15.             if (isSelected) then
  16.                 EditMacro("TIER_"..talentTier, nil, "INV_Misc_QuestionMark", "#showtooltip\n/cast [mod:alt, @player] [] "..talentName)
  17.             end
  18.         end
  19.     end
  20.  
  21. -- ===================================================================
  22. -- Core.
  23. -- ===================================================================
  24.     EventHandler:RegisterEvent("PLAYER_TALENT_UPDATE")
  25.  
  26.     -- Only one event is registered, no need to check.
  27.     -- Note: PLAYER_TALENT_UPDATE fires BEFORE PLAYER_LOGIN.
  28.     EventHandler:SetScript("OnEvent", function()
  29.         if not InCombatLockdown() then UpdateMacros() end
  30.     end)
I am rather new to this but am i to understand that i want to replace all the code in the infMopTalentMacros.LUA file with this code here that you posted?
This code here is by far much cleaner

Last edited by jonnybegood : 02-20-14 at 10:24 AM. Reason: Comment on how much cleaner it is
  Reply With Quote
02-20-14, 01:54 PM   #6
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
No, use the code I gave you with http://addon.bool.no/.
  Reply With Quote
02-20-14, 02:36 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If we're going for efficiency here, there's really no need for the update function to be factored out of the event handler.

Code:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_TALENT_UPDATE")
f:SetScript("OnEvent", function()
	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, nil, "#showtooltip\n/cast [mod:alt, @player] [] "..name)
		end
	end
end)
(Also don't need to specify the icon; passing nil will allow the player to use a custom icon if they don't want the dynamic one.)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Dynamic Auras


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