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. ...