You are previewing Beginning Lua with World of Warcraft Add-ons.
O'Reilly logo
Beginning Lua with World of Warcraft Add-ons

Book Description

Deadly Boss Mods author Paul Emmerich will take you from novice to elite with his approachable, up-to-date guide to building addons for World of Warcraft. Using the powerful Lua scripting language and XML, you'll learn how to build and update powerful mods that will remake your World of Warcraft experience and introduce you to the field of professional software development.

Table of Contents

  1. Copyright
  2. Dedication
  3. About the Author
  4. Acknowledgments
  5. Introduction
  6. Getting Started
    1. What Is Lua?
    2. What Are WoW Addons?
    3. Useful Programs, Tools, and Web Sites
  7. Lua Basics
    1. Using Lua
    2. Basics
    3. Variables and Data Types
    4. Expressions
    5. Statements
    6. Local Variables
    7. Variable Arguments
    8. Lua Standard Libraries
    9. Summary
  8. Using the WoW API to Create a "Hello, World" Mod
    1. Running a "Hello, World" in WoW
    2. Our First WoW Addon
    3. Creating Slash Commands
    4. Persistence
    5. Extracting the Default UI
    6. Summary
  9. Working with Game Events
    1. Using Frames as Event Listeners
    2. Creating ChatlinkTooltips
    3. OnEvent
    4. Using OnUpdate to Build a Timing Library
    5. Using the Timing Library for a DKP Mod
    6. Summary
  10. Using XML and Frames
    1. XML Basics
    2. Validating and Debugging XML
    3. Frame Basics
    4. Inheritance
    5. Designing the Table Browser
    6. Building a List Element
    7. More Buttons and Static Popup Dialogs
    8. More Frame Types
    9. An Overview of the Whole XML File
    10. Summary
  11. Advanced Lua
    1. More About Functions
    2. More About the Generic for Loop
    3. Using Tables to Build Data Structures
    4. Metatables and Metamethods
    5. Object Orientation
    6. Handling Errors
    7. The Garbage Collector
    8. More About Lua Libraries
    9. Summary
  12. Using Advanced Lua to Extend the Texas Hold'em Poker Addon
    1. Building Auxiliary Functions
    2. Building the Server
    3. Simple Timing Library 2.0
    4. Saved Variables and Metatables
    5. Summary
  13. Building a Poker Game Client with Addon Communication
    1. Addon Communication Basics
    2. Security and Addon Messages
    3. Building the Poker Client
    4. Summary
  14. Using the Combat Log to Build a Cooldown Monitor
    1. Working with Combat Log Events
    2. Working with GUIDs and Units
    3. Unit Flags and Spell Schools
    4. Building a Cooldown Monitor
    5. Summary
  15. Using Libraries
    1. Embedded Libraries
    2. The Ace Framework
    3. Creating FuBar Plugins
    4. Improving CooldownMonitor with Deadly Bar Timers
    5. Deadly Boss Mods
    6. Summary
  16. Working with Secure Templates
    1. Secure and Tainted Code
    2. Using Secure Templates for a Unit Frame Mod
    3. Using Secure Action Button Templates
    4. Summary
  17. Macros
    1. Available Commands
    2. Conditions
    3. Circumventing the 255-Character Limit
    4. Using Lua in Macros
    5. Summary
  18. Tips, Tricks, and Optimization
    1. Measuring Performance
    2. The Main Rules of Optimization
    3. Strings
    4. Local Variables
    5. Tables
    6. Optimizing SimpleTimingLib
    7. Utilizing Userdata
    8. The Coroutine Library
    9. Summary
  19. Other Uses for Lua
    1. Customizing SciTE with Lua
    2. Lua in Warhammer Online
    3. Lua and Lugre
    4. Summary
  20. Frame Reference
    1. Object
    2. Font
    3. Region
    4. Frame
    5. FontString
    6. Texture
    7. Button
    8. CheckButton
    9. Cooldown
    10. ColorSelect
    11. EditBox
    12. GameTooltip
    13. MessageFrame
    14. Model
    15. PlayerModel
    16. DressUpModel
    17. TabardModel
    18. ScrollFrame
    19. ScrollingMessageFrame
    20. SimpleHTML
    21. Slider
    22. StatusBar
  21. Combat Log and Unit Reference
    1. Combat Log Events
    2. Unit IDs
    3. Unit Functions
  22. Index