Thread Tools Display Modes
07-05-10, 03:10 AM   #1
fuda
A Murloc Raider
Join Date: Jul 2010
Posts: 6
Raidframe with specific oor settings

Hi there,
I wanted to change my UI when i noticed that my current raid frame xperl seems to be the only one with a yard settings for out-of-range, but im getting attraced more and more by raid frames where i can change the design.
For my rogue I need a 20y out-of-range mode in the raidframe to see who is in range vor my tricks. The addons i used only had a setting to show whether they are in the 40y range for healers.

Summing-up:
I need a raidframe with a modifiable design and a setting to show who is in 20 yard range for my tricks (like a grey-out-function).
Anyone know such an addon?


Cheers, fuda
  Reply With Quote
07-05-10, 03:48 AM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
I believe Vuhdo might be able to do this. Iirc you can set a spell to let it fade out a frame if the spell is out of range.
  Reply With Quote
07-05-10, 03:52 AM   #3
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Most addons will use the API call UnitInRange which is based on a fixed ~40 yard distance.

You'd have to use the API call of IsSpellInRange to check the required distance, but this brings it's own problems:

- you must know the ability you are using to range check (e.g. priests could not check using "Tricks of the Trade" as the spell), so configuration based upon class/level and learned abilities could be tricky.
- the ability you are checking must be able to be cast upon the unit you are checking (e.g. checking healing spell range on an enemy unit will not work)


If you are up to a challenge, then try looking at writing/modifying an oUF layout as that will give you lots of flexibility. You will need to write your own range checking module though as the standard module uses UnitInRange.
  Reply With Quote
07-05-10, 04:58 AM   #4
fuda
A Murloc Raider
Join Date: Jul 2010
Posts: 6
ty 4 the answers.
ill try vuhdo later on.

This morning I installed stuf unitframes which has a range finder working with stuf_range -> LibRangeCheck-2.0.
They show the range with a text msg like "0 ~ 5" " 5 ~ 10" "10 ~ 15" etc.
Additionally you can set a condition "oor" in the text functions.

I looked through the code and found:

Code:
oor = function(ca, unit)
		if ( unit == "player" or not ca.assist or ca.dead or not UnitIsConnected(unit) ) then
			return false
		elseif ( not UnitIsVisible(unit) ) or
		       ( s40 and IsSpellInRange(s40, unit) == 0 ) or
			   ( not s40 and Stuf.ingroup and ca.ingroup and not UnitInRange(unit) ) then
			return true
		end
		return false
The "IsSpellInRange" function in the elseif-blog is the API-call you mentioned ? Because then I dont understand the "s40" string in the name-tag.

IsSpellInRange("name", "unit")
name - Name of a spell (string)
unit - A unit to target with the spell (string, unitID)
Quote from: http://wowprogramming.com/docs/api/IsSpellInRange

So s40 seems to be a spellname? is s40 spelldummy with 40y range for all classes and does s20 exists?


I also found a way to use "custom LUA-tags" in textboxes and by that (being optimistic) could show a text when beeing out of 20y range, but i'll try that if i fail with the code.

Hope you got some answers for me, because i have no clue which search terms to use for that problem.

Cheers


EDIT: found the s40 reference in the code *facepalm*
looks like the set typical spells for a lot of classes, but not for rogues. Ill change that and see how it works
Code:
		-- spell range setup
		if CLS == "PALADIN" then
			Stuf.supportspell = GetSpellInfo(635)
		elseif CLS == "PRIEST" then
			Stuf.supportspell = GetSpellInfo(2050)
		elseif CLS == "DRUID" then
			Stuf.supportspell = GetSpellInfo(5185)
		elseif CLS == "MAGE" then
			Stuf.supportspell = GetSpellInfo(475)
		elseif CLS == "SHAMAN" then
			Stuf.supportspell = GetSpellInfo(331)
		end

Last edited by fuda : 07-05-10 at 05:19 AM.
  Reply With Quote
07-05-10, 05:18 AM   #5
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
I think s40 is the variable that holds the id to a spell for your class with 40 yards range (for example, healing wave, holy light, heal, healing touch). Stuf uses the function you listed to determine if a unit is out of range by the following conditions:
- the unit is not a player, the unitobject is assist or dead (ca.dead, ca.assist, not sure what ca stands for exactly), or the unit is offline/disconnected.
- the model of the unit is not visible
- a 40 yard spell is given and the spell is not range
- you are in a group and the unit is not in range

It might be possible that you can override the 40 yard spell somewhere in the configuration screen from STUF, ask Totalpackage.

Last edited by ravagernl : 07-05-10 at 05:24 AM.
  Reply With Quote
07-05-10, 05:42 AM   #6
fuda
A Murloc Raider
Join Date: Jul 2010
Posts: 6
thx for your support, i posted a comment on his addonpage.
  Reply With Quote
07-05-10, 07:11 AM   #7
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
OpenRDX can easily do this, if I'm not too late to the party.
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
07-05-10, 08:06 AM   #8
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Since Blizzard provides coordinates inside instances you could use GetPlayerMapPosition(unitid) to calculate your exakt range to every single raid/party member.

Limitation: as far as I know there are no coordinates for vanilla/bc instances.

Should be easy to modify Grid (uses the InteractDistance and IsSpellInRange stuff atm) oder to create a simple Grid plugin for this. (as I think over it ... why isn't that implemented as default?)

I could provide you with some code. Just let me know.
  Reply With Quote
07-05-10, 12:49 PM   #9
cloudwolf
A Black Drake
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 87
I use shadowed unitframes. It has a lot of frame customization along with an option to grey out frames based on being out of range.
  Reply With Quote
07-05-10, 01:42 PM   #10
fuda
A Murloc Raider
Join Date: Jul 2010
Posts: 6
thx 4 all the answers
I added 4 lines to the stuf unit/raid frames and am very happy with them now.
Especially the customization is awesome. But since im an xperl-user everything with more than just one button to adjust scale seems awesome, so i will test more alts the coming days
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Raidframe with specific oor settings


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