I'm trying to make a simple text output of my current spell power value. I've created a text aura with %c value and this custom function:

Code:
function(school)
    local schools, spellPower = {'physical', 'holy', 'fire', 'nature', 'frost', 'shadow', 'arcane'}
    local GetIndex = function(table, value) for i,v in pairs(table) do if v == value then return i end end end
    if school and tContains(schools, school) then spellPower = GetSpellBonusDamage(GetIndex(schools, school)) else
        local holySchool = 2
        minModifier, holySchool = GetSpellBonusDamage(holySchool), 2
        for i=(holySchool+1), MAX_SPELL_SCHOOLS do
            local bonusDamage = GetSpellBonusDamage(i)
            minModifier = min(minModifier, bonusDamage)
            spellPower = bonusDamage
        end   
    end
    return spellPower
end
It works quite well immediately but only when my WA2 settings window is open. I figured I need to create a trigger (I thought that wasn't necessary if I wanted my aura to be always visible). I've tried for a couple of hours now, different combinations, but I can't satisfy all my requirements, which are:

1) Display my text aura always
2) Update it when my spell power changes
3) Don't update on every frame, only on spell power changes

Can anyone help me figure out the trigger(s) needed for this?