• 0

    posted a message on Inline Aura - display aura information inside action buttons
    I cant seem to get the countdown on debuffs to go away (things like moonfire, IS, mind flay, etc) even though I have countdowns turned off. Am I doing something wrong?
    Posted in: General AddOns
  • 0

    posted a message on Little help with this code?
    Quote from Vexxilus
    Provided its not just a typo:
    frame:Set[B]S[/B]cript("OnEvent", VB_OnEvent)
    


    On a side note, select(1, ...) is the same as just using ... by itself. Also, since you are only registering the one event you can just put the variable names in the function definition:
    local frame = CreateFrame('Frame')
    frame:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
    frame:SetScript('OnEvent', function(self, event, timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags)
    	if destName == "Val'kyr Guardian" and type == 'SPELL_SUMMON' and sourceName == "Rannasha" then
    		SendChatMessage("You face not Rannasha alone, but the Val'kyr I command!", 'SAY', nil, nil) 
    	end
    end)
    frame:Hide()
    


    Yay, that works, thanks a bunch!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Little help with this code?
    Quote from Xinhuan
    Does the filename (valkyr.lua) listed in the TOC file match the .lua filename you created for your code?


    Yup :(
    Posted in: Lua Code Discussion
  • 0

    posted a message on Little help with this code?
    So I found some code while looking at the comments for Nibelung on Wowhead that will supposedly send a message in /say when my val'kyr spawns. Here's the original codes for the .toc and .lua:

    TOC:

    ## Interface: 30300

    ## Title: Val'kyr Barker
    ## Notes: Announces the spawning of a Val'kyr from the Nibelung staff
    ## Author: Rannasha
    ## X-Category: Combat
    ## X-License: GPL v2
    ## Version: 1.0

    valkyr.lua

    LUA:

    function VB_OnEvent(this, event, ...)

    local timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)

    if (type=="SPELL_SUMMON" and sourceName=="Rannasha" and destName=="Val'kyr Guardian") then
    SendChatMessage("You face not Rannasha alone, but the Val'kyr I command!", "SAY", nil, nil)
    end
    end

    local frame = CreateFrame("Frame", "VBFrame");
    frame:Setscript("OnEvent", VB_OnEvent);
    frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    frame:Hide();

    I took it and edited the sourceName to my character's name and changed the chat message, but it doesn't seem to be working. I don't know much about coding myself but I did save it as a UTF8 .lua and it shows up in my addon list, but I get no message when my valk is summoned. Can anyone pinpoint the problem?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.