Thread: Double Events
View Single Post
03-07-10, 10:57 AM   #5
Zinc
A Deviate Faerie Dragon
Join Date: Mar 2010
Posts: 13
.xml
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://www.blizzard.com/wow/ui/ 
 ..\..\FrameXML\UI.xsd">
 
  <Script File="HelloWorld.lua"/>
  <Frame name="MParent">
  </Frame>

</Ui>
.lua
Code:
  local frame = CreateFrame("FRAME", "MParent");
  frame:RegisterEvent("CHAT_MSG_CHANNEL_JOIN");

  local function autoResponse()
    print("|CFF00FF00Someone has entered the channel.|R");
  end

  frame:SetScript("OnEvent",autoResponse);
.toc
Code:
## Interface: 30100
## Title: Hello World!
## Notes: All Purpose
## Dependencies: 
HelloWorld.lua
HelloWorld.xml
As you can see, I just modify one AddOn to serve as all my AddOns.

Last edited by Zinc : 03-07-10 at 11:03 AM.
  Reply With Quote