1. #1

    Weakaura glyph trigger

    I was wondering if its possible to write an aura to trigger based on a glyph, aka I would like an aura to trigger if I'm in ToT but have a Pvp glyph active.

  2. #2
    Sure, it's possible.

    It seems like you'd make one with appropriate load/spec conditions for being in a raid then add a trigger that fires on events like player_entering_world and zone_changed_* . it would call GetGlyphSocketInfo and look for spell IDs that are 'bad' and return true. You'd make the 'hide' trigger timed for some amount of time (say 10 seconds) so that if you want to ignore the aura then you can but it'll be obvious for a short while after you change zones

    Code:
    function() -- this is the basic idea - i'm writing this on a phone so it probably needs cleaning up.
      local badGlyphId = 12345 -- spell-id goes here
      local hasBadGlyph = false
      for i,1, NUM_GLYPH_SLOTS do
        if (select(4, GetGlpyhSocketInfo) == badGlpyhId)) {
          hasBadGlpyh = true
        end
      end
      return hasBadGlyph
    end
    There will be some leg work for you (ie: determining counts as a "pvp glyph", what their spell id is, what events to fire on, what zones need checking, etc. but the basic idea is sound.
    A new UI series for 5.2Steal my old UILearn about WeakAuras • Nobody to raid with right now so no PVE videos.

  3. #3
    Quote Originally Posted by evn View Post
    Code:
    function() -- this is the basic idea - i'm writing this on a phone so it probably needs cleaning up.
      local badGlyphId = 12345 -- spell-id goes here
      local hasBadGlyph = false
      for i=1, NUM_GLYPH_SLOTS do
        if (select(4, GetGlyphSocketInfo(i)) == badGlyphId)) {
          hasBadGlyph = true
          break
        end
      end
      return hasBadGlyph
    end
    Fixed some typos.

    And to be clear, you should be able to use that to check for the presence of any glyph (whether the goal is to have the glyph active or not). It will return true if you have the glyph, false if you don't. If you want to invert that behavior you can change the 2nd to last line to "return not hasBadGlyph".
    Last edited by aggixx; 2013-05-31 at 03:09 AM.

    Feral Druid Maintainer of SimC // Moderator at Fluid Druid forums
    Pawkets' Armory
    // Pawkets' Pro Raiders // <Forgotten Aspects>

  4. #4

    Question Script not working

    Hi there!

    I know this post is old, but maybe anybody can help me.
    I actually tried to use this trigger to check if i have the Glyph for Chainlightning in a slot, so i changed your code in that way:

    Code:
    function()
      local badGlyphId = 41518
      local hasBadGlyph = false
      for i=1, NUM_GLYPH_SLOTS do
        if (select(4, GetGlyphSocketInfo(i)) == badGlyphId)) {
          hasBadGlyph = true
          break
        end
      end
      return hasBadGlyph
    end
    I used the GlyphID i saw on wowhead from the Glyphitem itself, i hope that is right.

    Everytime i get this error:

    [string "return function()..."]:5: 'then' expected near ')'

    I have to say, that i use the german client and the latest WeakAura2 Addon.
    I don't know how to fix this problem, maybe anybody can help me a bit?

    Thanks a lot,

    Zalasta

  5. #5
    There was an error in the original post that I didn't catch, the left curly bracket on the if line should be a "then" instead, like so:
    Code:
    function()
      local badGlyphId = 41518
      local hasBadGlyph = false
      for i=1, NUM_GLYPH_SLOTS do
        if (select(4, GetGlyphSocketInfo(i)) == badGlyphId)) then
          hasBadGlyph = true
          break
        end
      end
      return hasBadGlyph
    end

    Feral Druid Maintainer of SimC // Moderator at Fluid Druid forums
    Pawkets' Armory
    // Pawkets' Pro Raiders // <Forgotten Aspects>

Posting Permissions

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