Download
(246Kb)
Download
Updated: 04-06-09 02:15 AM
Pictures
File Info
Updated:04-06-09 02:15 AM
Created:unknown
Downloads:140,343
Favorites:349
MD5:

SpellAlerter  Popular! (More than 5000 hits)

Version: 2.03
by: kollektiv [More]

What it does

SpellAlerter is a basic spell alert mod based off the original SpellAlert mod. See the images for the different alert types you can setup.

Features

  • Add any spell and ability you want to be alerted to
  • Three filters: Enemy Spellcasts, Enemy Buffs, and Friendly Debuffs
  • Additional filtering for players only (reduces spam from things such as Mirror Image)
  • Each alert can have its own sound play. It's similar to making triggers in MSBT but a lot more simplified.
  • Optional minimap icon
  • Data broker plugin
  • All options are inside the GUI. Type /sa or /spellalerter to access them.

Localization

It should work with all language clients. It is currently only localized in English and Simplified Chinese. If you'd like to help translate see the Locales.lua file.

Bug Reports and Feature Requests

Please post them in the comments.

Changelog

2.03
  • Added Simplified Chinese translations
  • Localization is now done through CurseForge
  • Fixed bug with Target Only option

2.02
  • The arrow will now point to the left if the source's target is the same as the source
  • Added an option to filter players on spell casts. Helps reduce spam (ex. Frost Bolts from mirror images)
  • Added an option to toggle class colors on names. This is only 100% reliable in arenas
  • Added an option to select text font
  • Added an option to replace player name with any word
  • Added an option to toggle showing targets. Select between arrow model and text
  • Added an option to play a sound for each spell. Similiar to making MSBT triggers.
  • Added a list for spell cast ignores. These are spells you don't want showing targets (ex. Howl of Terror).
  • Added verifying and case formatting for list additions
  • Added a profile system
  • Added toggable minimap icon
  • Added localization support
  • Removed creating new anchors. I've never seen anyone use this.
  • Added a Sounds.lua file. Adding sounds is very easy. Open Sounds.lua and follow the instructions carefully.
  • Added Ace3 libraries
  • Added LibDBIcon-1.0 library
  • Added LibDataBroker-1.1 library - Hence there's support for LDB launcher display addons
  • Added LibSharedMedia-3.0 library
  • Added !ClassColors support
  • Created a FauxScrollFrame AceGUI widget for 'select' types in options

For the most recent changes, see the addon page. For a compilation of the all the changes, see the Changelog file in the zip.
Post A Reply Comment Options
Unread 03-27-08, 07:17 AM  
myztikrice
A Kobold Labourer

Forum posts: 0
File comments: 30
Uploads: 0
ShardAce also uses /sa and /spellalerter doesn't work. Is there a way to fix this?
Report comment to moderator  
Reply With Quote
Unread 03-27-08, 06:34 AM  
znylol
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Apparently in the 2.4 version there's the servername behind the player's name, I find this rather annoying tbh - Is it possible to edit the .lua somehow to remove that? Or any other suggestions to get rid of it are welcome and very much appreciated.
Last edited by znylol : 03-27-08 at 06:34 AM.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 11:08 PM  
coopo
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Nice work Ensabahnur. One issue though with the hack is that the ability to set the height is now broken.

In another words, it's stuck in the middle... for me at least.

edit: nevermind. If you change the width first then the height parameter starts functioning again.
Last edited by coopo : 03-26-08 at 11:15 PM.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 02:09 PM  
EnSabahNur
A Defias Bandit
 
EnSabahNur's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 55
Uploads: 6
Re: Re: Re: Re: Re: Re: Thumbs up

Originally posted by koraz
But is it still possible to include the spell names, or at least make it an option that u can toggle on or off. Not everyone can memorize what every single icon represents what spell. I think A LOT of people will really appreciate this

EnSabahNur managed to slip in this feature in your modified addon, but for some reason, the alerts does not show up, even tho it works if you type /sa test. While your original version, shows the spell alert with icons only, but doesnt do anything when /sa test is typed ( i was trying to test it after adjusting height and fade).
here are my latest hack for the Great Addon:
Code:
-----------------------------------------------------
-- Spell Alerter by Kollektiv
-----------------------------------------------------

SpellAlerterDB = SpellAlerterDB or { height = 190, fade = 1, width = 0}

local select = select
local GetSpellInfo = GetSpellInfo
local band = bit.band

local CombatLog_Object_IsA = CombatLog_Object_IsA
local COMBATLOG_FILTER_HOSTILE_PLAYERS = COMBATLOG_FILTER_HOSTILE_PLAYERS

local colors = {
		[1] = {1,1,0,0},	-- heals
		[2] = {1,0,1,0},	-- cc
		[3] = {0,1,0,0},	-- dispelable
		[4] = {1,0,0,0},	-- damage
	}
	
local frame,texture,text,fade,spells
local time, fadetime, alpha, num = 0,0,0,0

-- References
local ref_GetTextColor
local ref_SetText
local ref_SetTexture
local ref_TextureSetVertexColor
local ref_TextSetVertexColor
local ref_Show
local ref_Hide
local ref_SetScript


local function SpellAlerter_CreateFrame()
	frame:SetFrameStrata("HIGH")
	frame:SetWidth(1)
	frame:SetHeight(1)
	frame:SetPoint("CENTER",UIParent,"CENTER",SpellAlerterDB.width,SpellAlerterDB.height)
	frame:Show()
	
	ref_Show = frame.Show
	ref_Hide = frame.Hide
	ref_SetScript = frame.SetScript
	
	local txt = frame:CreateFontString(ZoneTextFont,"ARTWORK")
	txt:SetFont("Fonts\\FRIZQT__.TTF",40,"THICKOUTLINE")
	txt:SetPoint("LEFT",frame,"CENTER",-45,-2)
	txt:SetJustifyH("LEFT")
	
	ref_GetTextColor = txt.GetTextColor
	ref_SetText = txt.SetText
	ref_SetTextColor = txt.SetTextColor
	ref_TextSetVertexColor = txt.SetVertexColor
	
	local txtr = frame:CreateTexture(nil,"BACKGROUND")
	txtr:SetHeight(35)
	txtr:SetWidth(35)
	txtr:SetVertexColor(1,1,1,1)
	txtr:SetPoint("RIGHT",frame,"CENTER",-50,0)
	txtr:SetTexCoord(0.07,0.9,0.07,0.90)
	
	ref_SetTexture = txtr.SetTexture
	ref_TextureSetVertexColor = txtr.SetVertexColor
	
	texture = txtr
	text = txt
end

local function SpellAlerter_OnUpdate(self, elapsed)
	local r,g,b
	return function(self, elapsed)
		time = time + elapsed
		fadetime = fadetime + elapsed
		if time > 0.05 then
			r,g,b = ref_GetTextColor(text)
			if fadetime < .1 then
				num = num + 0.5
			elseif fadetime >= 0.1 and fadetime <= (fade - 0.1) then
				num = 1
			elseif fadetime > (fade - 0.1) then
				num = num - 0.5
			end
			ref_TextSetVertexColor(text,r,g,b,num)
			ref_TextureSetVertexColor(texture,1,1,1,num)
			time = 0
			if fadetime > fade then
				ref_SetScript(self,"OnUpdate",nil)
				ref_Hide(self)
			end
		end
	end
end

SpellAlerter_OnUpdate = SpellAlerter_OnUpdate()

local function SpellAlerter_AddMessage(unit,type,icon,spell)
	ref_SetTexture(texture,icon)
	ref_TextureSetVertexColor(texture,1,1,1,0)
	ref_SetText(text,spell..","..unit)
	text:SetTextColor(unpack(colors[type]))
	time, fadetime, alpha, num = 0,0,0,0
	ref_Show(frame)
	ref_SetScript(frame,"OnUpdate",SpellAlerter_OnUpdate)
end


local function SpellAlerter_COMBAT_LOG_EVENT()
	local _, eventtype, srcName, srcFlags, dstName, dstFlags
	local unit, spellID
	local spell, icon
	return function(...)
		_, eventtype, _, srcName, srcFlags, _, dstName, dstFlags = select(1,...)
		if eventtype == ("SPELL_CAST_START" or eventtype == "SPELL_CAST_SUCCESS") and CombatLog_Object_IsA(srcFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) then
			unit = srcName
		elseif eventtype == "SPELL_AURA_APPLIED" and CombatLog_Object_IsA(dstFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) then
			unit = dstName
		else
			return
		end
		spellID = select(9,...)
		if spellID == 35223 then return end -- hack for Holy Light bug,
		spell,_,icon = GetSpellInfo(spellID)
		if spells[spell] then
			SpellAlerter_AddMessage(unit,spells[spell],icon,spell)
		end
	end
end

SpellAlerter_COMBAT_LOG_EVENT = SpellAlerter_COMBAT_LOG_EVENT()

local function SpellAlerter_Test()
	SpellAlerter_AddMessage("Kollektiv",3,"Interface\\Icons\\Spell_Nature_SkinofEarth","Test")
end

local cmdfuncs = {
	width = function(v) if not v or v < -500 or v > 500 then ChatFrame1:AddMessage("Invalid width value, enter a value between -500 and 500",0,1,0); return; end;
											 SpellAlerterDB.width = v; 
											 frame:ClearAllPoints(); 
											 frame:SetPoint("CENTER",UIParent,"CENTER",SpellAlerterDB.width,SpellAlerterDB.height); 
											 SpellAlerter_Test()
					 end,
	height = function(v) if not v or v < -500 or v > 500 then ChatFrame1:AddMessage("Invalid height value, enter a value between -500 and 500",0,1,0); return; end;
											 SpellAlerterDB.height = v; 
											 frame:ClearAllPoints(); 
											 frame:SetPoint("CENTER",UIParent,"CENTER",SpellAlerterDB.width,SpellAlerterDB.height); 
											 SpellAlerter_Test()
					 end,
	fade = function(v)   if not v or v < .5 or v > 5 then ChatFrame1:AddMessage("Invalid fade time value, enter a value between 0.5 and 5",0,1,0); return; end;
											 SpellAlerterDB.fade = v; fade = v; SpellAlerter_Test() end,
	test = function() SpellAlerter_Test() end,
}

local cmdtbl = {}
function SpellAlerter_Command(cmd)
	for k in ipairs(cmdtbl) do
		cmdtbl[k] = nil
	end
	for v in gmatch(cmd, "[^ ]+") do
  	tinsert(cmdtbl, v)
  end
  local cb = cmdfuncs[cmdtbl[1]] 
  if cb then
  	local s = tonumber(cmdtbl[2])
  	cb(s)
  else
  	ChatFrame1:AddMessage("Spell Alerter Options | /sa <option>",0,1,0)
  	ChatFrame1:AddMessage("-- width <number> | value: " .. (SpellAlerterDB.width or "none"),0,1,0)
	ChatFrame1:AddMessage("-- height <number> | value: " .. (SpellAlerterDB.height or "none"),0,1,0)
  	ChatFrame1:AddMessage("-- fade <number> | value: " .. (SpellAlerterDB.fade or "none"),0,1,0)
  	ChatFrame1:AddMessage("-- test",0,1,0)
  end
end

local function SpellAlerter_OnLoad(self)
	self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
	fade = SpellAlerterDB.fade
	spells = SpellAlerter_spells
	SpellAlerter_CreateFrame(self)
	SlashCmdList["SpellAlerter"] = SpellAlerter_Command
 	SLASH_SpellAlerter1 = "/sa"
 	ChatFrame1:AddMessage("Spell Alerter by Kollektiv. Type /sa for options",0,1,0)
end
	
local function SpellAlerter_OnEvent(self, event, ...)
	if event == "VARIABLES_LOADED" then
		SpellAlerter_OnLoad(self)
	else
		SpellAlerter_COMBAT_LOG_EVENT(...)
	end
end

frame = CreateFrame("Frame",nil,UIParent)
frame:RegisterEvent("VARIABLES_LOADED")
frame:SetScript("OnEvent",SpellAlerter_OnEvent)
hope it works on non German Client
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 11:31 AM  
koraz
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Re: Re: Re: Re: Re: Thumbs up

Originally posted by kollektiv
It's suppose to show the spell icon and the player name. Spell icons are more efficient to 'read' rather than actually having spell text.

But is it still possible to include the spell names, or at least make it an option that u can toggle on or off. Not everyone can memorize what every single icon represents what spell. I think A LOT of people will really appreciate this

EnSabahNur managed to slip in this feature in your modified addon, but for some reason, the alerts does not show up, even tho it works if you type /sa test. While your original version, shows the spell alert with icons only, but doesnt do anything when /sa test is typed ( i was trying to test it after adjusting height and fade).
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 10:47 AM  
kollektiv
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 46
Uploads: 6
Originally posted by arrch
The new version that is supposed to work with 2.4 is totally fucked in BGs, it says "Name-EU4A-BG-EN" for example.
Ok, i'll look into this.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 10:44 AM  
kollektiv
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 46
Uploads: 6
Re: Re: Re: Re: Thumbs up

Originally posted by Abacinate
Hey there... is this mod not designed to show the name of the spell being cast ? Seems like all I get is the name of the player showing up.....

im looking for something like the regular SA that showed the name fades configurable not sure if that is updated yet but was trying this one.... dont quite understand why no spell name included and no move option
It's suppose to show the spell icon and the player name. Spell icons are more efficient to 'read' rather than actually having spell text.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 10:42 AM  
kollektiv
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 46
Uploads: 6
Originally posted by Thorrkin
@arrch: This has nothing to do with the mod itself, I don't know why but since 2.4 players in battleground have names like "randomguy-EU1-B-BG-FR" instead of "randomguy-randomserver".

I have a strange bug with the program, the spell icon and the name of the player that is casting it are a bit transparent plus to make it disappear I have to "/console reloadui" (or someone has to cast another spell) but if I don't do that the "spellicon-player" will stay on my screen for a loooong time . Also, I have a wow error

Delete settings in WTF folder, which is most common way to fix problems when updating mods.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 07:58 AM  
coopo
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by EnSabahNur
2. Added option to show spellname next to the icon in front of the name of the player casting the spell.
Is it possible for someone to edit or explain how to edit to re-include this option?

Thanks.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 07:49 AM  
Thorrkin
A Kobold Labourer
 
Thorrkin's Avatar

Forum posts: 0
File comments: 5
Uploads: 0
@arrch: This has nothing to do with the mod itself, I don't know why but since 2.4 players in battleground have names like "randomguy-EU1-B-BG-FR" instead of "randomguy-randomserver".

I have a strange bug with the program, the spell icon and the name of the player that is casting it are a bit transparent plus to make it disappear I have to "/console reloadui" (or someone has to cast another spell) but if I don't do that the "spellicon-player" will stay on my screen for a loooong time . Also, I have a wow error

Last edited by Thorrkin : 03-26-08 at 08:00 AM.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 06:38 AM  
arrch
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
The new version that is supposed to work with 2.4 is totally fucked in BGs, it says "Name-EU4A-BG-EN" for example.
Last edited by arrch : 03-26-08 at 06:45 AM.
Report comment to moderator  
Reply With Quote
Unread 03-26-08, 02:22 AM  
Abacinate
A Kobold Labourer

Forum posts: 0
File comments: 81
Uploads: 0
Re: Re: Re: Thumbs up

Hey there... is this mod not designed to show the name of the spell being cast ? Seems like all I get is the name of the player showing up.....

im looking for something like the regular SA that showed the name fades configurable not sure if that is updated yet but was trying this one.... dont quite understand why no spell name included and no move option



Originally posted by kollektiv
Insert something like

["spellname"] = 1,

between the braces. 1 can be replaced with 2, 3, or 4.
Report comment to moderator  
Reply With Quote
Unread 03-25-08, 11:56 PM  
kollektiv
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 46
Uploads: 6
Re: Re: Thumbs up

Originally posted by Sicks
how do you edit the spells lua folder?
Insert something like

["spellname"] = 1,

between the braces. 1 can be replaced with 2, 3, or 4.
Report comment to moderator  
Reply With Quote
Unread 03-25-08, 09:01 PM  
Sicks
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Re: Thumbs up

how do you edit the spells lua folder?
Report comment to moderator  
Reply With Quote
Unread 03-01-08, 06:38 PM  
Dotazeus
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
is there a way so I can move the frame? it's smack stab in the middle of my screen and I'd like to move it up a little. Thanks in advance!

*edit* hmm a new update with a slider .. I'll check it out later tonight.
Last edited by Dotazeus : 03-01-08 at 06:39 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: