### Full Custom Variable Configuration Example Source: https://github.com/nom0re/weakauras-wotlk/wiki/Trigger-State-Updater-(TSU) A comprehensive example demonstrating mixed variable types, select dropdowns, and custom test functions with event triggers. ```LUA { additionalProgress = 1, expirationTime = true, stacks = true, unit = "string", var3 = { display = "colour", type = "select", values = { [1] = "red", [2] = "blue", [3] = "green", } }, spellUsable = { display = "Spell Usable", type = "bool", test = function(state, needle) return state and (IsUsableSpell(state.spellname) == (needle == 1)) end, events = { "SPELL_UPDATE_USABLE", "PLAYER_TARGET_CHANGED", "UNIT_POWER_FREQUENT", }, }, } ``` -------------------------------- ### Install Luacheck via LuaRocks Source: https://github.com/nom0re/weakauras-wotlk/blob/master/AGENTS.md Install the Luacheck tool using the LuaRocks package manager. ```bash luarocks install luacheck ``` -------------------------------- ### Callback Registration Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibGetFrame-1.0/README.md Individual registration examples for library events. ```Lua -- Fired after a scan complete and cache refreshed LGF.RegisterCallback("MyAddonName", "GETFRAME_REFRESH", function(event) end) ``` ```Lua -- Fired when a frame is a new match for a unit (it does not test if it is the BEST match!) LGF.RegisterCallback("MyAddonName", "FRAME_UNIT_UPDATE", function(event, frame, unit) end) ``` ```Lua -- Fired when a frame is not a new match for a unit anymore LGF.RegisterCallback("MyAddonName", "FRAME_UNIT_REMOVED", function(event, frame, unit) end) ``` -------------------------------- ### API Assertion Example Source: https://github.com/nom0re/weakauras-wotlk/wiki/API-Documentation Example of using assert to handle failed API calls. ```lua assert(WeakAuras.RegisterDisplay()) -- assertation failed! "Addon must be a string value." ``` -------------------------------- ### Required Folder Layout Source: https://github.com/nom0re/weakauras-wotlk/wiki/WeakAuras-Companion The expected directory structure for the WeakAuras Companion to detect the game installation. ```text World of Warcraft/ ├── _retail_/Wow.exe └── Data/file.txt ``` -------------------------------- ### Verify Tool Installation and Run Linting Source: https://github.com/nom0re/weakauras-wotlk/blob/master/AGENTS.md Check for the existence of required binaries and execute the Luacheck linter. ```powershell cmd /c "where lua && where luarocks && where luacheck" cmd /c "luacheck . -q" ``` -------------------------------- ### Display Custom Options Example Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Options A compressed string representation of a custom option configuration for use in the addon. ```compressedstring !vE1AVTTnu0FlRddOfOjq(TZ(wAQZAlCvYcDB(MQPLOK5MePkfPtsXG)TVZLus2oTaRlPnMpV3Z9CFrNmizvcRkHLr)dd1oBPujsy38PvlFF8IewUwzzYVjsIhmmH1ikZVvlv2e2BUz1QB(yc7XBYZBe2KRpB(0jtgnz0O5thn9IOrJsYpB8eiyztDj)PvIhXT(T0ewQRXQRcZZDQuRuRE5R2)H9Rd)AewNrTF9lFXsTruTFTSUXHpY0LAZ(1ns7(18kH917xNQvnIulDbSwMSw2Kkvf7xlkL2Z3V(kdVbtC7xxjBLdw9ZYD8kh2a4kvy4qE5ctLqz9QrYRGO)QtItuPlfnwPy)6YawsDMg6Qos8VxzfMm6sciJkooRJNXH4a(WH4P4)4m9MqTrwrIvQOZ4sLBCneGiDSXv6pI2yHe2rwqhkSIYssPaUsLKd0PePpZ61zsnihhiGAVTFPqj4ksNcR0DGgD2aBSvOYmcJK4rATDUYANLtOTIxO4ejkK54uqy)jWXxDyRgDgzMyaVwkG4Bez9UgRuLkZCkBp)DeV2zevCRvsw9TgUObBcRbrbW6eACpRrcYWRlrbrRbIGgJDZnW9kll5ExtjPcUj1bPf78R65KV6iFQvuv7DvgYy2jTCitJZA8bbFki0glfHy2QvP0z5LKQj6lMxDGbic3dPD6sNTM3dRCHRqstLTHc4MmIrcMFqBbd88x8QFVXT5LdE9WieTts9dF)VjSN6sOgpDWSlMI0PlIgpEgsLc5tCv6wTPnl8QfXRwChYP0QCzbLcB1ffWbHHXdsEtcoJUMYWMNeh1nEaTx7yiXX4NUPtdxmo68HjXdtUEYWHZMfnBE0WztgmDmLupzCs8i)Hgt)TxddH6Ahod3nI25qU(NQZqSvcZ1(j3Hn4wz69Ym72e2Lyow1xnGqpdEgJfdOQeiQ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lu0nHDTr(n6XQ8mY(2VE1QUKTqcKVli93ttvqxCr29TLuJIO6BC)3hcpri1)vKOkHDTUtl5nnF3Qum7ZxelBefWEcmRV6oDu0UwSdvnH6hpKqqY)o ``` -------------------------------- ### ButtonGlow_Start Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibCustomGlow-1.0/README.md Starts a standard button glow effect over the specified frame. ```APIDOC ## ButtonGlow_Start(frame, color, frequency) ### Description Starts a button glow effect over the target frame. ### Parameters - **frame** (frame) - The target frame. - **color** (table) - {r,g,b,a} color and opacity. Default: {0.95, 0.95, 0.32, 1}. - **frequency** (number) - Frequency. Default: 0.125. ``` -------------------------------- ### AutoCastGlow_Start Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibCustomGlow-1.0/README.md Starts an AutoCast-style particle glow effect over the specified frame. ```APIDOC ## AutoCastGlow_Start(frame, color, N, frequency, scale, xOffset, yOffset, key) ### Description Starts an AutoCast particle glow effect over the target frame. ### Parameters - **frame** (frame) - The target frame. - **color** (table) - {r,g,b,a} color and opacity. Default: {0.95, 0.95, 0.32, 1}. - **N** (number) - Number of particle groups. Default: 4. - **frequency** (number) - Rotation frequency. Default: 0.125. - **scale** (number) - Scale of particles. - **xOffset, yOffset** (number) - Offset relative to region border. - **key** (string) - Unique key for the glow. ``` -------------------------------- ### PixelGlow_Start Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibCustomGlow-1.0/README.md Starts a pixel-style glow effect over the specified frame. ```APIDOC ## PixelGlow_Start(frame, color, N, frequency, length, th, xOffset, yOffset, border, key) ### Description Starts a pixel glow effect over the target frame with customizable parameters. ### Parameters - **frame** (frame) - The target frame to apply the glow. - **color** (table) - {r,g,b,a} color and opacity (0-1). Default: {0.95, 0.95, 0.32, 1}. - **N** (number) - Number of lines. Default: 8. - **frequency** (number) - Rotation frequency. Negative values reverse direction. Default: 0.25. - **length** (number) - Length of lines. - **th** (number) - Thickness of lines. Default: 2. - **xOffset, yOffset** (number) - Offset relative to region border. - **border** (boolean) - If true, creates a border under lines. - **key** (string) - Unique key to allow multiple glows on one frame. ``` -------------------------------- ### CLEU Event Filter Syntax Examples Source: https://github.com/nom0re/weakauras-wotlk/wiki/Deprecated-CLEU Examples of how to append subEvent filters to the CLEU event string using the colon separator. ```text -- these are EXAMPLES of how to do it CLEU:UNIT_DIED CLEU:SPELL_AURA_APPLIED:SPELL_AURA_APPLIED_DOSE:SPELL_AURA_REMOVED CLEU:SWING_DAMAGE:RANGE_DAMAGE:SPELL_DAMAGE ``` -------------------------------- ### Implement Event-based Custom Trigger Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Triggers Example of using ENCOUNTER_START and ENCOUNTER_END events to control trigger and untrigger states. ```lua --Event(s): ENCOUNTER_START, ENCOUNTER_END --Trigger function(event, arg1, arg2, ...) if event == "ENCOUNTER_START" then --Use the arguments for this event return true end end --Untrigger function(event, arg1, arg2, ...) if event == "ENCOUNTER_END" then --Use the arguments for this event, or dont, just untrigger. return true end end ``` -------------------------------- ### Glow Player Frame Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibGetFrame-1.0/README.md Example of applying a glow effect to the player's unit frame. ```Lua local LGF = LibStub("LibGetFrame-1.0") local LCG = LibStub("LibCustomGlow-1.0") local frame = LGF.GetUnitFrame("player") if frame then LCG.ButtonGlow_Start(frame) -- LCG.ButtonGlow_Stop(frame) end ``` -------------------------------- ### Action Button Glow Functions Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Methods to start and stop the default action button glow effect. ```APIDOC ## LCG.ButtonGlow_Start(frame, color, speed) ### Description Starts the default button glow animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame. - **color** (table) - Optional - {red,green,blue,alpha} (0-1). Default: {0.95, 0.95, 0.32, 1}. - **speed** (number) - Optional - Animation speed. Default: 0.125. ## LCG.ButtonGlow_Stop(frame) ### Description Stops the button glow animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame. ``` -------------------------------- ### Define Custom Sort State Dependencies Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Dynamic-Group Example of a custom sort function requiring a specific state key to be declared in the 'Run On' input box for performance optimization. ```lua WeakAuras.SortAscending{"region", "state", "myKey"} ``` -------------------------------- ### Basic Usage and Callbacks Source: https://github.com/nom0re/weakauras-wotlk/blob/master/WeakAuras/Libs/LibGetFrame-1.0/README.md Initialize the library and register callbacks to handle frame lifecycle events. ```Lua local LGF = LibStub("LibGetFrame-1.0") local frame = LGF.GetUnitFrame(unit , options) local callback = function(event, frame, unit) if event == "GETFRAME_REFRESH" then -- cache was refreshed end if event == "FRAME_UNIT_UPDATE" then -- 'frame' was updated and is now a match for 'unit' end if event == "FRAME_UNIT_REMOVED" then -- 'frame' was updated and is no longer a match for 'unit' end end LGF.RegisterCallback("MyAddonName", "GETFRAME_REFRESH", callback) LGF.RegisterCallback("MyAddonName", "FRAME_UNIT_UPDATE", callback) LGF.RegisterCallback("MyAddonName", "FRAME_UNIT_REMOVED", callback) ``` -------------------------------- ### Create Symbolic Links for Addons Source: https://github.com/nom0re/weakauras-wotlk/wiki/Lua-Dev-Environment Create a directory symbolic link to load the addon in the World of Warcraft interface folder. ```bash > mklink /d "path\to\World of Warcraft\_retail_\Interface\Addons\WeakAuras" "path\to\repository\WeakAuras" symbolic link created for WeakAuras <<===>> path\to\repositoy\WeakAuras ``` -------------------------------- ### Configure Symlink on Windows Source: https://github.com/nom0re/weakauras-wotlk/wiki/WeakAuras-Companion Commands to create the necessary directory structure and symbolic link on Windows using Command Prompt. ```cmd cd C:\ ``` ```cmd mkdir "World of Warcraft\Data" echo This is a test file. > "World of Warcraft\Data\file.txt" ``` ```cmd mklink /D "C:\World of Warcraft\_retail_" "C:\world of warcraft 3.3.5a" ``` ```cmd mklink /D "to_path" "from_path" ``` -------------------------------- ### Import Aura Data Source: https://github.com/nom0re/weakauras-wotlk/wiki/API-Documentation Prepares and imports aura data into the WeakAuras database. ```lua WeakAuras.Import(inData, [target], [callbackFunction]) ``` ```lua inData = { d = {...}, -- required: primary aura data c = { {...}, {...}, ...} -- optional: array of child aura data } ``` -------------------------------- ### Accessing the LibCustomGlow Library Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Initialize the library reference before calling any glow functions. ```lua local LCG = LibStub("LibCustomGlow-1.0") ``` -------------------------------- ### Autocast Shine Functions Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Methods to start and stop an autocast shine effect on a UI frame. ```APIDOC ## LCG.AutoCastGlow_Start(frame, color, numberOfParticleGroups, speed, scale, xOffset, yOffset, key) ### Description Starts an autocast shine animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame. - **color** (table) - Optional - {red,green,blue,alpha} (0-1). Default: {0.95, 0.95, 0.32, 1}. - **numberOfParticleGroups** (number) - Optional - Number of particle groups. Default: 4. - **speed** (number) - Optional - Animation speed. Default: 0.125. - **scale** (number) - Optional - Scale of particles. Default: 1. - **xOffset** (number) - Optional - Horizontal offset. - **yOffset** (number) - Optional - Vertical offset. - **key** (string/any) - Optional - Unique key for the glow instance. ## LCG.AutoCastGlow_Stop(frame, key) ### Description Stops an autocast shine animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame. - **key** (string/any) - Optional - The key used when starting the glow. ``` -------------------------------- ### Create a topic branch Source: https://github.com/nom0re/weakauras-wotlk/blob/master/CONTRIBUTING.md Initializes a new branch based on the main branch for feature development or bug fixes. ```bash git checkout -b my-topic-branch ``` -------------------------------- ### Pixel Glow Functions Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Methods to start and stop a pixel-style glow effect on a UI frame. ```APIDOC ## LCG.PixelGlow_Start(frame, color, numberOfLines, speed, length, thickness, xOffset, yOffset, border, key) ### Description Starts a pixel glow animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame to set glowing. - **color** (table) - Optional - {red,green,blue,alpha} (0-1). Default: {0.95, 0.95, 0.32, 1}. - **numberOfLines** (number) - Optional - Number of lines. Default: 8. - **speed** (number) - Optional - Animation speed. Default: 0.25. - **length** (number) - Optional - Length of lines in pixels. - **thickness** (number) - Optional - Thickness of lines in pixels. Default: 2. - **xOffset** (number) - Optional - Horizontal offset. - **yOffset** (number) - Optional - Vertical offset. - **border** (boolean) - Optional - Create border under lines. Default: true. - **key** (string/any) - Optional - Unique key for the glow instance. ## LCG.PixelGlow_Stop(frame, key) ### Description Stops a pixel glow animation on the specified frame. ### Parameters - **frame** (UI element) - Required - Target frame. - **key** (string/any) - Optional - The key used when starting the glow. ``` -------------------------------- ### Managing Pixel Glow Effects Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Start or stop a pixel-style glow effect on a specific frame. ```lua LCG.PixelGlow_Start(frame[, color[, numberOfLines[, speed[, length[, thickness[, xOffset[, yOffset[, border[ ,key]]]]]]]]]) ``` ```lua LCG.PixelGlow_Stop(frame[, key]) ``` -------------------------------- ### Feedback Display Source: https://github.com/nom0re/weakauras-wotlk/wiki/Aura-Examples Import string for general feedback or notification displays. ```text dGd(caGEcYUavEnaZeqAUGQMnr(eOOFrfLBRuTtQWEf7MQ2Vs(jG4Vq0VP0Gvy4sKdsqDzvoMQCCQOAHeilfq1IHKLdYdbfEkQLrQEUKEmqtLqtgQMUuxeuQdtYZu01PWgLWwjqTzv12buMMs50i(mK67ur2gughfnAQ04bLCsjQBbHRruNNa(gsggsDos58Iyys4Y((G(kWd(YGwFfEU0jjHKDv7kpsUvnbKDTGacxd)GBcNE49W4HXJyyybK)VEDkqqzo1WOL1E0tmt9jw(i2Kd3qe0OpOigg0O22DKUe8lCt2p8WgEsh(BbnQH9Q9RgX44fU4oCukqaPthUpy1bvyukiyyLSqrmoEPGsw2uZuxJEQrzs9KZhH8wCONcSnDtmmkk650CsHrLpc5T4yMc5TPg22tJw3eB(mPYhH8mDy8RcgMDTovxJ29wdVXoQdAnS)1O2kqa11W6xdHLGPcabAnWnU1OTRbaIKeXJEn42cTlr8ORRbXVgLCv1Bn0HBna(5Cdc0vxdbSgRrBxJsg9AiSemvaiqRH1Vgo7BbnQWf29iOD7uqrpXmP0XWWOnP3OPYhXMCyjRcpIHnQhYkrOlOcxjcDrm8UHutIy4(8rqHBNoFlWNaSlckD60H)wFZeHU449cdDOjwVOaLUWkdifkfuycO1JSsWVWaf2fIHj4HlUdhLceqybaY)xVofu00YYAZPUgT(7PtNpInSWorWB3uq9EZj2u(P9EAAtQ8rSzgwHJtAI1RKq2qe0OpOAeth2croFRAI1hwWWg4ILHHWanDyvedxChokfiGWL99b9vGh8LbT(k8CPtscj7Q2vEKCRAci7AbbKomWIJ3KwpDca ``` -------------------------------- ### Check nameplates in range Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-Snippets Example trigger function to count hostile nameplates within a specific distance. ```LUA function() if not aura_env.last or aura_env.last < GetTime() - 0.3 then aura_env.last = GetTime() local count = 0 for i = 1, 40 do local unit = "nameplate"..i if UnitCanAttack("player", unit) and WeakAuras.CheckRange(unit, 8, "<=") then count = count + 1 end end aura_env.count = count end return aura_env.count and aura_env.count >= 3 end ``` -------------------------------- ### WeakAuras.Import Source: https://github.com/nom0re/weakauras-wotlk/wiki/API-Documentation Prepares and processes aura data for import into the WeakAuras database. ```APIDOC ## WeakAuras.Import ### Description Prepares aura data to be imported into WeakAuras. This function processes the payload and opens a tooltip for the user to begin installation. ### Parameters - **inData** (table) - Required - Payload to be imported. Must be a table containing primary aura data (d) and optional child aura data (c). - **target** (table/string) - Optional - A table or UID existing in the database. If provided, the payload is processed as an update. - **callbackFunction** (function) - Optional - Function to be called on completion of the import process. Returns the ID of the Aura if successful. ### Return Values - Returns status (boolean/nil) and message (string). If status is true, the import was processed successfully. ``` -------------------------------- ### Arcane Storm WeakAura Import Source: https://github.com/nom0re/weakauras-wotlk/wiki/Aura-Examples Import string for the Arcane Storm visual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mQwGKwHYuLG1kuMc2YzzgSLZ03aatYmTFdrXVfhl(JyNlqV(cKhIweqTa5Q7TxiplpbluWwoRXQvlRXqDJJYPqQb(tgJ0OMtGKM2pdYvO2ycnnKaUeyuBmHMYyAjPrTXeAAuBmjXRSITiibUcL17OJYuLOBA5TmEgsTmzRGYXZqQL9pHQL30yzlTAnwECtvWGfN2zuwTdIz5nnwOOdrXASmfDikwgfEKiJSCwb4bL3sRwwjyKqRwMmNw1cKeXffBrqcmTcvlpeI)NgAHECDpWWVRNJPP57lC)goNYxSt1zHEmxtwtmpoCy6Wmz1RFdNt5rGiaxH(iPqpUjosGxnxt85969M0Vb33(WxFSwT8wQylcsGRq5T0QLvcgj0QLDgweNAHA6d2HjSPVvtFh3K1t)goULfbKzfkVPXsQazuJLtfiJYgfjJxDXkrYYVjOJHuRw2olJcpsKrwoRa8GSC)zrCQz5OedSwTp8vHYFGuzBQrF4UwEAPOfj3fIHA5Rjf()AYYf8Bk4SCiEa5Y3H4)PHwOEWom9sw9ojUWWEom73WXTmoqSaPWD0rzngQLjJQfiPvOmvjyTcLNGLXnvbd61wMc2YzzgSLZ03aatYmTFdrXVfhl(JyNlqV(cKhIweqTa5Q7TxiplpbluWwoRXQvltMtRAbsI4IITiibMwHQL3sfBrqcCfkVLwTSsWiHwTSITiibUcL17OJYuLOBA5TmEgsTmzRGYXZqQL9pHQL30yzlTAnwECtvWGfN2zuwTdIz5nnwOOdrXASmfDikwgfEKiJSCwb4bL3sRwwjyKqRw(IDQoluxZxhNeppVJdxp4eV(nCoL)aPw2ijva4ks5Hq8)0qluy4KZlS7RPh8Ql8Rx)goMLDgweNAHEGphF(8Ca7Z88Ucd3VHdCzrazwHYBASKkqg1y5ubYOSrrY4vxSsKS8Bc6yi1QLTZYOWJezKLZkapilxigQvRw(zF4W3As1wa ``` -------------------------------- ### Managing Autocast Shine Effects Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Start or stop an autocast-style particle shine effect on a specific frame. ```lua LCG.AutoCastGlow_Start(frame[, color[, numberOfParticleGroups[, speed[, scale[, xOffset[, yOffset[, key]]]]]]]) ``` ```lua LCG.AutoCastGlow_Stop(frame[, key]) ``` -------------------------------- ### Configure Symlink on macOS/Linux Source: https://github.com/nom0re/weakauras-wotlk/wiki/WeakAuras-Companion Commands to create the necessary directory structure and symbolic link on Unix-based systems using Terminal. ```bash cd ~/ ``` ```bash mkdir -p "World of Warcraft/Data" echo "This is a test file." > "World of Warcraft/Data/file.txt" ``` ```bash ln -s "/path/to/your/world of warcraft 3.3.5a" "World of Warcraft/_retail_" ``` ```bash ln -s "from_path" "to_path" ``` -------------------------------- ### Alpha Animation Function Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Animation-Functions Calculates the display alpha based on progress, starting alpha, and the delta value. ```lua function(progress, start, delta) return start + (progress * delta) end ``` -------------------------------- ### Create Git Worktrees Source: https://github.com/nom0re/weakauras-wotlk/wiki/Lua-Dev-Environment Use git worktree to manage separate directories for Retail and Classic development within the same repository. ```bash # in your WeakAuras repository: git worktree add ../WeakAuras-classic ``` -------------------------------- ### Define Icon Info with Texture Path Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Code-Blocks Returns a direct file path to a texture asset. ```LUA function() return "Interface\\TargetingFrame\\UI-RaidTargetingIcon_1" end ``` -------------------------------- ### Get spell power cost Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-Snippets Custom function to retrieve the cost of a spell for a specific power type. ```LUA aura_env.GetCost = function(spellID, powerType) if not spellID then return end powerType = powerType or UnitPowerType("player") local cost = 0 local costTable = GetSpellPowerCost(spellID); for _, costInfo in pairs(costTable) do if costInfo.type == powerType then return costInfo.cost; end end end ``` ```Lua aura_env.GetCost(spellID [, powerType]) ``` -------------------------------- ### Clone the WeakAuras Repository Source: https://github.com/nom0re/weakauras-wotlk/wiki/Lua-Dev-Environment Use this command to clone the repository to your local machine. ```bash git clone https://github.com/NoM0Re/WeakAuras-WotLK.git ``` -------------------------------- ### Managing Action Button Glow Effects Source: https://github.com/nom0re/weakauras-wotlk/wiki/Useful-variables-and-functions-within-WeakAuras Start or stop the default action button style glow on a specific frame. ```lua LCG.ButtonGlow_Start(frame[, color[, speed]]]) ``` ```lua LCG.ButtonGlow_Stop(frame) ``` -------------------------------- ### Dark Sludge WeakAura Import Source: https://github.com/nom0re/weakauras-wotlk/wiki/Aura-Examples Import string for the Dark Sludge visual indicator. ```text dWtjdaGEOGDbvSnLWmHQAUquMTcNgvFcIOhRsDBvLdt0orP2R0Ujz)Q4NqPggv8BrEofdLuPbRudNuoiuPxtPCmvY5GQSquILcfAXuQwoHhcr1trwgkADqKAIQstvjnzfnDHlsQYvHi5YGRtvBujACOK2mK2UQQpcryAq4ZuPVtQQrcf5zuIrlknEkPtcf1TGsUMO48IQ)IcFtvCtsf3RUw6R0S0SRLSInkQbIYglMzkfG1WlGsRG1WladYinymW9o4)YGNuy)dIHm3GmYpNGIXBk9vkhBuudeD5JJLfS(K5IjE4HNJLNffflezkjv8pzWtQUw6tYvDTuKRbL0eGbIsAcWarjn)WanAukeCxxq01srUguc(bvuY4Td)Gkipkk3AjgV4QdUiHELMEHm4jvjhCEkb)GkkH80NDzC24NClnb7Eu01CnOeMWfJ6SePWVK3ammAWyWw(bLLsk5hy6AzFv6vkSD20WpDHgLmE7WpOcDfak3Ajsx9WhFg6QhgXm2Vyg5L8gGXemHxXJYsjVc(bvuk4FWS0emHxXJsAdzoikz0GXGT8dk9kf2oBA4NUqJstWCxAzsC2ycej(9zRJCKeCPnK(SF5gTHm3C2YZEifUWzlhGioB9Zck4heNDEYJKc4SnHun5k3ZMRoB5zRLsJZoHE2VsHTZMg(PlGtj95ZiBxUW5I5IRhMSI4AXZ1dIIIfclLePqg8KQSzfrPj3ClGayisHm4jvzZ8XPeFw6vkSD20WpDHszbUB2OlZW0XXccNhhNm4D5KbrrXcbIsIuidO2lnsYzxln5OO8B)iYlLfej(DjVbyGHKcklLWqsbLyziVTPpx5E2VG5gurjVbym5OO8B)iYR9gLeGlpPwZ1Gsbyn8cOrjtPlCSGdZs)L9LfhMnAb ``` -------------------------------- ### Translate Animation Function Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Animation-Functions Calculates the display's X and Y coordinates based on progress, starting position, and offset deltas. ```lua function(progress, startX, startY, deltaX, deltaY) return startX + (progress * deltaX), startY + (progress * deltaY) end ``` -------------------------------- ### Configure Git settings Source: https://github.com/nom0re/weakauras-wotlk/blob/master/CONTRIBUTING.md Sets global or local repository configuration for line endings and rebase behavior. ```bash git config core.autocrlf true ``` ```bash git config pull.rebase true ``` -------------------------------- ### Implement a Linear Color Animation Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Animation-Functions Calculates the RGBA color values linearly based on progress between a start color and an end color. ```lua function(progress, r1, g1, b1, a1, r2, g2, b2, a2) return r1 + (progress * (r2 - r1)), g1 + (progress * (g2 - g1)), b1 + (progress * (b2 - b1)), a1 + (progress * (a2 - a1)) end ``` -------------------------------- ### Update states using helper methods Source: https://github.com/nom0re/weakauras-wotlk/wiki/Trigger-State-Updater-(TSU) Demonstrates using the states helper methods to update or remove states without needing to return true. ```lua function(states, event, ...) local currentEssence = UnitPower("player", Enum.PowerType.Essence) local maxEssence = UnitPowerMax("player", Enum.PowerType.Essence) for i = 1, 6 do if i > maxEssence then states:Remove(i) -- wipes states that are no longer needed else local value = currentEssence >= i and 1 or 0 local newState = { progressType = "static", value = value, total = 1 } states:Update(i, newState) end end -- no need to return true end ``` -------------------------------- ### Implement Custom Duration Info for Static Progress Source: https://github.com/nom0re/weakauras-wotlk/wiki/Dynamic-Information Returns current value, max value, and a boolean flag to enable static progress mode. ```lua function() --Value Based local current = UnitHealth("player") local max = UnitHealthMax("player") return current, max, true end ``` -------------------------------- ### Implement a linear color transition animation Source: https://github.com/nom0re/weakauras-wotlk/wiki/Custom-Code-Blocks Calculates the RGBA color values at a specific progress point. Note that WoW uses 0-1 float values for colors. ```lua function(progress, r1, g1, b1, a1, r2, g2, b2, a2) return r1 + (progress * (r2 - r1)), g1 + (progress * (g2 - g1)), b1 + (progress * (b2 - b1)), a1 + (progress * (a2 - a1)) end ``` -------------------------------- ### Configure PATH for LuaRocks on Windows Source: https://github.com/nom0re/weakauras-wotlk/blob/master/AGENTS.md Temporarily add the LuaRocks binary directory to the PATH environment variable for the current session. ```powershell $env:PATH = "$env:APPDATA\luarocks\bin;$env:PATH" ```