• 0

    posted a message on Benalian
    Ok, I managed to retrieve information from the tooltip.
    Another little question: how do I display only the numerical value of the cooldown (what is seen through OmniCC) without the cooldown animation? Of course, I have OmniCC installed.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    Is there a way to know the name of the temporary weapon enchantment? API GetWeaponEnchantInfo() retrieves information only about the presence, charges and duration enchantment
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    Ok, is what I'm looking for. Now, if I want convert the value of ExpirationTime in seconds (as displayed under the icon of the buff / debuff) as I do? I tried this algorithm, but returns values ??such as 0.25 or 0:20

    format("%.2f",-1*(GetTime()-expire)/60)


    where

    • expire = expirationTime from API UnitBuff()
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    I was able to capture the event SPELL_AURA_APPLIED with COMBAT_LOG_EVENT_UNFILTERED. Now, if I want to know the aura duration, as it could be Renew, how can I do? Among the parameters of GetSpellInfo() I can't find the spell duration

    MyEventFrame = CreateFrame("Frame", "MyEventFrame", UIParent)
    MyEventFrame:RegisterEvent("UNIT_COMBAT")
    MyEventFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    MyEventFrame:SetScript("OnEvent", function(self, event, ...)
    if (event=="COMBAT_LOG_EVENT_UNFILTERED") then
        if (arg2 == "SPELL_AURA_APPLIED") then
    	print("Event handler", event, ...)
    	local spellID = arg9
    	print(GetSpellInfo(spellID))
    end
    end
    end)
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    This is the whole code: http://lua.nopaste.dk/p16144
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    I built a draggable frame, and within this frame are attached other frames. I made sure that this frame can not be dragged beyond the edges of the screen with ClampedToScreen. But the final frame can be dragged over the right and bottom edge of the screen. The container frames and frames that will be attached to the inside are created by these functions

    XML: http://nopaste.me/paste/61071414150cf81de0443c
    LUA: http://nopaste.me/paste/866907550cf824458992

    I know, the size of the container are 1x1, but there is another way, perhaps using Region? The contents of the container frame is variable, so I can not set a fixed size
    Posted in: Lua Code Discussion
  • 0

    posted a message on Benalian
    Two other small questions:

    1) If I want set this icon as frame background what path should I write after SetTexture?

    2) print(GetSpellInfo("Dispersion")) Why don't work? I must write the ID?
    Posted in: Need Help?
  • 0

    posted a message on Benalian
    http://nopaste.me/paste/82879449650c5331d7a1e7

    Could be in line 5?
    Posted in: Need Help?
  • 0

    posted a message on Benalian
    My addon has a strange behavior: for example, if I write in my .lua code print("foobar"), my addon write foobar twice.

    The .toc file is
    ## Interface: 30300
    ## Title: My Addon
    ## Notes: My first Addon
    ## SavedVariablesPerCharacter: MyAddon_Settings
    MyAddon.xml
    MyAddon.lua
    


    If I do not load the .lua file, this writes that only once
    Posted in: Need Help?
  • 0

    posted a message on Benalian
    Quote from Torhal
    o.O

    The way he's trying to do it, it does - look at the last parameter in the CreateFrame() call in the third link of the OP.


    Can you tell me where is the error? :confused:
    Posted in: Need Help?
  • 0

    posted a message on Benalian
    With these two codes can be displayed in the upper left corner of the screen the alliance and horde flags

    XML: http://lua.nopaste.dk/p15839
    Lua: http://lua.nopaste.dk/p15838

    But when I try to build the frame in the function UNITSCANNER_Icon_Update() entering the fourth argument (inherits) the code no longer works

    This is the not-working code: http://lua.nopaste.dk/p15840
    Posted in: Need Help?
  • 0

    posted a message on Benalian
    Delete this topic, I wrote in the wrong section
    Posted in: Development Help
  • To post a comment, please or register a new account.