Advertisement
perpsexityhehe

Untitled

Nov 7th, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.19 KB | None | 0 0
  1. {
  2. ["outline"] = "OUTLINE",
  3. ["xOffset"] = 0,
  4. ["displayText"] = "",
  5. ["customText"] = "",
  6. ["yOffset"] = 0,
  7. ["anchorPoint"] = "CENTER",
  8. ["cooldownSwipe"] = true,
  9. ["customTextUpdate"] = "update",
  10. ["url"] = "https://wago.io/84b4-N5KZ/5",
  11. ["actions"] = {
  12. ["start"] = {
  13. ["sound"] = " custom",
  14. ["do_sound"] = false,
  15. },
  16. ["init"] = {
  17. ["custom"] = "C_ChatInfo.RegisterAddonMessagePrefix(\\\"WSGFCNamesHP\\\")\\nstr_alliance_flag_drop = \\\"The Alliance Flag was dropped by \\\"\\nstr_horde_flag_drop = \\\"The Horde flag was dropped by \\\"\\nstr_alliance_flag_cap = \\\"captured the Alliance flag\\\"\\nstr_horde_flag_cap = \\\"captured the Horde flag\\\"\\nstr_alliance_flag_pickup = \\\"The Alliance Flag was picked up by \\\"\\nstr_horde_flag_pickup = \\\"The Horde flag was picked up by \\\"\\n\\n\\n\\nlocal name_player, realm_player = UnitFullName(\\\"player\\\")\\nFULLNAME_PLAYER = name_player .. \\\"-\\\" .. realm_player\\n\\ntime_addonmsg = 0\\ntime_announce = 0\\nhp_tracker = -1\\n\\nstr_faction_player = UnitFactionGroup(\\\"player\\\")\\nWSG_TABLE = {\\n [\\\"Alliance\\\"]={\\n txt_flag_holder=nil,\\n str_flag_holder=nil,\\n str_flag_holder_macro = nil,\\n time_announce=0,\\n hp_tracker=1,\\n hp_msg_send=\\\"\\\",\\n hp_received=nil,\\n hp_received_ts=0,\\n },\\n [\\\"Horde\\\"]={\\n txt_flag_holder=nil,\\n str_flag_holder=nil,\\n str_flag_holder_macro = nil,\\n time_announce=0,\\n hp_tracker=1,\\n hp_msg_send=\\\"\\\",\\n hp_received=nil,\\n hp_received_ts=0,\\n },\\n}\\n\\nGET_FLAG_HOLDER_HP = function(faction_flag)\\n if str_faction_player ~= faction_flag then\\n local unitname = WSG_TABLE[faction_flag].str_flag_holder\\n local hp_cur = UnitHealth(unitname)\\n local hp_max = UnitHealthMax(unitname) \\n if hp_max > 0 then\\n return hp_cur/hp_max\\n end\\n else\\n for ii=1,10 do\\n local unit = \\\"raid\\\" .. ii .. \\\"target\\\"\\n if UnitExists(unit) then\\n local hp_cur = UnitHealth(unit) \\n local hp_max = UnitHealthMax(unit) \\n local unitname = GET_NAME_WITH_REALM(unit)\\n if unitname == WSG_TABLE[str_faction_player].str_flag_holder then\\n if hp_max > 0 then\\n return hp_cur/hp_max\\n end\\n end\\n end\\n end\\n end\\n return nil\\nend\\n\\nGET_NAME_WITH_REALM = function(unit)\\n if UnitExists(unit) then\\n local name,realm = UnitName(unit)\\n if realm and realm ~= \\\"\\\" then\\n return name .. \\\"-\\\" .. realm\\n else\\n return name\\n end\\n else\\n return nil\\n end\\nend\\n\\nGET_COLORED_NAME_FROM_BG_SCORE = function (playername)\\n local function GetClassFromBGScore(name_target)\\n --local numScores = GetNumBattlefieldScores()\\n for i=1,20 do\\n local name, killingBlows, honorableKills, deaths, honorGained, faction, rank, race, class, CLASS = GetBattlefieldScore(i);\\n if name == name_target then\\n return CLASS\\n end\\n end\\n return nil\\n end\\n \\n local function DecimalToHex(r,g,b)\\n return string.format(\\\"|cff%02x%02x%02x\\\", r*255, g*255, b*255)\\n end\\n \\n local r,g,b,classcolor,PLAYERCLASS\\n \\n if UnitInRaid(playername) then\\n _,PLAYERCLASS = UnitClass(playername)\\n else\\n PLAYERCLASS = GetClassFromBGScore(playername)\\n end\\n \\n if PLAYERCLASS then\\n classcolor = RAID_CLASS_COLORS[PLAYERCLASS]\\n r,g,b = classcolor.r,classcolor.g,classcolor.b\\n else\\n r,g,b = 0.5,0.5,0.5\\n end\\n \\n local classcolorhex = DecimalToHex(r,g,b)\\n return classcolorhex..playername..\\\"|r\\\"\\nend\\n\\nINITIALIZE_FC_TEXT = function ()\\n local p = {UIWidgetTopCenterContainerFrame:GetChildren()};\\n local f\\n for ii = 1,2 do\\n f = p[ii]\\n if f then\\n if f.tooltip == \\\"Horde flag captures\\\" or f.tooltip == \\\"Alliance flag captures\\\" then\\n if not f.TXT_FLAG_HOLDER and not InCombatLockdown() then\\n local text_ = CreateFrame(\\\"Button\\\", nil, f, \\\"SecureUnitButtonTemplate\\\")\\n text_:SetFrameStrata(\\\"MEDIUM\\\")\\n text_:SetFrameLevel(15)\\n text_:SetPoint(\\\"LEFT\\\",85,0)\\n text_:SetAttribute(\\\"type\\\",\\\"macro\\\")\\n text_:RegisterForClicks(\\\"AnyUp\\\")\\n text_:SetAttribute('macrotext', '')\\n \\n text_.text = text_:CreateFontString(nil,\\\"ARTWORK\\\") \\n text_.text:SetFont(\\\"Fonts\\\\\\\\FRIZQT__.TTF\\\", 14, \\\"OUTLINE\\\")\\n text_.text:SetPoint(\\\"LEFT\\\",0,0)\\n text_.text:SetText(\\\"\\\")\\n \\n text_:SetSize(text_.text:GetWidth(),text_.text:GetHeight())\\n \\n f.TXT_FLAG_HOLDER = text_\\n end\\n end\\n if f.TXT_FLAG_HOLDER then\\n if f.tooltip == \\\"Horde flag captures\\\" then\\n WSG_TABLE[\\\"Alliance\\\"].txt_flag_holder = f.TXT_FLAG_HOLDER\\n elseif f.tooltip == \\\"Alliance flag captures\\\" then\\n WSG_TABLE[\\\"Horde\\\"].txt_flag_holder = f.TXT_FLAG_HOLDER\\n end\\n end\\n end\\n end\\nend\\n\\nINITIALIZE_FC_TEXT()",
  18. ["do_custom"] = true,
  19. },
  20. ["finish"] = {
  21. },
  22. },
  23. ["triggers"] = {
  24. [1] = {
  25. ["trigger"] = {
  26. ["message_operator"] = "find('%s')",
  27. ["names"] = {
  28. },
  29. ["custom_hide"] = "timed",
  30. ["type"] = "custom",
  31. ["debuffType"] = "HELPFUL",
  32. ["unevent"] = "timed",
  33. ["custom_type"] = "event",
  34. ["unit"] = "player",
  35. ["event"] = "Chat Message",
  36. ["subeventPrefix"] = "SPELL",
  37. ["message"] = "the sting of defeat at the conclusion of the Third War",
  38. ["spellIds"] = {
  39. },
  40. ["events"] = "CHAT_MSG_BG_SYSTEM_ALLIANCE, CHAT_MSG_BG_SYSTEM_HORDE, CHAT_MSG_ADDON",
  41. ["custom"] = "function(event,msg)\\n if event == \\\"CHAT_MSG_BG_SYSTEM_ALLIANCE\\\" or event == \\\"CHAT_MSG_BG_SYSTEM_HORDE\\\" then\\n INITIALIZE_FC_TEXT()\\n if string.match(msg,str_horde_flag_pickup) then\\n local name = string.gsub(string.gsub(msg,str_horde_flag_pickup,\\\"\\\"),\\\"!\\\",\\\"\\\")\\n WSG_TABLE[\\\"Horde\\\"].str_flag_holder = name\\n WSG_TABLE[\\\"Horde\\\"].hp_tracker = 1\\n RequestBattlefieldScoreData()\\n elseif string.match(msg,str_alliance_flag_pickup) then\\n local name = string.gsub(string.gsub(msg,str_alliance_flag_pickup,\\\"\\\"),\\\"!\\\",\\\"\\\")\\n WSG_TABLE[\\\"Alliance\\\"].str_flag_holder = name\\n WSG_TABLE[\\\"Alliance\\\"].hp_tracker = 1\\n RequestBattlefieldScoreData()\\n elseif string.match(msg,str_horde_flag_drop) or string.match(msg,str_horde_flag_cap) then\\n WSG_TABLE[\\\"Horde\\\"].str_flag_holder = nil\\n WSG_TABLE[\\\"Horde\\\"].hp_tracker = 1\\n elseif string.match(msg,str_alliance_flag_drop) or string.match(msg,str_alliance_flag_cap) then\\n WSG_TABLE[\\\"Alliance\\\"].str_flag_holder = nil\\n WSG_TABLE[\\\"Alliance\\\"].hp_tracker = 1\\n end\\n end\\n \\n \\nend\\n\\n\\n",
  42. ["use_message"] = false,
  43. ["subeventSuffix"] = "_CAST_START",
  44. ["use_messageType"] = false,
  45. ["messageType"] = "CHAT_MSG_RAID_BOSS_EMOTE",
  46. },
  47. ["untrigger"] = {
  48. },
  49. },
  50. [2] = {
  51. ["trigger"] = {
  52. ["custom_hide"] = "timed",
  53. ["type"] = "custom",
  54. ["custom"] = "function()\\n local f, hp, txt\\n local in_combat = InCombatLockdown()\\n local time_cur = GetTime()\\n \\n for _,faction in pairs({\\\"Alliance\\\",\\\"Horde\\\"}) do\\n f = WSG_TABLE[faction].txt_flag_holder\\n if f then\\n txt = \\\"\\\"\\n if WSG_TABLE[faction].str_flag_holder then\\n txt = txt .. GET_COLORED_NAME_FROM_BG_SCORE(WSG_TABLE[faction].str_flag_holder)\\n \\n hp = GET_FLAG_HOLDER_HP(faction)\\n if hp then\\n txt = txt .. string.format(\\\" (%.1f%%) \\\",hp*100)\\n if faction == str_faction_player then\\n local msg_addon = string.format(\\\"%s@%.4f\\\",WSG_TABLE[faction].str_flag_holder,hp)\\n if msg_addon ~= WSG_TABLE[faction].hp_msg_send or (time_cur - time_addonmsg) > 1 then\\n time_addonmsg = time_cur\\n WSG_TABLE[faction].hp_msg_send = msg_addon\\n C_ChatInfo.SendAddonMessage(\\\"WSGFCNamesHP\\\",msg_addon,\\\"INSTANCE_CHAT\\\")\\n end\\n end\\n elseif faction == str_faction_player then\\n if WSG_TABLE[faction].hp_received and (time_cur - WSG_TABLE[faction].hp_received_ts) < 5 then\\n txt = txt .. string.format(\\\" |cff7f7f7f(%.1f%%)|r \\\",WSG_TABLE[faction].hp_received*100)\\n else\\n WSG_TABLE[faction].hp_received = nil\\n WSG_TABLE[faction].hp_received_ts = 0\\n end\\n end\\n \\n if hp and hp < 0.5 then\\n if math.abs(hp-WSG_TABLE[faction].hp_tracker) >= 0.10 and (time_cur - WSG_TABLE[faction].time_announce) > 3 then\\n WSG_TABLE[faction].hp_tracker = hp\\n WSG_TABLE[faction].time_announce = time_cur\\n if aura_env.config[\\\"AnnounceLowEFCHP\\\"] and faction == str_faction_player then\\n local str = string.format(\\\">>> ENEMY FC: %.1f%% <<<\\\",hp*100)\\n SendChatMessage(str,\\\"INSTANCE_CHAT\\\")\\n else\\n --local str = string.format(\\\"*** OUR FC: %.1f%% ***\\\",hp*100)\\n --SendChatMessage(str,\\\"INSTANCE_CHAT\\\")\\n end\\n end\\n elseif hp then\\n if math.abs(hp-WSG_TABLE[faction].hp_tracker) >= 0.10 then\\n WSG_TABLE[faction].hp_tracker = hp\\n end\\n else\\n if (time_cur-WSG_TABLE[faction].time_announce) > 30 then\\n WSG_TABLE[faction].hp_tracker = 1\\n end\\n end\\n \\n if in_combat and WSG_TABLE[faction].str_flag_holder ~= WSG_TABLE[faction].str_flag_holder_macro then\\n txt = txt .. \\\" (Unclickable)\\\"\\n end\\n end\\n f.text:SetText(txt)\\n \\n if not in_combat then\\n if WSG_TABLE[faction].str_flag_holder then\\n f:SetAttribute('macrotext', '/targetexact ' .. WSG_TABLE[faction].str_flag_holder)\\n else\\n f:SetAttribute('macrotext', '')\\n end\\n WSG_TABLE[faction].str_flag_holder_macro = WSG_TABLE[faction].str_flag_holder\\n f:SetSize(f.text:GetWidth(),f.text:GetHeight())\\n end\\n end\\n end\\n return true\\nend",
  55. ["subeventSuffix"] = "_CAST_START",
  56. ["check"] = "update",
  57. ["custom_type"] = "status",
  58. ["event"] = "Health",
  59. ["subeventPrefix"] = "SPELL",
  60. },
  61. ["untrigger"] = {
  62. },
  63. },
  64. [3] = {
  65. ["trigger"] = {
  66. ["custom_hide"] = "timed",
  67. ["type"] = "custom",
  68. ["custom"] = "function(event,prefix,msg,channel,sender)\\n \\n if event == \\\"CHAT_MSG_ADDON\\\" and prefix == \\\"WSGFCNamesHP\\\" and channel == \\\"INSTANCE_CHAT\\\" and sender ~= FULLNAME_PLAYER then\\n local name = string.match(msg,\\\"(.*)@\\\")\\n local hp = string.match(msg,\\\"@(.*)\\\")\\n if hp then hp = tonumber(hp) end\\n if name and name == WSG_TABLE[str_faction_player].str_flag_holder and hp then\\n WSG_TABLE[str_faction_player].hp_received = hp\\n WSG_TABLE[str_faction_player].hp_received_ts = GetTime()\\n end\\n end\\n \\n \\nend",
  69. ["subeventSuffix"] = "_CAST_START",
  70. ["events"] = "CHAT_MSG_ADDON",
  71. ["custom_type"] = "event",
  72. ["event"] = "Health",
  73. ["subeventPrefix"] = "SPELL",
  74. },
  75. ["untrigger"] = {
  76. },
  77. },
  78. ["disjunctive"] = "any",
  79. ["activeTriggerMode"] = 2,
  80. },
  81. ["internalVersion"] = 45,
  82. ["keepAspectRatio"] = false,
  83. ["animation"] = {
  84. ["start"] = {
  85. ["type"] = "none",
  86. ["duration_type"] = "seconds",
  87. ["easeStrength"] = 3,
  88. ["easeType"] = "none",
  89. },
  90. ["main"] = {
  91. ["type"] = "none",
  92. ["duration_type"] = "seconds",
  93. ["easeStrength"] = 3,
  94. ["easeType"] = "none",
  95. },
  96. ["finish"] = {
  97. ["type"] = "none",
  98. ["duration_type"] = "seconds",
  99. ["easeStrength"] = 3,
  100. ["easeType"] = "none",
  101. },
  102. },
  103. ["desc"] = "Adds alliance/horde flag carrier names at the top of the screen. Click name to target flag carrier.",
  104. ["semver"] = "1.0.4",
  105. ["font"] = "Friz Quadrata TT",
  106. ["version"] = 5,
  107. ["subRegions"] = {
  108. },
  109. ["height"] = 64,
  110. ["icon"] = true,
  111. ["load"] = {
  112. ["zoneIds"] = "",
  113. ["use_zone"] = true,
  114. ["use_never"] = false,
  115. ["zone"] = "Warsong Gulch",
  116. ["talent"] = {
  117. ["multi"] = {
  118. },
  119. },
  120. ["spec"] = {
  121. ["multi"] = {
  122. },
  123. },
  124. ["class"] = {
  125. ["multi"] = {
  126. },
  127. },
  128. ["size"] = {
  129. ["multi"] = {
  130. },
  131. },
  132. },
  133. ["color"] = {
  134. [1] = 1,
  135. [2] = 1,
  136. [3] = 1,
  137. [4] = 1,
  138. },
  139. ["fontSize"] = 14,
  140. ["selfPoint"] = "CENTER",
  141. ["fixedWidth"] = 200,
  142. ["shadowXOffset"] = 1,
  143. ["wordWrap"] = "WordWrap",
  144. ["cooldownEdge"] = false,
  145. ["preferToUpdate"] = false,
  146. ["regionType"] = "text",
  147. ["uid"] = "6aWEt)Vqup8",
  148. ["desaturate"] = false,
  149. ["anchorFrameType"] = "SCREEN",
  150. ["alpha"] = 1,
  151. ["cooldownTextDisabled"] = false,
  152. ["justify"] = "LEFT",
  153. ["zoom"] = 0,
  154. ["auto"] = true,
  155. ["tocversion"] = 11304,
  156. ["id"] = "WSG Flag Carrier Names",
  157. ["conditions"] = {
  158. },
  159. ["frameStrata"] = 1,
  160. ["width"] = 64,
  161. ["automaticWidth"] = "Auto",
  162. ["config"] = {
  163. ["AnnounceLowEFCHP"] = true,
  164. },
  165. ["inverse"] = false,
  166. ["authorOptions"] = {
  167. [1] = {
  168. ["type"] = "toggle",
  169. ["key"] = "AnnounceLowEFCHP",
  170. ["desc"] = "Announce when EFC reaches low HP in BG Chat",
  171. ["default"] = true,
  172. ["useDesc"] = true,
  173. ["name"] = "Announce Low EFC HP",
  174. ["width"] = 1,
  175. },
  176. },
  177. ["shadowColor"] = {
  178. [1] = 0,
  179. [2] = 0,
  180. [3] = 0,
  181. [4] = 1,
  182. },
  183. ["displayIcon"] = 136155,
  184. ["information"] = {
  185. ["ignoreOptionsEventErrors"] = true,
  186. },
  187. ["shadowYOffset"] = -1,
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement