{ ["outline"] = true, ["xOffset"] = -287.23095703125, ["displayText"] = "Hello %c\n", ["customText"] = "function()\n \n local nameFocusedChaos = GetSpellInfo(185014)\n local nameShackledTorment = GetSpellInfo(184931)\n \n local f = WeakAuras[\"regions\"][aura_env.id][\"region\"]\n f:SetWidth(max(f:GetWidth(), f:GetHeight()))\n f:SetHeight(f:GetWidth())\n local scale = f:GetWidth()/100\n \n f.bg = f.bg or f:CreateTexture(nil, \"BACKGROUND\", nil, 0)\n f.bg:SetTexture(\"Interface\\\\AddOns\\\\WeakAuras\\\\Media\\\\Textures\\\\Circle_White_Border\")\n f.bg:SetAllPoints(f)\n f.bg:SetVertexColor(.3, .3, .3, .7)\n \n f.player = f.player or f:CreateTexture(nil, \"BACKGROUND\", nil, 4)\n f.player:SetTexture(\"Interface\\\\Addons\\\\WeakAuras\\\\PowerAurasMedia\\\\Auras\\\\Aura118\")\n f.player:SetPoint(\"CENTER\", f, \"CENTER\", 0, 0)\n f.player:SetWidth(10*scale)\n f.player:SetHeight(10*scale)\n \n f.players = f.players or {}\n f.lines = f.lines or {}\n for i=1,20 do\n f.lines[i] = f.lines[i] or f:CreateTexture(nil,\"BACKGROUND\", nil, 2)\n f.lines[i]:SetTexture(\"Interface\\\\AddOns\\\\WeakAuras\\\\Media\\\\Textures\\\\Square_White\")\n f.lines[i]:SetVertexColor(0,1,0,1)\n f.lines[i]:Hide() \n \n f.players[i] = f.players[i] or f:CreateTexture(nil, \"BACKGROUND\", nil, 3)\n f.players[i]:SetTexture(\"Interface\\\\AddOns\\\\WeakAuras\\\\Media\\\\Textures\\\\Circle_Smooth_Border\")\n f.players[i]:SetWidth(4*scale)\n f.players[i]:SetHeight(4*scale)\n f.players[i]:Hide()\n \n end\n \n f.shackles = f.shackles or {}\n f.shackletext = f.shackletext or {}\n \n for i=1,3 do\n f.shackles[i] = f.shackles[i] or f:CreateTexture(nil, \"BACKGROUND\", nil, 2)\n f.shackles[i]:SetTexture(\"Interface\\\\AddOns\\\\WeakAuras\\\\Media\\\\Textures\\\\Circle_White\")\n f.shackles[i]:SetVertexColor(0,0,0.7,.5)\n f.shackles[i]:Hide()\n \n f.shackletext[i] = f.shackletext[i] or f:CreateFontString(nil, \"BACKGROUND\")\n f.shackletext[i]:SetFont(\"Fonts\\\\FRIZQT__.TTF\", 6*scale, \"OUTLINE\")\n f.shackletext[i]:Hide()\n end\n \n f.shackleself = f.shackleself or f:CreateTexture(nil, \"BACKGROUND\", nil, 1)\n f.shackleself:SetTexture(\"Interface\\\\AddOns\\\\WeakAuras\\\\Media\\\\Textures\\\\Circle_White\")\n f.shackleself:SetVertexColor(0,0,0.7,.5)\n f.shackleself:Hide()\n \n \n local zoom = 1\n \n \n --[[\n f.sa = f.sa or f:CreateFontString(nil, \"BACKGROUND\")\n f.sa:SetFont(\"Fonts\\\\FRIZQT__.TTF\", 6*scale, \"OUTLINE\");\n \n f.sb = f.sb or f:CreateFontString(nil, \"BACKGROUND\") \n f.sb:SetFont(\"Fonts\\\\FRIZQT__.TTF\", 6*scale, \"OUTLINE\")\n ]]\n \n \n for i=1,20 do\n \n local ax, ay, bx, by, da, db\n local px, py = UnitPosition(\"player\")\n \n \n if UnitDebuff(\"raid\"..i, nameFocusedChaos) then\n \n local focused = UnitName(\"raid\"..i)\n local wrought = UnitName(select(8, UnitDebuff(\"raid\"..i, nameFocusedChaos)))\n \n if focused then\n ax, ay = UnitPosition(focused)\n da = ((px-ax)^2+(py-ay)^2)^(1/2)\n if da == 0 then zoom = zoom or 1 else zoom = min(2, 1/(da/50), zoom) end\n end\n \n if wrought then\n bx, by = UnitPosition(wrought)\n db = ((px-bx)^2+(py-by)^2)^(1/2)\n if db == 0 then zoom = min(2, zoom) else zoom = min(2, zoom, 1/(db/50), zoom) end\n end\n end\n \n \n if UnitDebuff(\"raid\"..i, nameShackledTorment) then\n local name = UnitName(\"raid\"..i)\n if not aura_env.shackles[name] then\n print(\"WA Chaos Error (1): \" .. name .. \" has Shackles, but no Coords stored!\")\n \n else\n \n local ax, ay = aura_env.shackles[name].x, aura_env.shackles[name].y\n local da = ((px-ax)^2+(py-ay)^2)^(1/2) + 26\n if da == 0 then zoom = zoom or 1 else zoom = min(2, 1/(da/50), zoom) end\n end\n end\n end\n \n \n \n local lineidx = 0\n for i=1,20 do\n \n local ax, ay, bx, by, da, db\n local px, py = UnitPosition(\"player\")\n \n \n if UnitDebuff(\"raid\"..i, nameFocusedChaos) then\n lineidx = lineidx + 1\n \n local focused = UnitName(\"raid\"..i)\n local wrought = UnitName(select(8, UnitDebuff(\"raid\"..i, nameFocusedChaos)))\n \n if focused then\n ax, ay = UnitPosition(focused)\n da = ((px-ax)^2+(py-ay)^2)^(1/2)\n end\n \n if wrought then\n bx, by = UnitPosition(wrought)\n db = ((px-bx)^2+(py-by)^2)^(1/2)\n end\n \n --[[\n if focused then \n local colors = RAID_CLASS_COLORS[select(2, UnitClass(focused))]\n f.sa:SetVertexColor(colors.r, colors.g, colors.b, 1)\n local radian = math.atan2((py - ay), (px - ax)) - GetPlayerFacing()\n local ox = scale * zoom * da * math.cos(radian) \n local oy = scale * zoom * da * math.sin(radian) \n f.sa:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n f.sa:SetText(skull..focused)\n f.sa:Show()\n else\n f.sa:Hide()\n f.line:Hide()\n end\n \n \n if wrought then\n local colors = RAID_CLASS_COLORS[select(2, UnitClass(wrought))]\n f.sb:SetVertexColor(colors.r, colors.g, colors.b, 1)\n local radian = math.atan2((py - by), (px - bx)) - GetPlayerFacing()\n local ox = scale * zoom * db * math.cos(radian) \n local oy = scale * zoom * db * math.sin(radian) \n f.sb:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n f.sb:SetText(cross..wrought)\n f.sb:Show()\n else\n f.sb:Hide()\n f.line:Hide()\n end\n ]]\n \n if focused and wrought and (ax~=bx or ay~=by) then\n --extend line beyond focused\n do\n local x1 = (px-ax)*(zoom/2)\n local x2 = (px-bx)*(zoom/2)\n local y1 = (py-ay)*(zoom/2)\n local y2 = (py-by)*(zoom/2)\n local dx = x2-x1\n local dy = y2-y1\n local dr = math.sqrt(dx^2 + dy^2)\n --local dr = max(80, math.sqrt(dx^2 + dy^2))\n local D = x1*y2 - x2*y1\n \n local t = ((25)^2) * dr^2 - D^2\n if t >= 0 then\n local x1 = ( D*dy - dx*math.sqrt(t))/dr^2\n local y1 = (-D*dx - dy*math.sqrt(t))/dr^2\n ax= (px-(x1/(zoom/2)))\n ay= (py-(y1/(zoom/2)))\n end\n end\n \n --color\n local u = ((px-ax)*(bx-ax) + (py-ay)*(by-ay)) / ((bx-ax)^2 + (by-ay)^2)\n local pdist = 10\n \n --[[if u < 0 then\n cx = ax\n cy = ay\n end\n if u > 1 then\n cx = bx\n cy = by\n end--]] \n \n if u <= 1 then\n local cx = ax + u*(bx-ax)\n local cy = ay + u*(by-ay) \n pdist = sqrt((px-cx)^2+(py-cy)^2)\n end\n \n if focused == UnitName(\"player\") or wrought == UnitName(\"player\") then\n f.lines[lineidx]:SetVertexColor(0,1,1,1)\n elseif (pdist < 2.1 or (da == 0 and u == 1/0)) then\n f.lines[lineidx]:SetVertexColor(1,0,0,1)\n f.bg:SetVertexColor(.5, .3, .3, .7)\n if GetTime() > (aura_env.lastWarn or 0) + 1 then\n aura_env.lastWarn = GetTime() \n PlaySoundFile(WeakAuras.PowerAurasSoundPath..\"sonar.ogg\", \"master\")\n end\n --[[\n if not aura_env.warned then\n PlaySoundFile(WeakAuras.PowerAurasSoundPath..\"sonar.ogg\", \"master\")\n aura_env.warned = true\n end\n ]]\n --else\n -- f.lines[i]:SetVertexColor(0,1,0,1)\n --aura_env.warned = nil\n end\n \n --f.height = f.height or {}\n --f.width = f.width or {}\n \n local height = scale * zoom * 3\n local width = scale * zoom * ((ax-bx)^2 + (ay-by)^2)^(0.5)\n \n \n \n \n \n if width == 0 then\n f.lines[lineidx]:Hide()\n else \n --translate\n local mx, my = (ax+bx)/2, (ay+by)/2\n local radian = math.atan2((py - my), (px - mx)) - GetPlayerFacing()\n local dm = ((px-mx)^2+(py-my)^2)^(1/2)\n local ox = scale * zoom * dm * math.cos(radian) \n local oy = scale * zoom * dm * math.sin(radian) \n f.lines[lineidx]:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n \n --rotation angle\n local radian = math.atan2((ax - bx), (ay - by)) + GetPlayerFacing()\n radian = radian % (2 * math.pi)\n local angle = radian % (math.pi / 2)\n \n local left, top, right, bottom = 0, 0, 1, 1\n \n local dy = width * math.cos(angle) * math.sin(angle) * (bottom-top) / height\n local dx = height * math.cos(angle) * math.sin(angle) * (right - left) / width\n local ox = math.cos(angle) * math.cos(angle) * (right-left)\n local oy = math.cos(angle) * math.cos(angle) * (bottom-top)\n \n local newWidth = width*math.cos(angle) + height*math.sin(angle)\n local newHeight = width*math.sin(angle) + height*math.cos(angle)\n \n local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy\n \n if radian < math.pi / 2 then -- 0 ~ 90\n ULx = left - dx ULy = bottom - oy\n LLx = right - ox LLy = bottom + dy\n URx = left + ox URy = top - dy\n LRx = right + dx LRy = top + oy\n elseif radian < math.pi then -- 90 ~ 180\n URx = left - dx URy = bottom - oy\n ULx = right - ox ULy = bottom + dy\n LRx = left + ox LRy = top - dy\n LLx = right + dx LLy = top + oy\n newHeight, newWidth = newWidth, newHeight\n elseif radian < 3 * math.pi / 2 then -- 180 ~ 270\n LRx = left - dx LRy = bottom - oy\n URx = right - ox URy = bottom + dy\n LLx = left + ox LLy = top - dy\n ULx = right + dx ULy = top + oy\n else -- 270 ~ 360 \n LLx = left - dx LLy = bottom - oy\n LRx = right - ox LRy = bottom + dy\n ULx = left + ox ULy = top - dy\n URx = right + dx URy = top + oy\n newHeight, newWidth = newWidth, newHeight\n end\n \n f.lines[lineidx]:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy)\n f.lines[lineidx]:SetWidth(newWidth)\n f.lines[lineidx]:SetHeight(newHeight)\n f.lines[lineidx]:Show()\n end\n end\n end\n end\n \n \n local i = 0 \n local px, py = UnitPosition(\"player\")\n \n for j = 1,20 do\n if UnitExists(\"raid\"..j) and not UnitIsDead(\"raid\"..j) and UnitName(\"raid\"..j) ~= UnitName(\"player\") then\n \n local ax, ay = UnitPosition(\"raid\"..j)\n local da = ((px-ax)^2+(py-ay)^2)^(1/2)\n \n if da < 48 / zoom then\n local radian = math.atan2((py - ay), (px - ax)) - GetPlayerFacing()\n local ox = scale * zoom * da * math.cos(radian) \n local oy = scale * zoom * da * math.sin(radian) \n local colors = RAID_CLASS_COLORS[select(2, UnitClass(\"raid\"..j))]\n \n f.players[j]:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n f.players[j]:SetVertexColor(colors.r, colors.g, colors.b, 1)\n f.players[j]:Show()\n end\n end\n \n \n if UnitExists(\"raid\"..j) and UnitDebuff(\"raid\"..j, nameShackledTorment) then\n i = i + 1\n local name = UnitName(\"raid\"..j)\n \n \n if not aura_env.shackles[name] then\n print(\"WA Chaos Error (2): \" .. name .. \" has Shackles, but no Coords stored!\")\n else\n \n local ax, ay = aura_env.shackles[name].x, aura_env.shackles[name].y\n \n local da = ((px-ax)^2+(py-ay)^2)^(1/2)\n local radian = math.atan2((py - ay), (px - ax)) - GetPlayerFacing()\n local ox = scale * zoom * da * math.cos(radian) \n local oy = scale * zoom * da * math.sin(radian) \n f.shackles[i]:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n f.shackletext[i]:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n \n f.shackles[i]:SetWidth(51*scale*zoom)\n f.shackles[i]:SetHeight(51*scale*zoom)\n \n f.shackletext[i]:SetVertexColor(1,1,1,.7)\n if name == UnitName(\"player\") then\n f.shackles[i]:SetVertexColor(0,0,.7,.5)\n f.shackletext[i]:SetVertexColor(1,0,0,1)\n f.shackleself:SetVertexColor(.7, 0, .7, .5)\n f.shackleself:SetPoint(\"CENTER\", f, \"CENTER\", oy, -ox)\n \n f.shackleself:SetWidth(61*scale*zoom)\n f.shackleself:SetHeight(61*scale*zoom)\n f.shackleself:Show()\n elseif da < 25.5 then\n f.shackles[i]:SetVertexColor(.7,0,0,.5)\n else\n f.shackles[i]:SetVertexColor(0,0.7,0,.5)\n end\n \n local count = 0\n local count2 = 0\n for k=1, 20 do\n local x, y = UnitPosition(\"raid\"..k)\n if not UnitIsDead(\"raid\"..k) and ((x-ax)^2 + (y-ay)^2)^(1/2) < 25.5 then\n if UnitDebuff(\"raid\"..k, nameShackledTorment) then\n count2 = count2 + 1\n else \n count = count + 1\n end\n end\n end\n \n \n --f.shackletext[i]:SetText(count .. \"/\" .. count2)\n f.shackletext[i]:SetText(count)\n f.shackletext[i]:Show()\n f.shackles[i]:Show()\n end\n end\n \n end\n \n return \"\"\nend", ["untrigger"] = { ["custom"] = "\n\n", }, ["anchorPoint"] = "CENTER", ["activeTriggerMode"] = 0, ["customTextUpdate"] = "update", ["actions"] = { ["start"] = { ["custom"] = "aura_env.focused = nil\naura_env.wrought = nil", ["do_custom"] = false, ["do_sound"] = false, }, ["finish"] = { ["message"] = "", ["custom"] = "aura_env.focused = nil\naura_env.wrought = nil\n\nprint(\"Hide\")", ["do_sound"] = false, ["sound"] = " custom", ["do_custom"] = false, ["do_message"] = false, }, ["init"] = { ["do_custom"] = false, ["custom"] = "", }, }, ["fontFlags"] = "OUTLINE", ["animation"] = { ["start"] = { ["duration_type"] = "seconds", ["type"] = "none", }, ["main"] = { ["translateType"] = "custom", ["duration"] = "100", ["alphaType"] = "straight", ["colorA"] = 1, ["colorG"] = 1, ["alphaFunc"] = " return function(progress, start, delta)\n return start + (progress * delta)\n end\n ", ["use_translate"] = true, ["use_alpha"] = false, ["type"] = "none", ["translateFunc"] = "return function(progress, startX, startY, deltaX, deltaY)\n --Hello World\n return startX + (progress * deltaX), startY + (progress * deltaY)\nend\n\n\n", ["scaley"] = 1, ["alpha"] = 0, ["y"] = 0, ["x"] = 0, ["duration_type"] = "seconds", ["colorB"] = 1, ["rotate"] = 0, ["colorR"] = 1, ["scalex"] = 1, }, ["finish"] = { ["type"] = "none", ["duration_type"] = "seconds", ["use_translate"] = false, ["translateType"] = "circle", }, }, ["trigger"] = { ["type"] = "custom", ["debuffType"] = "HELPFUL", ["unevent"] = "auto", ["subeventPrefix"] = "SPELL", ["duration"] = "30", ["event"] = "Health", ["use_unit"] = true, ["subeventSuffix"] = "_CAST_START", ["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START", ["spellIds"] = { }, ["unit"] = "player", ["custom"] = "function(event, ...)\n local timeStamp, subevent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellId, spellName, spellSchool, extraSpellID, extraSpellName, extraSchool = ...\n \n if event == \"ENCOUNTER_START\" then\n aura_env.shackles = {} \n end\n \n \n if subevent == \"SPELL_CAST_SUCCESS\" and (spellName == \"Wrought Chaos\" or spellName == \"Chaos créé\") then\n return true\n end\n \n \n if spellName == \"Shackled Torment\" or spellName == \"Tourment enchaîné\" then\n \n if subevent == \"SPELL_AURA_APPLIED\" then\n \n local x, y = UnitPosition(destName)\n \n --table.insert(aura_env.shackles, {[\"name\"]=destName, [\"x\"]=x, [\"y\"]=y})\n aura_env.shackles[destName] = {[\"x\"]=x, [\"y\"]=y}\n \n \n \n return true\n end\n \n end \n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", ["names"] = { [1] = "Mark of the Wild", }, ["custom_type"] = "event", ["custom_hide"] = "timed", }, ["desc"] = "pottm 07-24", ["rotation"] = 0, ["font"] = "Friz Quadrata TT", ["height"] = 240.76733398438, ["rotate"] = true, ["load"] = { ["use_never"] = false, ["talent"] = { ["multi"] = { }, }, ["encounterid"] = "1799", ["spec"] = { ["multi"] = { }, }, ["use_zone"] = false, ["use_encounterid"] = false, ["difficulty"] = { ["multi"] = { ["normal"] = true, ["challenge"] = true, ["heroic"] = true, ["lfr"] = true, ["none"] = true, }, }, ["role"] = { ["multi"] = { }, }, ["class"] = { ["multi"] = { }, }, ["pvptalent"] = { ["multi"] = { }, }, ["zone"] = "", ["faction"] = { ["multi"] = { }, }, ["race"] = { ["multi"] = { }, }, ["size"] = { ["multi"] = { }, }, }, ["fontSize"] = 11, ["displayStacks"] = "%c", ["mirror"] = false, ["selfPoint"] = "CENTER", ["regionType"] = "icon", ["cooldown"] = false, ["blendMode"] = "BLEND", ["icon"] = true, ["desaturate"] = true, ["init_completed"] = 1, ["auto"] = false, ["texture"] = " ", ["stacksContainment"] = "INSIDE", ["zoom"] = 0, ["justify"] = "LEFT", ["inverse"] = false, ["additional_triggers"] = { }, ["stickyDuration"] = false, ["frameStrata"] = 1, ["width"] = 240.76754760742, ["color"] = { [1] = 0.61960784313726, [2] = 0.61176470588235, [3] = 0.63921568627451, [4] = 0, }, ["yOffset"] = 163.36126708984, ["numTriggers"] = 1, ["id"] = "HFC : Archimonde Mythic Radar", ["discrete_rotation"] = 0, ["displayIcon"] = "Interface\\Icons\\Spell_Fire_FelFlameRing", ["stacksPoint"] = "CENTER", ["textColor"] = { [1] = 0.68627450980392, [2] = 0.68627450980392, [3] = 0.68627450980392, [4] = 0.58433663845062, }, }