Page 1 of 111 1231151101 ... LastLast
Results 1 to 10 of 1109

Thread: WeakAuras Tutoring Thread

  1. #1

    Default WeakAuras Tutoring Thread

    Given I've been trying to help a few people recently with setting up some WeakAuras stuff, I thought it would be helpful to make a thread for questions and answers about accomplishing specific tasks with this awesome addon that I know doesn't get enough use or attention!

    Download: http://www.wowace.com/addons/weakauras/

    First, I cannot stress how powerful this addon is. The very basic functionality is to give an indicator or warning for something happening that you care about. That said, it can essentially perform any check or do anything you want to trigger a warning -- anything that can be done by another addon through the WoW API can be used as a trigger for a WeakAuras warning.

    Unlike PowerAuras, which has a limited set of built-in triggers (Buff, Debuff, Health, Stance, etc.), WeakAuras has two very powerful features that let it check virtually anything.

    1. Combat Log Events

    Anything that passes through the game engine to the combat log (that would be output to something like World of Logs) can be used as a trigger. So maybe you want to know when a specific mob begins to cast a particular spell. Or perhaps when a specific aura is applied. Again, because it's the combat log, you don't need to utilize your target, focus, or any such nonsense. That's extremely powerful for certain boss fights and knowing what is going on.

    2. Custom LUA Triggers

    If the normal stuff doesn't suffice and you want to run a extremely specific check to trigger your indicator, you can create completely custom triggers from LUA code (which I'll gladly write for you if you ask here). For example, I use some custom triggers for help with my balance DPS rotation, which I'll explain below.

    WeakAuras is also great in that it doesn't waste resources, and has a number of "Load" settings that determine when a trigger will load itself (that is, if it isn't loaded, it won't check the trigger or waste memory). You can do it by zone, player, class, spec, instance type, etc; which has come in very handy for me.

    Anyway, onto a few examples, but I strongly encourage people to install this and post here with requests for something they want to know.

    TIP: When editing anything that requires text input, be sure to hit "Enter" or click Accept afterward so it gets saved.

    In-City Repair Warning

    I had a problem remembering to repair often when returning to towns, and hated showing up to a group/raid not at 100%, so I created a few Auras to warn me when my gear was at certain durability levels based on where I was.

    Import String


    Note: This warning will not display if your gear is above 90% durability, but if you want that value to change, alter the "0.9" in both places above to whatever decimal you want, so 0.95 will warn you when below 95% durability.

    General Purpose Repair Warning

    I didn't want an entire mod (and don't have the default repair guy cause he sucks), so this will simply warn you when your equipment falls under 20% durability regardless of your location.

    Import String


    Moonkin Rotation Helpers

    These were all made to help me keep track of my Balance rotation crap, cause otherwise I suck (worse than normal). The key things I wanted were to tell me when my target does not have my dots (moonfire or insect swarm) AND even if those dots were up, to warn me when they had under 3 seconds left (and thus could be recast without clipping any ticks). I also wanted to know when my primary cooldowns were available, especially Starsurge when it normally came off cooldown but also when a Shooting Stars proc reset the CD instantly.

    To see what it sorta looks like in-game, I've attached a couple screenshots. Ignore the words and the bar underneath, that's a different addon, but the 5 icons are the WeakAuras part, and when they are visible, it means I can and should use it. It's also worth noting that WeakAuras lets you "Group" individual Auras together, so you can edit various general settings for all Auras in that group simultaneously. I have all my Balance stuff grouped, so I can move them as one around the screen, or resize them, or set their load trigger to be the same (meaning, they all load when I'm Balance speced only); pretty handy.

    I won't explain them all, but you can use these guidelines for your own versions for other spells.

    Self-Applied Debuff/DoT Warning

    This will display the icon you specify when your current target does not have that Debuff/DoT applied by you currently active, or if it's active, when it has under 3 seconds remaining. This makes keeping DoTs active very simple as you can see the icon pop, spam that button for your next GCD, and never worry about clipping or losing the DoT.

    1. Type: Icon
    2. Display > Display Icon: Spell_Nature_StarFall (Moonfire icon, change to whatever you want)
    3. Trigger > Main Trigger > Type: Custom
    4. Main Trigger > Event Type: Status
    5. Main Trigger > Check On...: Every Frame
    6. Main Trigger > Custom Trigger:
    Code:
    function() 
    local t = GetTime();
    local _,_,_,_,_,_,eM,uM = UnitDebuff('target', 'Moonfire')
    local _,_,_,_,_,_,eS,uS = UnitDebuff('target', 'Sunfire')
    if (eM and (eM - t) <= 3 and uM == 'player') or (eS and (eS - t) <= 3 and uS == 'player') or (not eM and not eS) then
     return true;
    end
    return false;
    end
    7. Main Trigger > Custom Untrigger:
    Code:
    function() 
    local t = GetTime();
    local _,_,_,_,_,_,eM,uM = UnitDebuff('target', 'Moonfire')
    local _,_,_,_,_,_,eS,uS = UnitDebuff('target', 'Sunfire')
    if (eM and (eM - t) >= 3 and uM == 'player') or (eS and (eS - t) >= 3 and uS == 'player') then
     return true;
    end
    return false;
    end
    8. Main Trigger > Conditions > In Combat: Checked
    9. Load > Talent Specialization: First Tree (Balance) [Change as appropriate or don't check if you want it to load for all specs]

    Note: This trigger actually checks for two different debuffs, since Druid Moonfire is sometimes Moonfire and sometimes Sunfire. If you want to check for two different debuffs, use the above Trigger/Untrigger, changing the names appropriately (Moonfire and Sunfire). If you want just a single debuff to check, use these instead (again changing Insect Swarm to your debuff name):

    Custom Trigger:
    Code:
    function() 
    local t = GetTime();
    local _,_,_,_,_,_,e,u = UnitDebuff('target', 'Insect Swarm')
    if (not e) or (e and (e - t) <= 3 and u == 'player') then
     return true;
    end
    return false;
    end
    Custom Untrigger:
    Code:
    function() 
    local t = GetTime();
    local _,_,_,_,_,_,e,u = UnitDebuff('target', 'Insect Swarm')
    if (e and (e - t) >= 3 and u == 'player') then
     return true;
    end
    return false;
    end
    Spell Cooldown (For Spells That Can Proc Instant CD Refreshes)

    As described above, this is a fairly basic thing, but because of the way the actual "cooldown" of abilities works, you have to use a custom trigger to check the actual time left frequently to see if an instant proc caused the cooldown to become available right away before it normally would've otherwise. It also will show you the icon if the cooldown is not quite available, but WILL be available within one more GCD (so you can prepare to spam that button for your next GCD basically).

    Import String



    As before, change the spellId number in the Trigger > Custom Trigger & Trigger > Custom Untrigger to match your appropriate spell you're checking the cooldown on.

    Normal Spell Cooldown

    This one is a basic cooldown aura, for abilities you don't need to know about from instant-proc effects and such, things that will always come off cooldown the same time all the time, such as Treants for me.

    1. Type: Icon
    2. Trigger > Main Trigger > Type: Status
    3. Main Trigger > Status: Cooldown Progress (Spell)
    4. Main Trigger > Spell: Force of Nature (change as appropriate)
    5. Main Trigger > Ignore GCD: Checked (this will ignore the GCD and show you immediately)
    6. Main Trigger > Inverse: Checked (This tells it to only show the icon when the ability is AVAILABLE to use)
    7. Main Trigger > Conditions > In Combat: Checked
    8. Load > Talent Specialization: First Tree (Balance) [Change as appropriate]





    There are tons of others and as I said, most anything can be done or checked to trigger an indicator/aura, so feel free to ask and I'll try to help you out!
    Attached Images Attached Images
    Last edited by Kulldam; 04-29-2011 at 12:32 AM.

  2. #2

    Default

    Trigger: Target by Name

    This one is just the TRIGGER and UNTRIGGER portion of the Aura, and should be used in conjunction with other stuff in most cases. Using this trigger as part of the set of Triggers for your Aura will allow you to check your target is a specific named mob.

    1. Trigger > Type: Custom
    2. Trigger > Event Type: Status
    3. Trigger > Check On...: Every Frame
    4. Trigger > Custom Trigger:
    Code:
    function()
      if UnitName("target") == "Creature Name" then
        return true
      end
    end
    5. Trigger > Custom Untrigger:
    Code:
    function()
      if UnitName("target") ~= "Creature Name" then
        return true
      end
    end
    You can of course check different things besides your target (such as focus, or multiple things at the same time, or only in certain zones, or so on), but the above is a basic outline. Ask if want more.

  3. #3

    Default

    Thanks a lot for this thread! The first two work great, but the second errors out whenever I enter the trigger. Something with an eof error

  4. #4

    Default

    Quote Originally Posted by Darktan View Post
    Thanks a lot for this thread! The first two work great, but the second errors out whenever I enter the trigger. Something with an eof error
    Which one specifically is giving you the error Darktan?

  5. #5

    Default

    Quick service here, haha.

    The Starsurge CD icon does. I entered the Spell ID etc. with no avail. When I deleted the lines with the classes, it accepted the code but was spitting out .lua errors like crazy. Would you be able to export yours and post that code here by any chance?

  6. #6

    Default

    Quote Originally Posted by Darktan View Post
    Quick service here, haha.

    The Starsurge CD icon does. I entered the Spell ID etc. with no avail. When I deleted the lines with the classes, it accepted the code but was spitting out .lua errors like crazy. Would you be able to export yours and post that code here by any chance?
    Hmm, that's exactly the copy/paste of my in-game trigger code:
    Code:
    function ()
    	local spells = {["DRUID"] = 18960, ["PALADIN"] = 20154, ["PRIEST"] = 585, ["SHAMAN"] = 403, ["WARRIOR"] = 34428, ["DEATHKNIGHT"] = 47541, ["HUNTER"] = 56641, ["MAGE"] = 133, ["WARLOCK"] = 686, ["ROGUE"] = 1752};
    	local t = GetTime();
    	local _,g = GetSpellCooldown(spells[select(2, UnitClass("player"))]);
    	local s,d = GetSpellCooldown(33878); --[[CHANGE THIS SPELL ID]]
    	if s == 0 then
    		return true;
    	elseif ((s + d - t) <= 1.5) and (g > 0 and g <= 1.5) then
    		return true;
    	end
    	return false;
    end
    Is your copy/paste screwing up the line breaks or something? Also what class are you? The class spells are generic abilities that each class in question should have by default, so it can compare whether the GCD has been triggered. Perhaps the ability for your class is messed up, but from the error it sounds like the copy/paste into the game is screwing up somehow.

  7. #7

    Default

    Curiously enough it worked today. Thanks for your help!

  8. #8

    Default

    Right on, glad to hear it!

  9. #9

    Default

    Hi,
    thanks for your great guide.
    I'm a german restoration druid from the guild set sail for fail and i have a question about weakauras custom triggers.
    Sorry for my bad english .

    As a restoration druid i use regrowth to trigger the nature's grace buff (http://www.wowhead.com/spell=61346).
    This buff has a 1 minute cooldown.

    Is there a chance to setup a trigger in weakauras which shows me a icon when the cooldown from nature's grace is ready (1 minute after i had the nature's grace buff)?

    Thanks for your help.

    Adrenochrom

  10. #10

    Default

    Quote Originally Posted by adrenochrom View Post
    Hi,
    thanks for your great guide.
    I'm a german restoration druid from the guild set sail for fail and i have a question about weakauras custom triggers.
    Sorry for my bad english .

    As a restoration druid i use regrowth to trigger the nature's grace buff (http://www.wowhead.com/spell=61346).
    This buff has a 1 minute cooldown.

    Is there a chance to setup a trigger in weakauras which shows me a icon when the cooldown from nature's grace is ready (1 minute after i had the nature's grace buff)?

    Thanks for your help.

    Adrenochrom
    Funny you should ask Adren, because I've been wondering the same thing about the internal cooldown of Nature's Grace! I'll spend some time with it in the next few days and see if there's a way to do that, because I'd hate to have to use a separate addon just for that one. I'll be sure to let you know if I figure anything out, and thanks for your positive feedback.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •