在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → Beginning Lua with World of Warcraft Add-ons

Beginning Lua with World of Warcraft Add-ons

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:3.09M
  • 下载次数:1
  • 浏览次数:164
  • 发布时间:2020-08-08
  • 实例类别:一般编程问题
  • 发 布 人:robot666
  • 文件格式:.pdf
  • 所需积分:2
 

实例介绍

【实例简介】
使用Lua语言开发魔兽世界插件 清晰非扫描版。 国内现在有中文版销售,大家可以对比阅读。 ps:搬运的,不好意思要分。
Beginning Lua with World of Warcraft Addons Copyright o 2009 by Paul Emmerich All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13(pbk):978-1-4302-2371-9 ISBN-13( electronic:978-1-4302-23726 Printed and bound in the united states of america 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark Lead Editors: Joohn Choe, Matthew Moodie Technical Reviewer: Chris Lindboe Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Manager: Kylie Johnston Copy Editor: Jim Compton Associate Production Director: Kari Brooks-Copony Production Editor: Kelly gunther Compositors: Patrick Cunningham and Dina Quan Proofreader: lisa hamilton Indexer: Carol burbo Artist: April milne Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc, 233 Spring Street, 6th Floor, NewYork,Ny10013.Phone1-800-springer,fax201-348-4505,e-mailorders-ny@springer-sbm.com,or visithttp://www.springeronline.com For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley,Ca94705.Phone510-549-5930,fax510-549-5939,e-mailinfo@apress.comorvisithttp://www apress. com. Apress and friends of ed books may be purchased in bulk for academic, corporate, or promotional use ebook versions and licenses are also available for most titles For more information, reference our Special Bulksales-ebooklicensingwebpageathttp://www.apress.com/info/bulksales The information in this book is distributed on an"as is"basis, without warranty. Although every precau- tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or ind rectly by the information contained in this work Thesourcecodeforthisbookisavailabletoreadersathttp://www.apress.com. TO All World of Warcraft Players Contents at a glance About the author Acknowledgments XXI Introduction XXl CHAPTER 1 Getting Started ChaPTeR 2 ua basics CHAPTER 3 Using the Wow aPI to create a"Hello, World"Mod 57 CHAPTER 4 Working with Game Events 69 CHAPTER 5 Using XMl and frames CHAPTER 6 Advanced lua 151 CHAPTER 7 Using Advanced Lua to Extend the texas holdem poker addon 195 CHAPTER 8 Building a poker Game Client with Addon communication...227 CHAPTER 9 Using the Combat Log to build a Cooldown Monitor 241 CHAPTER 10 Using Libraries 275 CHAPTER 11 Working with Secure Templates CHAPTER 12 Macros 339 CHAPTER 13 Tips, TrickS, and optimization 361 CHAPTER 14 Other Uses for lua ...393 APPendiXa Frame Reference 405 APPENDIX B Combat Log and Unit reference .455 INDEX 465 Contents About the author Acknowledgments XXI Introduction XXIll CHAPTER 1 Getting Started What is lua What are wow addons Useful Programs Tools, and Web Sites Web si In-Game Tools Programs IDES CHAPTER 2 Lua basics Using lua 13 Basic Variables and Data Types Data Types 17 Dynamic Typing 25 Expressions 26 Arithmetic Operators 26 Relational Operators 27 Logical Operations Precedence Tables and Functions as Expressions Statements 31 Function calls Control structures 33 break return Assignments ...37 vIll CONTENTS Local variables Variable Arguments 41 Lua standard libraries 43 The Math Library 43 String Library Basics The Table Library ..53 The Debug library The Operating System Library 54 Summary CHAPTER 3 Using the Wow aPI to Create a"Hello, World"Mod...57 Running a“ Hello, World” in wow 57 Our first wow addon Folder structure The toc file format Using the WoW APl 62 Creating Slash Commands Persistence Extracting the Default UI Summary 67 CHAPTER 4 Working with Game Events Using frames as event Listeners Creating chatlinkTooltips 71 Chat Frames and Their Script handlers Item Links Using Toolti 73 OnEvent 74 Event Handler Basics Event Handlers for Multiple Events Using OnUpdate to Build a Timing Library ..77 The scheduler The Unscheduled OnUpdate and performance Using the Timing Library for a DKP Mod 81 Variables and Options .81 ocal Functions and Their Scope 2 Starting Auctions 83 CONTENTS X Ending auctions ..84 Placing bids Creating Slash Commands ..87 Canceling Auctions 89 Remote control Hiding Chat Messages 91 Summary ..92 CHAPTEr 5 Using XMl and Frames XML Basics 94 XML Terminology 94 Elements in world of warcraft xm 94 Validating and Debugging XML ValidatingⅩ ML in Scite Debugging 97 Frame basics Making It visible ayers and Textures .103 Movable frames Inheritance 107 The Frame Type Button 107 Buttons in xml 107 Using a Button Template Designing the Table Browser 110 Simple buttons 110 Building a List Element 111 Creating a Border 111 Creating a Template for the headers 112 Using the template A Short overview of our Xn Creating a Template for the entries Creating the Buttons 118 Sorting the list 121 Selecting Elements in the List 122 Scroll frames for lists More Buttons and Static Popup Dialogs .128 More buttons Static Popup Dialogs 130 CONTENTS More frame Types Another normal frame Edit boxes .138 Sliders 140 Check Buttons 143 oK and cancel buttons .145 An Overview of the whole XMl file 146 Summary 149 chaPter 6 Advanced lua 151 More about functions .151 Static Scoping 151 Closures 152 Recursion Part 1: Tail calls 154 Recursion part 2: recursive table functions 155 Hookin 157 More about the generic for loop 159 Using tables to Build Data Structures .160 Arrays 160 Stacks 161 Doubly Linked Lists 161 graph Metatables and Metamethods 169 Overloading Operators 169 Available metamethods ...........,,,,,,,,,171 ect Orientation 171 The colon operato 172 The index metamethod and constructors 172 Inheritance .175 Multiple Inheritance 177 Object Orientation and Data structures 180 Handling errors 181 Catching errors 181 Throwing Errors 182 The environment 184 The Garbage collector The old Lua 5.0 Garbage collector 87 Incremental Garbage collection 188 CONTENTS Weak References 188 Controlling the garbage collector Testing the Garbage Collector .188 More about lua libraries The bit Library The String Library: Part 2 .191 Summary .193 CHAPTEr 7 Using Advanced lua to Extend the texas holdem poker addon 195 Building Auxiliary Functions 195 Creating Cards 196 Getting Cards 197 EXtracting and Rating the best hand 199 Calculating a Rating 200 Finding and Rating the Hand 202 Building the ser 208 Creating a Player object 208 Creating a server object 209 Finite-State Machines .210 Joining a game 211 Starting Betting Rounds Shuffling and Drawing Cards................215 Player Cards and Community Cards Moving the Dealer Button The showdown 217 Waiting for bets Simple Timing Library 2.0 .220 Object-Oriented Timing Library 220 Supporting the Old Timing Library Using Another Data Structure? 222 Saved variables and metatables The Problem: Saving Tables 223 The solution Metatables 224 Summ 226 【实例截图】
【核心代码】

标签:

实例下载地址

Beginning Lua with World of Warcraft Add-ons

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警