• 0

    posted a message on Need help triggering my addon with if a certain event

    Hello! I'm trying to make a simple addon that's going to remind me to change my talents before starting a certain Instance. So what I have tried to do is to whenever I'd enter an instance portal a popup would pop up telling me to change talents. I've been struggling with this simple code for hours now and can't seem to get it to work. Could anyone help with this?

     

    TOC FILE:

     

    ## Interface: 90100
    ## Title: TalentReminder
    ## Author: Tynset
    ## Version: 1.0.0

    TalentReminder.lua
     
    LUA FILE: 
    local frame = CreateFrame("FRAME")
    frame:RegisterEvent("PLAYER_ENTERING_WORLD")
    frame:SetScript("OnEvent", function(self,event,...) frame.OnEvent(event,self,...) end)

    function frame.OnEvent(self, event, ...)
        local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 = ...
        if event == "PLAYER_ENTERING_WORLD" then
            message("Remember to change your Talents!")
        end
    end
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.