Skip to content

Instantly share code, notes, and snippets.

@arieh
Created May 16, 2018 12:09
Show Gist options
  • Save arieh/58294fed09a7e51b6e0eb42902bcf9c7 to your computer and use it in GitHub Desktop.
Save arieh/58294fed09a7e51b6e0eb42902bcf9c7 to your computer and use it in GitHub Desktop.
^1^T^SCLEUEvents^T ^S^B ^t^SType^Scleu ^SEvents^T ^N1^T ^SType^SLua ^SLua^Slocal~`icon~`=~`...~J ~J if~`TMW.getLowHealthCount~`then~`return~`end~J TMW.getLowHealthCount~`=~`true~J icon.env_aura~`=~`{};~J local~`aura_env=~`icon.env_aura~J aura_env.low_health_count~`=~`0;~J local~`counter_name~`=~`"low_health_count";~J ~J TMW_ST:InitCounter(counter_name,~`aura_env.fragment_counter) ^SEvent^SOnEventsRestored ^t^N2^T ^SType^SLua ^SLua^Slocal~`icon~`=~`...~J ~J local~`low_health_count~`=~`0~J ~J local~`i,~`unit_name,~`current,~`max~J ~J for~`i=1,40~`do~`~J ~`~`~`~`unit_name~`=~`GetRaidRosterInfo(index)~J ~`~`~`~`if~`(unit_name)~`then~J ~`~`~`~`~`~`~`~`current~`=~`UnitHealth(unit_name)~J ~`~`~`~`~`~`~`~`max~`=~`UnitHealthMax(unit_name)~J ~`~`~`~`~`~`~`~`~J ~`~`~`~`~`~`~`~`if~`(current~`/~`max~`<~`0.3)~`then~J ~`~`~`~`~`~`~`~`~`~`~`~`low_health_count~`=~`~`low_health_count+1~J ~`~`~`~`~`~`~`~`end~J ~`~`~`~`end~J end~J ~J return~`~J ~J aura_env.low_health_count~`=~`low_health_count~J TMW_ST:UpdateCounter(counter_name,~`~`aura_env.low_health_count) ^SEvent^SOnCLEUEvent ^t^Sn^N2 ^t^SSettingsPerView^T ^Sicon^T ^STexts^T ^N1^S[Counter("low_health_count")] ^t^t^t^SCustomTex^S6940 ^SStates^T ^N1^T ^t^N2^T ^SAlpha^N1 ^t^N3^T ^t^N4^T ^t^t^SEnabled^B ^SConditions^T ^N1^T ^SType^SINSTANCE2 ^SBitFlags^N245760 ^t^Sn^N1 ^t^t^N84305^S~`~| ^Sicon^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment