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
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")
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 ?????
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
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.
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 ????
0
It isn't the same addon as the one i've tryed before, but it does the job
Thanks again :)
0
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
0
You should be able to use:
UnitIsGhost("unit")
and then cycle through the raid members like:
Haven't tested this... But seems likely
0
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
0
Then here are links to the wow code
Blizzard_Calendar
Blizzard_Calendar.lua
Blizzard_Calendar.xml
Blizzard_CalendarTemplates.xml
thanks for youre help
0
I've hooked the CalendarCreateEventInviteListScrollFrame_Update that inserts what text there will be on the buttons in the CalendarEventFrame:
ie.
i'm changing it to:
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.
0
It took me like an hr to fighur this out.
So if someone wants to see it then, here it is:
and now you can add a Hyperlink into the chat with:
0
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
0
0
self.optionsFrame = LibStub("AceConfig-3.0"):AddToBlizOptions("WE2", "WE2")
Shold be
self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("WE2", "WE2")
0
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:
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
0
I can't show the GUI.
Here is my code:
.toc
embeds.xml
Core.lua
Variables.lua
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 ?
0
but i still got that fatal error :S
0
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
0
Is it possible to check if a frame/Button excists before you create it
Ex.
If i create a button and hide it
If i now create a new button. Can i check if it already excists ??
Ex. If i wanted to create the same button again