|Simple Scroll Frame
||Thanks to Xchg of Silvermoon for this code.
||Mon, 08 Jul 2013 01:07:25 by yksrep
||Create a frame in middle of the screen with all class icons that can be clicked to print "LOL <CLASS>" in guildchat.
||Sun, 27 Jan 2013 09:10:26 by Mikma
|Getting the stack size of an item under the tooltip
||These two functions will return (in StackSize) the size of the stack the mouse is currently hovering over. They work for the main bags, bags in the bank and item slots in the bank.
There are other functionhooks that will take care of items in the ...
||Sun, 04 Mar 2012 12:34:36 by Philburt
|Label Checkbuttons in XML
||Sometimes it's useful to create a Checkbutton entirely in XML. Unfortunately, setting a Checkbutton's label is quirky. As noted in the book, you must access the Checkbutton's internal FontString, like so:
_G:SetText("my label here")
So how to...
||Sat, 26 Mar 2011 17:55:48 by protasm
|Fading Text Frame
||This code will create a frame that can show text in the middle of the players screen. It will hold this text for 3 seconds and then fade it out. This is very similar to the code that blizzard uses for zone changing.
||Tue, 08 Feb 2011 23:34:31 by l3gsh0t
|Convert decimal classcolor into hex
||Here's a small function that will convert player classcolor from decimal into hex and prints it in the chat with format "playername, level XX class".
||Sun, 24 Oct 2010 08:02:34 by Mikma
|Run a calculation in the background using coroutines
||If you have a calculation that runs for a long period of time, locking the WoW client while it runs, you can use coroutines. The following code shows an example of this technique.
||Sat, 25 Sep 2010 19:23:35 by jnwhiteh
|Create a StatusBar
||Here's a quick way of creating a StatusBar that doesn't tile the texture. Positions it in the center of the UIParent.
||Sat, 26 Jun 2010 08:43:48 by Mikma
|Change the alpha on a frame/subframes in response to mouse
||This snippet will change the alpha of a frame (and all of it's sub-children due to the way alpha works) depending on whether or not the mouse is over the frame or not. See for a more in-depth discussion of this problem and solution.
||Sat, 05 Jun 2010 17:26:56 by jnwhiteh
|Cache GetSpellInfo calls
||This code caches all non-nil return values from GetSpellInfo in a table to improve performance. Add this at the start of your file (before any GSI calls)
||Mon, 03 May 2010 15:25:28 by stolenlegacy
|WoW Font Preview with dynamic scroll frames
||This snippet creates a scroll frame in the center of your screen that displays all of the globally named font instances in your World of Warcraft installation. It also shows how to create a scroll frame and slider scroll bar dynamically. The follow...
||Fri, 23 Apr 2010 16:39:27 by jnwhiteh
|Force the target's health text to stay shown
||Prevents the target health text of the default blizzard unit frames from being hidden.
||Sun, 18 Apr 2010 14:36:14 by stolenlegacy
||Ein einfacher Button zum ausführen eines Emotes.
||Sat, 06 Feb 2010 22:30:49 by Pwnees
|Simple Localization with Metatables
||This snippet shows a very easy way to create localization tables for your addons.
Thanks to Tekkub for this trick.
||Wed, 12 Aug 2009 01:29:49 by PProvost
|Check if the player is on a flying mount
||This snippet will check if the player is currently on a flying mount. It works better (for me) then IsFlying() because that will return false if you are on a flying mount but not in the air.
||Sun, 05 Jul 2009 18:56:17 by Industrial
|Scan a tooltip
||This piece of code lets you scan a tooltip.
||Sun, 05 Jul 2009 17:58:08 by Industrial
|Add equipment sets to tooltip
||This snippet will add a line to the tooltip of all equippable items, telling you whether or not they are a part of an equipment set.
||Tue, 26 May 2009 19:45:53 by jnwhiteh
|Detect enemy units in combat log entries
||This function will return the enemy (if any) from a combat log event.
||Sun, 17 May 2009 12:06:12 by jnwhiteh
||This one prints when CD of used spells end.
||Sun, 03 May 2009 15:50:03 by Mikma
|Create a dialog-themed window for text
||This snippet creates a dialog-themed window that you can use to display some text
||Thu, 30 Apr 2009 11:14:18 by jnwhiteh
|Create UI-styled dropdown menu
||This snippet creates a very simple dropdown selection box in the center of the screen.
||Wed, 29 Apr 2009 17:48:43 by jnwhiteh
|Add lines to item tooltip safely
||Adding lines to an item tooltip is rather tricky, especially when you get into recipes and other items that behave odd. The below code snippet allows you to add lines while ensuring they are only added once.
||Mon, 27 Apr 2009 10:50:34 by jnwhiteh
|Warlock shard dropper
||This code will delete extra Soul Shards from all of your bags and keeps 4 when you start channelling Drain Soul.
||Mon, 27 Apr 2009 10:49:43 by Mikma
|UTF-8 aware string.sub
||The built-in Lua function string.sub() does not work correctly with the UTF-8 strings that are pervasive in non-US clients for World of Warcraft. For example, run the following code in WoW:
/run print(string.sub("Gnøppix", 1, 3))
WoW will sh...
||Mon, 27 Apr 2009 10:49:05 by jnwhiteh
|Print item links posted in chat channels to chatframe
||You can use this snippet to capture item links that are posted in public channels, and print them to the chat frame.
||Mon, 27 Apr 2009 10:48:09 by jnwhiteh
|Display zones required for "World Explorer" achievement
||This snippet will print to your chat frame all of the zones required for "World Explorer" Achievement, and tell you whether you have completed them or not.
||Mon, 27 Apr 2009 10:47:36 by jnwhiteh
|Watch for party kills
||This snippet is written to watch for npcs that your party is killing and report who scored the killing blow to your chat frame. Specifically it is meant to watch for kills of Shoveltusk Stags, but could be customized to watch for any specific mob id...
||Mon, 27 Apr 2009 10:46:51 by jnwhiteh
|Create a mini-timer using OnUpdate
||This code will print ping! in ChatFrame1 every 2 seconds.
||Mon, 27 Apr 2009 10:46:12 by Mikma
|Auto invite addon
||This snippet will auto-invite anyone who whispers the player with "I love you".
||Mon, 27 Apr 2009 10:45:37 by Mikma
|How to use default stopwatch
||The default user interface includes a stopwatch that can be programmatically set and started. This is accomplished using the following functions:
Stopwatch_StartCountdown(hours, minutes, seconds)
||Mon, 27 Apr 2009 10:44:16 by Mikma