O'Reilly logo

Beginning Lua with World of Warcraft Addons by Paul Emmerich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  3

image

Using the WoW API to Create a “Hello, World” Mod

Let's get started. You have already seen some Lua examples in Chapter 2, so writing a “Hello, World!” mod will be no problem for you.

But this first example mod will do a bit more than just displaying “Hello, World.” It will provide two slash commands: /hwadd <id> <text> and /hwshow <id>. The former adds text to a table that will be saved, while the latter sends the text that was saved under id to a chat channel. Gold farmers might think that the only possible use of this addon is to spam the trade chat with advertisements, as it allows you to send a lot of text with one macro. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required