| 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 |
- 基础
- 循环
- 迭代器
- ipairs与pairs 的区别
- 流程控制if
- 函数
- 运算符
- 字符串
- 数组
- table(表)
- 模块与包
- 魔兽插件
- 初学介绍
- api
- Global API
- Widget API
- 窗口小部件类层次结构(Widget Class Hierarchy)
- 动画(Animation)
- 透明度(Alpha)
- 线条缩放比例(LineScale)
- 平移(Translation)
- 线平移(Line Translation)
- 路径(Path)
- 旋转(Rotation)
- 缩放(Scale)
- 纹理坐标平移(TextureCoordTranslation)
- 框架 :Frame
- 浏览器(Browser)
- 按键(Button)
- Item按钮(ItemButton)
- 检查按钮(CheckButton)
- 检测(Checkout)
- 颜色选择(ColorSelect)
- 冷却(Cooldown)
- 编辑框(EditBox)
- 战争迷雾(FogOfWarFrame)
- 游戏工具提示(GameTooltip)
- 消息框(MessageFrame)
- 小地图(Minimap)
- 模型(Model)
- 玩家模型(PlayerModel)
- 电影模型(CinematicModel)
- 换装模型(DressUpModel)
- 战袍模型(TabardModel)
- _模型场景(ModelScene)
- 电影Frame(MovieFrame)
- 根小部件(Root Widgets)
- UIObject衍生品(UIObject Derivatives)
- 动画衍生品(Animation Derivatives)
- FontInstance
- 地区衍生品(Region Derivatives)
- 帧衍生品(Frame Derivatives)
- 特殊(Special)
- Events(游戏中变化的事件)
- WoWAPI
- Global Function Groups
- 帐户(Account)
- 成就(Achievements)
- 动作条(Action Bars)
- Action Buttons
- 插件(AddOns)
- 冒险指南(Adventure Guide)
- 神器(Artifact)
- 拍卖行(Auction House)
- 黑市AH
- 魔兽代币(WoW Tokens)
- Azerite
- 背包(Bags)
- 容器(Containers)
- 库存(Inventory)
- 银行(Bank)
- 公会银行(Guild Bank)
- 理发店(Barber Shop)
- 书籍(书籍)
- 日历(calendar)
- 相机(Camera)
- 频道(Channels)
- 聊天窗口(Chat Window)
- 社区(communities)
- 语音聊天(Voice Chat)
- 推特(Twitter)
- 角色(Character)
- 角色表(Paper Doll)
- 试衣间(dressing room)
- 活动(Movement)
- 指定目标(Targeting)
- 死亡(Death)
- 过场动画(Cinematics)
- 职业(class)
- 天赋(Talents)
- 收藏(Collections)
- 坐骑(Mount Journal)
- 宠物(Pet Journal)
- 玩具箱(Toy Box)
- 传家宝(Heirlooms)
- 外观(Appearances)
- 战斗记录(Combat Log)
- 战斗宠物(Combat Pets)
- 同伴(Companions)
- Contribution Collection
- 货币(Currency)
- 光标(Cursor)
- 客户支持(Customer Support)
- 知识库(Knowledge Base)
- 设备管理器(Equipment Manager)
- 扩展(Expansions)
- FrameXML
- 好友(Friends)
- Who List
- 真实身份证(Real ID)
- 招募朋友(Recruit-a-Friend)
- 驻军(Garrisons)
- 建筑物(Buildings)
- 战利品(Trophies)
- 追随者与任务(Followers & Missions)
- 团队(Groups)
- Raid Groups
- Raid Profiles
- 组查找器(Group Finder)
- 突袭者(Raid Finder)
- 公会(Guild)
- 检查(Inspection)
- Instances
- 场景(Scenarios)
- Mythic+
- 入侵(Invasions)
- 海岛探险(Island Expeditions)
- Items
- 按键绑定(Key Bindings)
- Modifiers
- 劫掠(Looting)
- 失控(Loss of Control)
- 宏命令(Macros)
- 邮件(Mail)
- 地图(Maps)
- 飞行管理员(Flight Master)
- 追踪(Tracking)
- 商人(Merchant)
- 铭牌(Nameplates)
- 宠物大战(Pet Battles)
- 申请书(Petitions)
- 专业(Professions)
- 考古(Archaeology)
- 附魔(Enchantments)
- 雕文(glyphs)
- 物品插口(tem Socketing)
- PvP
- 竞技场(Arena)
- 战场(Battlegrounds)
- 世界战场(World Battlefields)
- 争吵(Brawl)
- 战争游戏(War Games)
- 战争模式(War Mode)
- 任务 (Quests)
- 任务日志(Quest Log)
- 任务选择(Quest Choices)
- Task Quests
- 闲聊(Gossip)
- 探险地图(Adventure Map)
- 战争战役(War Campaigns)
- 种族(Races)
- 境界(Realms)
- 报告(Reporting)
- 声望(Reputation)
- 报废的机器(Scrapping Machine)
- 法术(Spells)
- Spell Book
- 商店(Shop)
- 召唤(Summoning)
- 系统(System)
- 网络(Network)
- 控制台(Console)
- 日期时间(Date & Time)
- 调试(Debugging)
- 图形(Graphics)
- 语言环境(Locales)
- 脚本分析(Script Profiling)
- 安全执行(Secure Execution)
- 声音(Sound)
- Sound Drivers
- Talking Head
- 交易(Trading)
- 训练师(Trainer)
- 迁移(Transmogrification)
- 空白存储(Void Storage)
- 讲解(Tutorials)
- UI对象(UI Objects)
- 框架(Frame)
- 字体(Font)
- 质地(Texture)
- 混合(Mixin)
- 咒语(SpellMixin)
- ItemMixin
- 物品位置(ItemLocationMixin)
- PlayerLocationMixin
- 模型场景(ModelScene)
- 未分类
- UI窗口小部件管理器(UI Widget Manager)
- 单位(Units)
- 光环(Auras)
- 玩家(Players)
- 实用程序(Util)
- 车辆(Vehicles)
- Classic Specific Functions
- 猎人宠物(Hunter Pets)
- 专业(Professions)
- 手工制作(Crafting)
- @PvP
- 模拟器
- 训练师(Trainer)
- 8.x API
- 控制台(Console)
- 召唤(Summoning)
- See also
- 外部链接(External links)
- Widget handlers(UI交互事件)
- ScriptObject
- AnimationGroup
- Animation对象
- Alpha对象
- Scale
- LineScale
- Translation
- LineTranslation
- Path
- Rotation
- TextureCoordTranslation
- Frame
- Browser
- Button
- CheckButton
- ItemButton
- Checkout
- ColorSelect
- Cooldown
- EditBox
- FogOfWarFrame
- GameTooltip
- Model
- PlayerModel
- CinematicModel
- DressupModel
- TabardModel
- MovieFrame
- ScrollFrame
- Slider
- MessageFrame
- Minimap
- ModelScene
- OffScreenFrame
- POIFrame
- ArchaeologyDigSiteFrame
- QuestPOIFrame
- ScenarioPOIFrame
- SimpleHTML
- StatusBar
- UnitPositionFrame
- WorldFrame
- 入门
- .toc
- .lua
- .xml
- 示例
- 自动邀请插件
- 完整例子:显示任务坐标
- eCoordinates.toc
- eCoordinates.xml
- eCoordinates.lua
- 开发帮助组件
- AddOn Studio编辑器
- 暴雪自带调试工具
- DevTools调试插件
- wowlua
- 魔兽宏
- 战斗宠物命令
- 暴雪界面命令
- 聊天命令
- chat substitutions
- 角色指令
- 开发者工具
- 表情动作
- 战斗命令
- 公会命令
- 小队与团队命令、
- 宠物命令
- PvP的命令
- 系统命令
- 目标函数
- 命令
- 被禁用的命令
- 宏条件
- 装备物品编号