1. #1
    Deleted

    Elemental WA Help: Mana Percentage and Earth/Fire Elemental Duration

    I'm having trouble with two things, someone might help.

    First off I would like to make a Manabar, but have trouble to calculate the current Manapercentage. I work with the normal custom function:
    function()
    local p = math.max(0, UnitMana("player")) / math.max(1, UnitManaMax("player")) * 100;
    return string.format("%.f", p) .. "%%";
    end

    and it's not working. I guess you would have to work with PowerType to actually get the Mana and not the Maelstrom.

    Secondly I'm not sure how to track the duration of my Fire/Earth Elemental. I'm working on a WA showing normal Icon if off Cooldown, desaturate Icon with CD when on CD, but I'd like to add the normal saturate Icon with a green duration time if the Elemental is out. Easily done for all my Totems, but the Elementals because i can't keep track of them as a Totem.

    Thanks in advance.

  2. #2

  3. #3
    Just replace UnitMana("player") with UnitPower("player", SPELL_POWER_MANA)

  4. #4
    Deleted
    Okay, Manabar done. Thanks Shauren.

    Anybody an idea how to track if any Elemental is out?

Posting Permissions

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