Hi,
I know this is a rather late reply, but i just today discovered this site through google as i was looking for an example on UI modifications.
I have recently developed a test for learning about mods and events.
In this i have created a mod that is triggered by a system event, and upon certain conditions emit a personalized message on the guild channel.
You can download this "Mod" from my website:
http://www.xs4all.nl/~grolimo/wow.htm
(Although it currently looks that my provider is having issues with his webservers, cause it's terribly slow). The mod is half in Dutch half in English so i hope you can learn from it what you need. I put some comments in the code as well..
Included in the download are two mini libraries that contain some renamings/remappings of LUA/WOW functionality to Delphi Pascal like instruction names as that's my background and i like it better that way..
HtH.