<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/"> 
   
   
   <Script file="Duelist.lua"/> 
   
   <Frame name="Duelist_Frame"> 
      <Scripts> 
         <OnLoad> 
            this:RegisterEvent("VARIABLES_LOADED");
            this:RegisterEvent("PLAYER_ENTERING_WORLD"); 
            this:RegisterEvent("DUEL_FINISHED");            
         </OnLoad> 
         <OnEvent> 
            if (event == "VARIABLES_LOADED") then 
              Duelist_initialize();
            elseif (event == "PLAYER_ENTERING_WORLD") then
            	Duelist_databaseInitialize();
            elseif(event == "DUEL_FINISHED") then
            	Duelist_duelFinished(message);	
            else
            	Duelist_print(event);
						end
         </OnEvent>
         <OnUpdate>
         		Duelist_onUpdate();
         </OnUpdate> 
      </Scripts> 
   </Frame> 
</Ui>