Thread Tools Display Modes
06-06-10, 09:29 PM   #1
Borlaq
A Kobold Labourer
Join Date: Jun 2010
Posts: 1
Idea for a new addon, need LUA help.

Basically, i want to make a very simple, but yet very useful addon (atleast for me)

All i want to do, is to check if my target, or possibly focus target, casts a specific spell, and if he is targeting me with it.
I know boss mods already do that, however, what i want is a more specific warning, that stands out.

The addon is intended for Lich King's Defile.

My noobish coding skills, puts the whole function into something like this


Code:
onLoad {
	if bossN == Lich King {
		castDefile();
	}
}

function castDefile{
	if UNIT_SPELLCAST_START(Lich King, Defile)
		if UNIT_TARGET = SELF {
			"Big flashy warning on the middle of the screen"
		}
	}
}
I know this is not LUA, but it gives you a general idea of how i want it to work. Would also be nice with some customization options for it as well.

I hope someone is willing to help me with this. Who know's it might get popular
  Reply With Quote
06-06-10, 10:41 PM   #2
mankeluvsit
An Onyxian Warder
 
mankeluvsit's Avatar
Join Date: Sep 2008
Posts: 354
im pretty sure you cant make something cast spells for you.
only help you with spells.
  Reply With Quote
06-07-10, 03:14 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
It is theoretically possible.

Create a frame with a fontstring on it with a large fontsize and by default set alpha layer to 0 to in effect hide it from view.

Set up the aforeside event watcher to watch for the spell cast and change the alpha layer to 1 if the target is you. Whether the timing is possible to alert you before the cast is complete is another thing however.

The question is when to hide it again. Possibly when the target changes his target ( assuming you are targetting them at the time ) or focus or maybe boss but the latter is new and I don't know if it is a valid unit ID yet.


Of course the simplest thing is to use DBM and change the position of its warnings so that its in a spot you look at more often. I do this myself to watch for raid member problems so I am in the middle of my heal or they have a hot as the spell is cast.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
06-07-10, 04:20 AM   #4
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
I'm not sure what more you could want that a boss mod doesn't already give you. They already have flash & shake, a sound cue, and a text alert for the target.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Idea for a new addon, need LUA help.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off