1. #1

    Weak Aura Custom Function Help

    I use a function listed below to display how much my Frenzied regen should hit for. I was wondering if anyone had a way to either add to this function, and/or change the function so that instead of just displaying the amount of the healing, but to show the some sort of relationship between my current health defect and the amount I would heal for. That way if I know my heal will be effective. It sure sucks to blow a 250k FR when your only missing say 100k health


    function()
    local apbase,apbuff,apdebuff = UnitAttackPower("player")
    local ap = apbase + apbuff + apdebuff
    local _,agi,_,_ = UnitStat("player",2)
    local _,sta,_,_ = UnitStat("player",3)
    local rage = UnitPower("player",1)
    local FRamt = (max(2*(ap - agi*2), sta*2.5)/1000) * min(60,rage)/60
    return string.format("%.1fk", FRamt)
    end

    Sig Courtesy of Yoni

  2. #2
    Deleted
    Code:
    function()
        local apbase,apbuff,apdebuff = UnitAttackPower("player")
        local ap = apbase + apbuff + apdebuff
        local _,agi,_,_ = UnitStat("player",2)
        local _,sta,_,_ = UnitStat("player",3)
        local rage = UnitPower("player",1)
        local FRamt = max(2*(ap - agi*2), sta*2.5) * min(60,rage)/60
        local missingHealth = UnitHealthMax("player")-UnitHealth("player")
        local frEff, frOver = min(FRamt,missingHealth),max(FRamt-missingHealth,0)
        return string.format("%.1fk (Over: %.1fk)", frEff/1000, frOver/1000)
    end
    Something like this?

  3. #3
    Oh my god that's BEAUTIFUL! Now I'm gonna fiddle around and try and turn it into a Health Bar, w/ Predictive heal for FR! ie. Red Bar of Health w/ green chunk showing the healing/overhealing.

    Sig Courtesy of Yoni

  4. #4
    ^ be prepared for pain.
    Weak auras doesn't let you display two things on one progress bar (ie: you can't draw the bar yourself). You'll need two auras one for current health - which is easy enough, then you'll need a second for predicted health - which is also easy enough but then you'll need to babysit the positions of those so that predicted health is always drawn exactly at the right edge of current healths' "full" bar (which you'll have to calculate yourself). You'll also end up doing a lot of "tweaking" to make sure your bars always fit in the space allocated (because if you're at 100% and you have a 10% shield then your effective health is 110% and everything needs to scale in order to fit in the "unit frame area".

    The straight forward "make two auras with slightly different triggers" isn't enough and I couldn't come up with a way that didn't involve a dozen custom functions to make it work which is why there isn't a tutorial for it right now.

    If you can make it go without being buggy as heck you should make a tutorial for it - people will appreciate it.

Posting Permissions

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