多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
| Title | Description | Added | | --- | --- | --- | | [Simple Scroll Frame](http://wowprogramming.com/snippets/Simple_Scroll_Frame_35.html) | Thanks to Xchg of Silvermoon for this code. http://us.battle.net/wow/en/forum/topic/1305771013 | Mon, 08 Jul 2013 01:07:25 by yksrep | | [LOL CLASS](http://wowprogramming.com/snippets/LOL_CLASS_31.html) | Create a frame in middle of the screen with all class icons that can be clicked to print "LOL " in guildchat. | Sun, 27 Jan 2013 09:10:26 by Mikma | | [Getting the stack size of an item under the tooltip](http://wowprogramming.com/snippets/Getting_the_stack_size_of_an_item_under_the_tooltip_30.html) | 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](http://wowprogramming.com/snippets/Label_Checkbuttons_in_XML_29.html) | 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](http://wowprogramming.com/snippets/Fading_Text_Frame_28.html) | 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](http://wowprogramming.com/snippets/Convert_decimal_classcolor_into_hex_27.html) | 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](http://wowprogramming.com/snippets/Run_a_calculation_in_the_background_using_coroutines_26.html) | 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](http://wowprogramming.com/snippets/Create_a_StatusBar_25.html) | 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](http://wowprogramming.com/snippets/Change_the_alpha_on_a_framesubframes_in_response_to_mouse_24.html) | 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](http://wowprogramming.com/snippets/Cache_GetSpellInfo_calls_23.html) | 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](http://wowprogramming.com/snippets/WoW_Font_Preview_with_dynamic_scroll_frames_22.html) | 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](http://wowprogramming.com/snippets/Force_the_targets_health_text_to_stay_shown_20.html) | Prevents the target health text of the default blizzard unit frames from being hidden. | Sun, 18 Apr 2010 14:36:14 by stolenlegacy | | [Emote-Button](http://wowprogramming.com/snippets/Emote-Button_19.html) | Ein einfacher Button zum ausführen eines Emotes. | Sat, 06 Feb 2010 22:30:49 by Pwnees | | [Simple Localization with Metatables](http://wowprogramming.com/snippets/Simple_Localization_with_Metatables_18.html) | 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](http://wowprogramming.com/snippets/Check_if_the_player_is_on_a_flying_mount_17.html) | 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](http://wowprogramming.com/snippets/Scan_a_tooltip_15.html) | This piece of code lets you scan a tooltip. | Sun, 05 Jul 2009 17:58:08 by Industrial | | [Add equipment sets to tooltip](http://wowprogramming.com/snippets/Add_equipment_sets_tooltip_14.html) | 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](http://wowprogramming.com/snippets/Detect_enemy_units_in_combat_log_entries_13.html) | This function will return the enemy (if any) from a combat log event. | Sun, 17 May 2009 12:06:12 by jnwhiteh | | [Cooldown tracker](http://wowprogramming.com/snippets/Cooldown_Tracker_12.html) | 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](http://wowprogramming.com/snippets/Create_a_dialog-themed_window_for_text_11.html) | 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](http://wowprogramming.com/snippets/Create_UI-styled_dropdown_menu_10.html) | This snippet creates a very simple dropdown selection box in the center of the screen. !(http://images.gammatester.com/pics/77634918cc9a6a2b78d076e8d750514d.png) | Wed, 29 Apr 2009 17:48:43 by jnwhiteh | | [Add lines to item tooltip safely](http://wowprogramming.com/snippets/Add_lines_to_item_tooltip_safely_9.html) | 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](http://wowprogramming.com/snippets/Warlock_shard_dropper_8.html) | 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](http://wowprogramming.com/snippets/UTF-8_aware_stringsub_7.html) | 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](http://wowprogramming.com/snippets/Print_item_links_posted_in_chat_channels_to_chatframe_6.html) | 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](http://wowprogramming.com/snippets/Display_zones_required_for_World_Explorer_achievement_5.html) | 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](http://wowprogramming.com/snippets/Watch_for_party_kills_4.html) | 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](http://wowprogramming.com/snippets/Create_a_mini-timer_using_OnUpdate_3.html) | This code will print ping! in ChatFrame1 every 2 seconds. | Mon, 27 Apr 2009 10:46:12 by Mikma | | [Auto invite addon](http://wowprogramming.com/snippets/Auto_invite_addon_2.html) | 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](http://wowprogramming.com/snippets/How_to_use_default_stopwatch_1.html) | 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) Stopwatch\_Play() | Mon, 27 Apr 2009 10:44:16 by Mikma |