Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.37 KB | None | 0 0
  1. {
  2. "i": 458720,
  3. "m": "d",
  4. "s": "Dev",
  5. "d": {
  6. "yOffset": -88.999969482422,
  7. "desaturate": false,
  8. "additional_triggers": [
  9. {
  10. "untrigger": [],
  11. "trigger": {
  12. "use_absorbMode": true,
  13. "unit": "player",
  14. "use_unit": true,
  15. "unevent": "auto",
  16. "custom": "function()\n aura_env.makehealerlist()\n return false\nend\n\n\n\n\n\n\n\n",
  17. "subeventSuffix": "_CAST_START",
  18. "events": "GROUP_ROSTER_UPDATE",
  19. "event": "Health",
  20. "type": "custom",
  21. "custom_type": "status",
  22. "subeventPrefix": "SPELL",
  23. "check": "event"
  24. }
  25. }
  26. ],
  27. "text1Point": "TOP",
  28. "regionType": "text",
  29. "animation": {
  30. "main": {
  31. "colorA": 1,
  32. "x": 0,
  33. "use_color": true,
  34. "y": 0,
  35. "rotate": 0,
  36. "scaley": 1,
  37. "colorFunc": "function()\n if WeakAuras.IsOptionsOpen() then\n return 1,1,1,1\n end\n local time = GetTime()\n if not aura_env.last or aura_env.last < time - 0.2 then\n aura_env.last = time\n \n -- number of atonements\n local atonement_count = aura_env.atonement_count()\n \n if atonement_count > 0 then\n local vers = 1 + GetCombatRatingBonus(29) / 100\n local mastery = 1 + GetMasteryEffect() / 100\n local haste = UnitSpellHaste(\"player\")\n local holy_crit_chance = GetSpellCritChance(2)/100\n local spellBonusArcane = GetSpellBonusDamage(7)\n local atonement_transfer = mastery * 60 / 100\n local hasTof = WA_GetUnitBuff(\"player\", 265259)\n local tof = hasTof and 1.2 or 1\n local hasSchism = WA_GetUnitDebuff(\"target\", 214621)\n local schism = hasSchism and 1.4 or 1\n local hasSins = select(4, GetTalentInfo(5, 1, 1))\n local sins = hasSins and aura_env.sotm[atonement_count] or 1\n \n \n -- calc smite healing \n -- TODO: add \"Weal and Woe\" and \"Gift of Forgiveness\" traits\n local heal_per_unit = spellBonusArcane * 0.5 * 1.5 * vers * atonement_transfer * tof * sins * schism\n local heal_per_unit_avg = heal_per_unit + heal_per_unit*holy_crit_chance\n \n local casttime = select(4, GetSpellInfo(585))\n local heal_hit, heal_crit, threshold_pct = aura_env.calc_healing_from_spell(casttime, heal_per_unit)\n local heal_avg = heal_hit*(1-holy_crit_chance) + heal_crit*holy_crit_chance\n \n local efficiency = (heal_avg*100) / heal_per_unit_avg\n --print((\"efficiency: %.1f - threshold_pct: %.1f\"):format(efficiency, threshold_pct))\n \n local col = {[\"red\"] = {1,0,0,1}, [\"orange\"] = {1,0.5,0,1}, [\"yellow\"] = {1,1,0,1}, [\"green\"] = {0,1,0,1}}\n local choice = {}\n \n if threshold_pct > aura_env.min_threshold_pct then\n if efficiency >= aura_env.color.green then\n choice = col.green\n elseif efficiency >= aura_env.color.yellow then\n choice = col.yellow\n elseif efficiency >= aura_env.color.orange then\n choice = col.orange\n else\n choice = col.red\n end\n else\n choice = col.red\n end\n \n aura_env.cur_color = choice\n end\n end\n if aura_env.cur_color then\n return aura_env.cur_color[1], aura_env.cur_color[2], aura_env.cur_color[3], aura_env.cur_color[4]\n else\n return 1,1,1,1\n end \nend",
  38. "colorType": "custom",
  39. "colorR": 1,
  40. "colorG": 1,
  41. "alpha": 0,
  42. "type": "custom",
  43. "duration_type": "seconds",
  44. "colorB": 1,
  45. "scalex": 1
  46. },
  47. "start": {
  48. "type": "none",
  49. "duration_type": "seconds"
  50. },
  51. "finish": {
  52. "type": "none",
  53. "duration_type": "seconds"
  54. }
  55. },
  56. "keepAspectRatio": false,
  57. "selfPoint": "CENTER",
  58. "cooldownTextEnabled": true,
  59. "stickyDuration": false,
  60. "text1Font": "Friz Quadrata TT",
  61. "init_started": 1,
  62. "xOffset": -266.00006103516,
  63. "glow": false,
  64. "text1FontSize": 13,
  65. "text2Point": "CENTER",
  66. "height": 36.000007629395,
  67. "text1Enabled": true,
  68. "width": 25.999996185303,
  69. "text2Font": "Friz Quadrata TT",
  70. "text2FontFlags": "OUTLINE",
  71. "text1Containment": "OUTSIDE",
  72. "disjunctive": "custom",
  73. "internalVersion": 3,
  74. "customTriggerLogic": "function(t) return t[1] end",
  75. "text2Enabled": false,
  76. "text2FontSize": 24,
  77. "text2Containment": "INSIDE",
  78. "uid": "cM7I)yZeYPH",
  79. "text2Color": [
  80. 1,
  81. 1,
  82. 1,
  83. 1
  84. ],
  85. "auto": true,
  86. "numTriggers": 2,
  87. "text1FontFlags": "OUTLINE",
  88. "text2": "%p",
  89. "displayText": "%s",
  90. "displayIcon": 135769,
  91. "actions": {
  92. "init": {
  93. "custom": "-- Buds#0500 @ Discord - https://wago.io/p/Buds\n-- https://wago.io/H1DUIp0zm\n-- update: 14/07/2018\n\n-- heck healing done by other healers in group (set false to improve fps)\naura_env.check_incoming_heal = true\n\n-- add delay to smite cast time\naura_env.reaction_time = 500\n\n-- ignore units with more than 99% HP (lower to improve fps)\naura_env.health_deficit_threshold = 99\n\n-- don't use smite if 50% of units with atonement have more than 99% HP\naura_env.min_threshold_pct = 50\n\n--green if total healing from a smite heal is >= 100% of a single atonement smite heal (might have to change how this is calculated)\naura_env.color = {\n [\"green\"] = 100.0,\n [\"yellow\"] = 70.0,\n [\"orange\"] = 40.0\n}\n\n--------------------\naura_env.healers = {}\n\nfunction aura_env.GroupMembers(reversed, forceParty)\n local unit = (not forceParty and IsInRaid()) and 'raid' or 'party'\n local numGroupMembers = (forceParty and GetNumSubgroupMembers() or GetNumGroupMembers()) - (unit == \"party\" and 1 or 0)\n local i = reversed and numGroupMembers or (unit == 'party' and 0 or 1)\n return function()\n local ret\n if i == 0 and unit == 'party' then\n ret = 'player'\n elseif i <= numGroupMembers and i > 0 then\n ret = unit .. i\n end\n i = i + (reversed and -1 or 1)\n return ret\n end\nend\n\naura_env.atonement_count = function()\n local triggerInfo = WeakAuras.triggerState[aura_env.id][0][\"\"]\n return triggerInfo and triggerInfo.stacks or 0\nend\naura_env.atonement_list = function()\n local triggerInfo = WeakAuras.triggerState[aura_env.id][0][\"\"]\n return triggerInfo and triggerInfo.name and string.gmatch(triggerInfo.name, \"%S+\")\nend\n\n\naura_env.sotm = {\n [0] = 1.12,\n [1] = 1.12,\n [2] = 1.10,\n [3] = 1.09,\n [4] = 1.08,\n [5] = 1.07,\n [6] = 1.06,\n [7] = 1.05,\n [8] = 1.04\n}\nsetmetatable(aura_env.sotm, {__index = function () return 1.03 end}) -- default 1.03\n\naura_env.makehealerlist = function()\n aura_env.healers = {}\n for groupmember in WA_IterateGroupMembers() do\n if UnitGroupRolesAssigned(groupmember) == \"HEALER\" and UnitGUID(groupmember) ~= WeakAuras.myGUID then\n table.insert(aura_env.healers, groupmember)\n end\n end\nend\n\n\nfunction aura_env.calc_healing_from_spell(cast_time, healing_per_unit)\n local now = GetTime()\n local heal_hit, heal_crit = 0, 0\n \n local count_atonement_filtered = 0 -- count units with atonement up when cast finish\n local count_atonement_filtered_underthreshold = 0 -- count units with atonement up when cast finish + hp < threshold\n \n -- get atonement list from aura trigger, save a lot of time\n local ato_list = aura_env.atonement_list()\n if ato_list then\n for unit in ato_list do\n local ato = select(6, WA_GetUnitBuff(unit, 194384, \"PLAYER\"))\n local atonement_remaining_time = ato and ato - now or 0\n -- filter if buff drop before end of cast\n if atonement_remaining_time*1000 > cast_time + aura_env.reaction_time then\n count_atonement_filtered = count_atonement_filtered +1\n \n local hp_max, hp_cur = UnitHealthMax(unit), UnitHealth(unit)\n local health_deficit = hp_max - hp_cur\n local hp_pct = hp_cur / hp_max * 100\n -- check deficit threshold\n if hp_pct < aura_env.health_deficit_threshold then\n count_atonement_filtered_underthreshold = count_atonement_filtered_underthreshold + 1\n -- incoming heal\n if aura_env.check_incoming_heal then\n if UnitGetIncomingHeals(unit) > 0 then\n -- incoming heal source(s)\n local external_healing_total = 0\n for _,healer in pairs(aura_env.healers) do\n local external_healing = UnitGetIncomingHeals(unit, healer) or 0\n if external_healing > 0 then\n -- process only incoming heals that will land before the smite\n local when_lands = select(5, UnitCastingInfo(healer))\n if when_lands then\n when_lands = when_lands - now*1000\n if when_lands < cast_time + aura_env.reaction_time then\n external_healing_total = external_healing_total + external_healing\n end\n end\n end\n end\n external_healing_total = external_healing_total < health_deficit and external_healing_total or health_deficit\n health_deficit = health_deficit - external_healing_total\n end\n end\n -- compute the heal received by this unit\n local this_hit = health_deficit < healing_per_unit and health_deficit or healing_per_unit\n local this_crit = health_deficit < healing_per_unit*2 and health_deficit or healing_per_unit*2\n heal_hit = heal_hit + this_hit\n heal_crit = heal_crit + this_crit\n end\n end\n end\n end\n \n if count_atonement_filtered > 0 then\n local count_atonement_filtered_underthreshold_pct = count_atonement_filtered_underthreshold / count_atonement_filtered * 100\n return heal_hit, heal_crit, count_atonement_filtered_underthreshold_pct\n else\n return 0, 0 ,0\n end\nend",
  94. "do_custom": true
  95. }
  96. },
  97. "customText": "",
  98. "zoom": 0,
  99. "text1": "%n",
  100. "inverse": false,
  101. "load": {
  102. "difficulty": {
  103. "multi": []
  104. },
  105. "faction": {
  106. "multi": []
  107. },
  108. "use_spec": true,
  109. "class": {
  110. "single": "PRIEST"
  111. },
  112. "ingroup": {
  113. "single": "group",
  114. "multi": {
  115. "group": true
  116. }
  117. },
  118. "race": {
  119. "multi": []
  120. },
  121. "spec": {
  122. "single": 1
  123. },
  124. "use_class": true,
  125. "role": {
  126. "multi": []
  127. },
  128. "use_ingroup": true,
  129. "pvptalent": {
  130. "multi": []
  131. },
  132. "talent": {
  133. "multi": []
  134. },
  135. "talent2": {
  136. "multi": []
  137. }
  138. },
  139. "trigger": {
  140. "ownOnly": true,
  141. "name_info": "players",
  142. "showOn": "showOnActive",
  143. "group_count": "0",
  144. "spellIds": [
  145. 81749,
  146. 214206,
  147. 194384
  148. ],
  149. "debuffType": "HELPFUL",
  150. "unit": "group",
  151. "names": [
  152. "Atonement",
  153. "Atonement",
  154. "Atonement"
  155. ],
  156. "stack_info": "count",
  157. "use_specific_unit": false,
  158. "group_countOperator": ">"
  159. },
  160. "icon": true,
  161. "id": "Atonement count with smite helper",
  162. "text1Color": [
  163. 1,
  164. 1,
  165. 1,
  166. 1
  167. ],
  168. "activeTriggerMode": 0,
  169. "fontSize": 36,
  170. "url": "https://wago.io/H1DUIp0zm/4"
  171. },
  172. "v": 1421,
  173. "a": {
  174. "Atonement": 458720
  175. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement