• 0

    posted a message on Looking for an addon
    Thanks that works fine :)

    It isn't the same addon as the one i've tryed before, but it does the job

    Thanks again :)
    Posted in: AddOn HELP!
  • 0

    posted a message on Looking for an addon
    Hi

    Once i had an addon that kinda worked like OminCC. But it counted buffs/Debuffs.

    For example:

    - If a shoot a target with Serpent Sting. The CC on Serpent sting would show how much was left on the target.

    - If i use Flame shock. The CC would show how much was left on the target

    - If i buff someone. The CC on the buff would show how much was left on the target.

    So this is kinda a Buff watch, and a Debuff watch.
    As far as i can remember the CC was with Green letters.

    Thanks :D
    Posted in: AddOn HELP!
  • 0

    posted a message on SmartRes2 unknown units and organized lists
    Hey

    You should be able to use:

    UnitIsGhost("unit")

    and then cycle through the raid members like:

    function Addon:getReleseList()
         local relesedList = {}
    
         for i=1, GetNumRaidMembers() do
              if UnitIsGhost("raid"..i) then
                   local name = UnitName("raid"..i)
                   tinsert(releseList, name)
              end
         end
         return relesedList
    end


    Haven't tested this... But seems likely
    Posted in: Lua Code Discussion
  • 0

    posted a message on HybridScrollFrame
    Hey

    Has blizzard sayed anything about their new HybridScrollFrame ? (It is used in their calendar)

    Or does anyone know how they are used ?

    Constructed, Updated, and stuff.

    They seem to behave like a FauxScrollFrame.

    Thanks
    Posted in: Lua Code Discussion
  • 0

    posted a message on CalendarEventFrame Update Function
    if someone wants to take a look at the Wow Code and try to find it.
    Then here are links to the wow code

    Blizzard_Calendar
    Blizzard_Calendar.lua
    Blizzard_Calendar.xml
    Blizzard_CalendarTemplates.xml

    thanks for youre help
    Posted in: Lua Code Discussion
  • 0

    posted a message on CalendarEventFrame Update Function
    Hi

    I've hooked the CalendarCreateEventInviteListScrollFrame_Update that inserts what text there will be on the buttons in the CalendarEventFrame:

    ie.
    Name           Class    Status
    [charname]  Paladin   Accepted
    ...
    


    i'm changing it to:
    Name                                   Class                      Status
    [charname](Guild Rank index)    [Online] [invited to group]     Accepted
    ...
    


    and it seams to work fine.
    But whenever i scroll in the list everything resets.

    I've been trying to search for an other UpdateFrame Function, but can't find any.

    Anyone know what UpdateFrame Function they are using ?

    /Caldara

    ps. i've noticed that they are using that HybridScrollFrame. Maybe it has something to do with that.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Link to a function in a chatFrame
    Thanks

    It took me like an hr to fighur this out.
    So if someone wants to see it then, here it is:

    EC = LibStub("AceAddon-3.0"):NewAddon("Epic Counter", "AceEvent-3.0", "AceConsole-3.0", "AceHook-3.0")
    
    function EC:OnInitialize()
    	self:RawHookScript(DEFAULT_CHAT_FRAME, "OnHyperlinkClick", "LinkHandler")
    end
    
    function EC:LinkHandler(self, link, string, button, ...)
    	local linkType, arg1, arg2, arg3 = strsplit(":", link)
    	if linkType == "EC" and arg1 == "edit" then
    		EC:Print("YAY")
    	else
    		EC.hooks[_G.DEFAULT_CHAT_FRAME].OnHyperlinkClick(self, link, string, button)
    	end
    end
    
    


    and now you can add a Hyperlink into the chat with:

    /script DEFAULT_CHAT_FRAME:AddMessage("This is a link \124HEC:edit\124[link]\124h")
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Link to a function in a chatFrame
    Hi

    Is it possible to make a link in a chat frame that will triger a function ?

    ex:
    "This is some text [link] bla bla bla"
    and when the [link] is clicked, it will trigger a function.

    I want to have a ScrollingChatFrame witch will show something like

    "[charName1] (4) [edit]"
    "[charName2] (3) [edit]"
    "[charName3] (5) [edit]"
    "[charName4] (2) [edit]"

    all added with frame:addMessage("");

    and when you press the [edit] link it will trigger some function.

    I know i can do this with FauxScrollingFrame. But it would be so much easyer , if I could use a ScrollingChatFrame for this particular thing.

    thanks
    Posted in: Lua Code Discussion
  • 0

    posted a message on Options Table (Ace&Blizz) GUI Help
    Is there a module Library wich i am missing... I can't seam to load the option frame if i haven't got lib:Ace3 (The addon) loaded. ie. WE2 can't run allone ?????
    Posted in: Lua Code Discussion
  • 0

    posted a message on Options Table (Ace&Blizz) GUI Help
    Whops :P nvm. Just wrote the wrong name

    self.optionsFrame = LibStub("AceConfig-3.0"):AddToBlizOptions("WE2", "WE2")

    Shold be

    self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("WE2", "WE2")
    Posted in: Lua Code Discussion
  • 0

    posted a message on Options Table (Ace&Blizz) GUI Help
    Yay it worked. Thanks a lot :D

    But now there is one more thing. How do i add the option table to the BilzzardAddonTable (interfece)

    I found a tutorial that said i should do:

    function WE2:Variables()
        -- Called when the addon is loaded
        self.db = LibStub("AceDB-3.0"):New("WE2DB", WE2.default)
        LibStub("AceConfig-3.0"):RegisterOptionsTable("WE2", WE2_options)
        self:RegisterChatCommand("we2", "ChatCommand")
        self:RegisterChatCommand("whisperenhanced2", "ChatCommand")
        self.optionsFrame = LibStub("AceConfig-3.0"):AddToBlizOptions("WE2", "WE2")
    end
    
    function WE2:ChatCommand(input)
        if not input or input:trim() == "" then
            LibStub("AceConfigDialog-3.0"):Open("WE2")
        else
            LibStub("AceConfigCmd-3.0").HandleCommand(WE2, "we2", "whisperenhanced2", input)
        end
    end
    


    And on the LibStub("AceConfigDialog-3.0"):Open("WE2") I shoud add the BlizzardAddonFrameOpen Command.... but eaven this code should add my option table to Blizzards, right ??
    But i can't find it
    Posted in: Lua Code Discussion
  • 0

    posted a message on Options Table (Ace&Blizz) GUI Help
    Hi why is my options table not working ?
    I can't show the GUI.

    Here is my code:

    .toc
    ## Interface: 30000
    ## Title: Whisper Enhanced 2
    ## Notes: A simple chat sorting addon
    ## Author: Unibus
    ## SavedVariables: WE2DB
    ## Version: 0.1
    
    embeds.xml
    Libs\Dewdrop-2.0\Dewdrop-2.0.lua
    WE2_variables.lua
    Core.lua
    WE2_Info.lua
    WE2_frameStuff.lua
    WE2_dropDowns.lua
    WE2_mainFrame.xml
    WE2_tabs.xml


    embeds.xml
    <Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
        <Script file="Libs\LibStub\LibStub.lua"/>
        <Script file="Libs\AceLibrary\AceLibrary.lua"/>
        <Script File="Libs\LibTooltip-1.0\LibTooltip-1.0.lua"/>
        <Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
        <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml"/>
        <Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml"/>
        <Include file="Libs\AceHook-3.0\AceHook-3.0.xml"/>
        <Include file="Libs\AceDB-3.0\AceDB-3.0.xml"/>
        <Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml"/>
        <Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml"/>
        <Include file="libs\AceGUI-3.0\AceGUI-3.0.xml"/>
        <Include file="Libs\AceConfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/>
        <Include file="Libs\WhoLib\WhoLib.xml"/>
        <Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml"/>
    </Ui>


    Core.lua
    function WE2:OnInitialize()
        self.db = LibStub("AceDB-3.0"):New("WE2DB")
        WE2:RegisterEvent("CHAT_MSG_WHISPER")
        WE2:RegisterEvent("CHAT_MSG_WHISPER_INFORM")
        WE2:RegisterEvent("CHAT_MSG_CHANNEL")
        WE2:RegisterEvent("CHAT_MSG_PARTY")
        WE2:RegisterEvent("CHAT_MSG_GUILD")
        WE2:RegisterEvent("CHAT_MSG_BATTLEGROUND")
        WE2:RegisterEvent("CHAT_MSG_BATTLEGROUND_LEADER")
        WE2:RegisterEvent("CHAT_MSG_OFFICER")
        WE2:RegisterEvent("CHAT_MSG_RAID")
        WE2:RegisterEvent("CHAT_MSG_RAID_LEADER")
        WE2:RegisterEvent("CHAT_MSG_RAID_WARNING")
     
        WE2:Variables()
    end
    
    .....


    Variables.lua
    WE2 = LibStub("AceAddon-3.0"):NewAddon("WE2", "AceEvent-3.0", "AceConsole-3.0", "AceHook-3.0")
    WE2.options = {
    handle = {
            ["Whisper"] = true,
            ["Guild"] = true,
            ["Party"] = true,
            ["Bg"] = true,
            ["Raid"] = true
    	};
    }
    
    WE2_options = {
        name = "WE2",
        handler = WE2,
        type = 'group',
        args = {
            General = {
                order = 1,
                    type = "group",
                    name = "General",
                    desc = "General settings",
                    args = {
                    HandleWhisper = {
                        type = "toggle",
                        order = 1,
                        name = "Handle Whispers",
                        desc = "Lets WE2 handle inc and out whispers",
                        get = function(info) return WE2.options.handle["Whisper"] end,
                        set = function(info,input) WE2.options.handle["Whisper"] = input end
                    },
                    HandleParty = {
                        type = "toggle",
    		    order = 1,
    		    name = "Handle Party",
    		    desc = "Lets WE2 handle inc and out Party messages",
                        get = function(info) return WE2.options.handle["Party"] end,
                        set = function(value,input)  WE2.options.handle["Party"] = input end
                    },
                    HandleGuild = {
                        type = "toggle",
    		    order = 1,
    		    name = "Handle Guild",
    		    desc = "Lets WE2 handle inc and out Guild messages",
                        get = function(info) return WE2.options.handle["Guild"] end,
                        set = function(value,input) WE2.options.handle["Guild"] = input end
                    },
                    HandleRaid = {
                        type = "toggle",
    		    order = 1,
    		    name = "Handle Raid",
    		    desc = "Lets WE2 handle inc and out Raid messages",
                        get = function(info) return WE2.options.handle["Raid"] end,
                        set = function(value,input) WE2.options.handle["Raid"] = input end
                    },
                },
            },
        },
    }
    
    function WE2:Variables()
        -- Called when the addon is loaded
        LibStub("AceConfig-3.0"):RegisterOptionsTable("WE2", WE2_options)
        -- self.optionsFrame = LibStub("AceConfig-3.0"):AddToBlizOptions("WE2", "WE2")
        self:RegisterChatCommand("we2", "ChatCommand")
        self:RegisterChatCommand("whisperenhanced2", "ChatCommand")
    end
    
    function WE2:ChatCommand(input)
        if not input or input:trim() == "" then
            LibStub("AceConfigDialog-3.0"):Open("WE2")
        else
            LibStub("AceConfigCmd-3.0").HandleCommand(WE2, "we2", "whisperenhanced2", input)
        end
    end


    This is with out the Blizz options. Because that just cancled the slahs commands, and i coundn't do anything.

    Anyone Know what is wrong ?
    Posted in: Lua Code Discussion
  • 0

    posted a message on ERROR #132 (0x85100084) Fatal Exception (HELP!!)
    I also tryed running the addon when it only register Whisper events:
    function WE2:OnEnable()
     	self:RegisterEvent("CHAT_MSG_WHISPER");
     	self:RegisterEvent("CHAT_MSG_WHISPER_INFORM");
    	self:RegisterEvent("WHOLIB_QUERY_RESULT")
    	--[[
        self:RegisterEvent("CHAT_MSG_PARTY");
    	self:RegisterEvent("CHAT_MSG_CHANNEL");
    	self:RegisterEvent("CHAT_MSG_GUILD");
    	self:RegisterEvent("CHAT_MSG_RAID");
    	self:RegisterEvent("CHAT_MSG_RAID_LEADER");
    	]]--
    	WE2:variables();
    end


    but i still got that fatal error :S
    Posted in: Lua Code Discussion
  • 0

    posted a message on ERROR #132 (0x85100084) Fatal Exception (HELP!!)
    Hi everyone.

    I'm almost going insane :S.
    I've made a new ace2 addon called WhisperEnhanced2, and it should work(I think)
    Some of my friends are tesing it and they aren't getting any serius errors.

    But after i have had my addon running for some time wow crashes and says:

    ERROR #132 (0x85100084) Fatal Exception
    ... lots of text here ...

    On the blizzard forum there are some posts about this error, but they all say
    something about outdated drivers and stuff.

    But in my case it only happens when i have my own addon enabled,
    even if it is the only addon enabled.

    So i suspect that there is something wrong with my code.
    But i can't find anything :S

    My friends aren't that good at coding in Lua. So is there any chance someone can take
    a look at the code and maybe find the error ????

    http://www.mediamax.com/unibus/Hosted/WE2v0.3b.zip

    Sincerly
    Unibus
    Posted in: Lua Code Discussion
  • 0

    posted a message on Help with Frames and Buttons
    One more thing.

    Is it possible to check if a frame/Button excists before you create it

    Ex.
    If i create a button and hide it
    button = CreateFrame("Button", "test", nil, "WE2_Tab");
    button:Hide();


    If i now create a new button. Can i check if it already excists ??
    Ex. If i wanted to create the same button again
    if(test == not a button) then <-or something
       button = CreateFrame("Button", "test", nil, "WE2_Tab");
    else
       Print("test is already a button")
    end
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.