Saturday, April 21, 2012

Need help extracting data from DamageMeters

Hi guys. So basically I'm venturing into the world of creating my first custom addon. I've been looking into using Ace2 as the library and basically the premise of the addon is that I want to utilize data from DamageMeters and create an addon that allows me to compare the damage from one weapon to another.

The way I want to go about it, is basically to fight 5 or 10 battles with a certain weapon. After each battle, I wanna save the current damage done and after 10 battles, I wanna average the damage from all the battles. This way, I figure I could get a base damage estimate of each weapon. However, the problem comes from extracting information from DamageMeters. I know it can write to a text file but I was having problems getting that to work.

Does anyone have any advice on how I could possible extract information from DamageMeters in order to use in my addon? Any help would be very much appreciated. Thanks|||(Moved to correct forum.)|||Any Ideas? I would really appreciate some input. Thanks|||I don't know ACE and I don't use Damage Meters. Why don't you just collect data from the combat log and make your own calculations?|||DamageMeters broadcasts data in some form over the addon communication channel so you could probably read what you want out of that. Though the easier method would be to check if DM has any easy get methods in it for the data which you can call. Otherwise hack some in yourself. Arguably easier method again (and probably better for the end user too) is just to parse the combat log yourself as Jumpy suggests.

Started with XML and kinda confused

Hi Guyz. i was trying to make a simple square of pixels in the screen, looking for different ways to dock it. But it seems my Xml files don't work at all. It visualize the square owever it always appear on the left side of the screen even if i told him to anchor on top enter or top right. What's is wrong with this ? Can you help or explain ?

Thank you much in advance.

Arngrim




Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<Script file="MyFrame.lua"/>

<Frame name="MyFrame" toplevel="true" frameStrata="BACKGROUND" movable="true" enableMouse="true" hidden="false" parent="UIParent">
<Size>
<AbsDimension x="350" y="100"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture file="Interface\TabardFrame\TabardFrameBackground">
<Size>
<AbsDimension x="350" y="100"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
MyFrame_OnLoad();
</OnLoad>
<OnEvent>
MyFrame_OnEvent();
</OnEvent>
</Scripts>
</Frame>
</Ui>
|||Moved as per the FAQ:
Quote:




Threads about finding, installing, using and troubleshooting mods go in the UI customisation Forum.

Threads about designing, coding and testing mods go in the UI Development Forum.

Threads about other topics should go in the relevant other forum.|||Quote:








Moved as per the FAQ:




Thank you for moving. Sorry to have posted in the wrong place. So anyone up on this ?|||You defined the frame to be moveable in your xml with


Code:
movable="true" enableMouse="true"

so why not complete your script and just move it to where you want it?


Code:
<Scripts>
<OnLoad>
this:RegisterForDrag("LeftButton")
this:SetAlpha(0.8);
</OnLoad>
<OnDragStart>
this:StartMoving();
this.isMoving = true;
</OnDragStart>
<OnDragStop>
this:StopMovingOrSizing();
this.isMoving = false;
</OnDragStop>
</Scripts>
|||Quote:








You defined the frame to be moveable in your xml with


Code:
movable="true" enableMouse="true"

so why not complete your script and just move it to where you want it?


Code:
<Scripts>
<OnLoad>
this:RegisterForDrag("LeftButton")
this:SetAlpha(0.8);
</OnLoad>
<OnDragStart>
this:StartMoving();
this.isMoving = true;
</OnDragStart>
<OnDragStop>
this:StopMovingOrSizing();
this.isMoving = false;
</OnDragStop>
</Scripts>






Basically because i want to let it pop exactly where i need or where i left it the last time the addon reloaded or frame popped. I could try to use the SetPOint() function, but I started brand new and i don't know how to set dynamic variables, and how anchor point are passed. I was wondering to do it later. It's possible that anyone don't know why i can't anchor a new frame exactly where i want ? I need just this information.|||Well here is one thing wrong


Code:
<Anchors>
<Anchor point="TOPLEFT">
</Anchors>

should be


Code:
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>

You left off the / after TOPLEFT

How do I create a button that can be dragged to the action bar ?

Hi,

I'm new to writing WOW AddOns.

I want to create a button that can be dragged to the action bar the same way items from the spell book or the inventory can be dragged and dropped into the action bar.

My question is: can this be done, and if so how ?

Thanks,

San|||You could create a macro that calls an addon. That macro icon could then be placed on the action bar.|||Thanks,

Yes I am aware of that option but that is not what I'm looking to do. For example I did that with SmartBuff, but the macro button does not get updated with the spell image the way the SmarfBuff button does.

I would also like to supply my AddOn with a popup that holds the various buttons so that they can be dragged to the action bars.|||I can't think of any mod that does this but you'd probably be best tryng to pillage someone else's code .|||Yeah I figured as such and run into the same issue myself (can't think of any). So my next thought was: "Find a forum of WOW AddOn authoring experts and ask them to point you in the right direction"...



Let's try a different approach: where will I find the most complete documentation for Blizz's framework objects / API ?|||http://www.wowwiki.com/Interface_Customization|||WowWiki has a decent API.

(EDIT: Jumpy beat me to it .)

Newbie Question: How to detect de-cloak events of monsters?

Hello,

This is my first attempt at an addon for WoW. I intend to develop a simple mod that provides a visual alternative (visual feedback) whenever the de-cloak sound is played ("Sound\\Spells\\Stealth.wav"). My reason: I know a number of players who miss the auditory cue due to a hearing impairment and therefore would appreciate a caption of some sort that communicates the stealth-sound visually.

I spend some time browsing tutorials and http://www.wowwiki.com/World_of_Warcraft_API but so far I haven't figured out how I can detect whether or not this sound file is triggered because of an enemy de-cloaking (like for instance Fen Creepers do - http://wow.allakhazam.com/db/mob.html?wmob=1040). Can anyone help me out?

Thank you!|||I don't think there is a way to detect sound events with the Blizzard API. If there is a message in the combat log about the mob becoming visible then you might be able to use that, but I don't know if there is.|||I just checked the combat log while walking around a Shadowmaw Panther (http://wow.allakhazam.com/db/mob.html?wmob=684) that was cloaking and de-cloaking, but there is nothing in the combat log unfortunately. I was thinking about maybe trying to use Unitfunctions (http://www.wowwiki.com/World_of_Warc...Unit_Functions) if that is possible. Does anyone know if this "cloaking"-behaviour (don't really what else to call it - "invisibility / stealth state"?) can be found using UnitBuff (http://www.wowwiki.com/API_UnitBuff) in some sort of way?

Thank you!|||You might able to do it in 2.3 when all target buffs will show up, but even then it'd still need to be your target/focus or a group member's target/focus (or some combination chain of targets from one of these units). And if it's stealthed then you generally can't target it so that won't really help.|||It may be possible to hook PlaySound(), have it check what sound is being played and do whatever you want if its the stealth sound.

I haven't tried hooking functions before, but this should give you the general idea:


Code:
local oldPlaySound;
function MyAddonLoad()
oldPlaySound = PlaySound;
PlaySound = MyAddonsNewPlaySound;
end
function MyAddonsNewPlaySound(sound)
if sound == "Sound\\Spells\\Stealth.wav" then
DEFAULT_CHAT_FRAME:AddMessage("Someone entered/left stealth!");
end
oldPlaySound(sound);
end

(Note this code is untested, may not work)

This assumes that blizz uses PlaySound() to play the stealth function, which I doubt they do.

Simple - How to identify the target??

Hi, I've searched the wowwiki and even screwed around but I can't seem to find the right variable. Here is some example code of what I'm trying to do:


Code:
if ("target" ==nil) then
WhatsTargetted = "Nothing";
elseif ("target" ~=nil) then
WhatsTargetted = "target"; -- This is what is always run, obviously
end;

if (WhatsTargetted ~="Nothing") then
SendChatMessage("I have you targetted", "WHISPER", this.language, WhatsTargetted);
else
DEFAULT_CHAT_FRAME:AddMessage("Nothing is targetted");
end;

I'm having trouble finding the variable that stores what the player is currently targetting. That same variable should be nil or "" if there is nothing targetted, right?

"target" obviously doesn't seem to be it..

Thanks so much in advance!|||Code:
UnitName("target")

Will return the name of the target (or nil for no target), if this is what you mean.|||Hi,

The solution towards finding out things about your current target is (mainly) the so called WoW unit functions. You can find an excellent summary here:

http://www.wowwiki.com/World_of_Warc...Unit_Functions

Each of these functions returns a specific piece of information about a unit. A unit is identified by a string and the string "target" relates to .... the current target. As mentioned int he privous reply the functions call "UnitName("target")" gives you the name of your current target, or nil if there is no target. As you can see there are some 30 to 40 other functions related to units that you might find useful.

Have a look here to find out what other units are supported by those functions:

http://www.wowwiki.com/UnitId

Skeeve|||Quote:









Code:
UnitName("target")

Will return the name of the target (or nil for no target), if this is what you mean.




This is exactly what I was looking for. Thank you!

Tooltips

Hi,

Could anyone give me a brief explanation of how they work? More specifically, what event tells the tooltip what to display? I can't find any explanation on wowwiki.

Cheers.|||Check out http://www.wowwiki.com/Widget_API#GameTooltip

Basically: You set the text of GameTooltip by GameTooltip:SetText("Title"), append with GameTooltip:AddLine("Some text"); and show it with GameTooltip:Show();|||Thanks Dinnerbone.

But what event triggers tooltips to show up in the game, say when you mouseover a mob or pet etc? And can that event be used in mods?

Cheers.|||In your xml, the OnEnter triggers it.


Code:
<Scripts> 
<OnEnter>
GameTooltip:SetText(text)
</OnEnter>
</Scripts>

http://www.wowwiki.com/API_GameTooltip_SetText

Or you have to hook some Blizzard function such as GameTooltip_ShowCompareItem(). I don't think there is any API event you can use.|||Ok thanks. So there's no way to detect specifically what mob or item in the world is under the mouse cursor? I found
Code:
GetMouseFocus()

but it just returns World frame no matter what the mouse is over.|||I don't know the answer. Maybe if you could describe what you are trying to do with your addon we can better understand what you need. Or maybe not. LOL|||I'm trying to make a basic hunter pet mod that displays extra pet info on the tooltip when you mouse over the pet. I have all the info sorted and can print it to chat or wherever, I just can't work out the tooltip bit. I can write to the tooltip, I just can't work out how to get it to show up specifically when the mouse is over the pet.|||If you look at the PetFrame in the FrameXML you will see


Code:
<OnEnter>
UnitFrame_OnEnter(self);
PartyMemberBuffTooltip:SetPoint("TOPLEFT", this, "TOPLEFT", 60, -35);
PartyMemberBuffTooltip_Update("pet");
</OnEnter>

You can look at the pet Lua and the pet xml here http://wdn.wowinterface.com/latest

You can see where or what function you might want to hook.|||Quote:








Check out http://www.wowwiki.com/Widget_API#GameTooltip

Basically: You set the text of GameTooltip by GameTooltip:SetText("Title"), append with GameTooltip:AddLine("Some text"); and show it with GameTooltip:Show();




Uhm, relatively random intermission here: would I be able to use some of this stuff to remove information from essentially all of my tooltips? Especially things like level and monster type? Maybe even names... though that'd leave awfully little tooltip, heh.

What kind of tooltip are we talking here? What kind of information is controlled by it? All "mouse-over" information? Just NPCs/PCs? What about items and such?|||Thanks guys,

I got it working using the event:


Code:
UPDATE_MOUSEOVER_UNIT

and
Code:
UnitName("mouseover") == UnitName("pet")

to see if my pet was under the cursor. Works nicely :)

English->Spanish Mod translation Offer!!!

Hi everybody, i'm a spanish guy who want to help the mod community, so as i don't own the needed skills to make a mod/addon, at least i can translate them to spanish language (you know, more languages=more potential users=more downloads :P ). If you are interested in my help, just send me a pm and i'll answer as soon as possible.

P.S.- I don't use any automatic-translation software or stuff like that :)|||Quote:








Hi everybody, i'm a spanish guy who want to help the mod community, so as i don't own the needed skills to make a mod/addon, at least i can translate them to spanish language (you know, more languages=more potential users=more downloads :P ). If you are interested in my help, just send me a pm and i'll answer as soon as possible.

P.S.- I don't use any automatic-translation software or stuff like that :)




Hey man, just a suggestion but, have you tried localizing the addons you have? Its actually a pretty decent way to get familiar with code...

They are all text files, you should be able to scan for the english text and write in the replacement text instead. Thats actually not good coding practice, and the code should be properly localized but that is a little more involved and this is something you could start right away. If you offer up your edits to the person who did the addon they might offer it as a seperate version.

And if not, at least you friends will have a spanish version to use.

delay in lua

Hi

I'm trying to write a mod to output multiple lines of text to the chat channel and was trying to find out a way of putting a delay (say 5 seconds) between each line|||Code:
function ActionButton_OnUpdate()
if (MyAddon_LastTime == nil) then
MyAddon_LastTime = GetTime()
else
if (GetTime() >= MyAddon_LastTime + 5) then

-- Do stuff here every 5 seconds --

MyAddon_LastTime = GetTime()
end
end
end

You have to drive this kind of code by hooking events or use an On_Update from a frame. I use the Blizzard bar function ActionButton_OnUpdate() which is driven MANY times a second.|||Be carefull with using OnUpdate() though... That code is processed multiple times per second, so it needs to be as light as possible.

Better to trigger off of events, but from what you're describing, yes, OnUpdate is your trigger...|||The problem with triggering from events is that you might not get one for more than 5 seconds, or whatever time measurement you want to use. The only way to have complete accuracy ,as far as timing goes, is to use an On_Update. If time accuracy is not important to what you are trying to do then yes, hooking events is the way to go.|||Thanks guys tried the OnUpdate() and it works nicely , will try the OnEvent handler later to see how they compare|||You may want to count passed time yourself using first argument for OnUpdate handler. I didn't check how heavy GetTime implementation is, but addition and getting two variables from local stack is sure to be faster than table lookup (function is in _G) and function call.

BTW, you can hide frame with OnUpdate handler when you no longer need to watch delay to stop receiving updates and nullify any performance penalty and bring it up again when you need it. In that case you wouldn't have to worry about microsavings much.|||A neater timeout function looks like this:


Code:
function fnBGW_OnUpdate(arg1) -- arg1 is in secs so may me small like 0.020s

glb_elapsedTime = glb_elapsedTime + arg1;

if(glb_elapsedTime >= TIME_TICKS) then
glb_elapsedTime = glb_elapsedTime - TIME_TICKS;
fnBGW_TimeOut();
end
end

The argument to OnUpdate is in secs so it may be small 0.020 (50Hz). Arg1 is time elapsed since last call to OnUpdate. This one saves a call to GetTime else it's the same|||I've been trying every timeout method I could find.

The ones posted here do not work in my application.

The GetTime() looked a little closer, but I only need a one time 5 second delay.

Here is was I need to wait 5 seconds before executing.


Code:
function LevelUp_OnEvent(event)
if ( (event == "PLAYER_LEVEL_UP") ) then
playerName = UnitName("player");
levlup = UnitLevel("player");
SendChatMessage("DING! "..playerName.." has reached level "..levelUp.." !", "GUILD", mylang, "");
end
end

This code is getting the level info too fast, and reporting the LAST level not the level gained.

I've used levelup = UnitLevel("player")+1;

as a temporary fix.

But I worry that if used on a slow comp, or lag comes into play it might report the level wrong (one level up).

Would like to just see this wait 5 seconds before execution, then the level info gathered should be the new correct level.|||Quote:








I've been trying every timeout method I could find.

The ones posted here do not work in my application.

The GetTime() looked a little closer, but I only need a one time 5 second delay.

Here is was I need to wait 5 seconds before executing.


Code:
function LevelUp_OnEvent(event)
if ( (event == "PLAYER_LEVEL_UP") ) then
playerName = UnitName("player");
levlup = UnitLevel("player");
SendChatMessage("DING! "..playerName.." has reached level "..levelUp.." !", "GUILD", mylang, "");
end
end

This code is getting the level info too fast, and reporting the LAST level not the level gained.

I've used levelup = UnitLevel("player")+1;

as a temporary fix.

But I worry that if used on a slow comp, or lag comes into play it might report the level wrong (one level up).

Would like to just see this wait 5 seconds before execution, then the level info gathered should be the new correct level.






When the PLAYER_LEVEL_UP event occurs, then the details you need are actually passed as arguments, and the NEW Player level can be found in arg1 so you shouldn't need any delaying mechanism if I have understood the thread (?)...


Code:
function LevelUp_OnEvent(event)
if ( (event == "PLAYER_LEVEL_UP") ) then
local playerName = UnitName("player");
local levlup = arg1;
SendChatMessage("DING! "..playerName.." has reached level "..levelUp.." !", "GUILD", mylang, "");
end
end

Other useful information is passed in the other default args, such as how much Stamina increase they earned that level...

Check out http://www.wowwiki.com/Events_P_(Par...rBank,_Player)

and scroll down to the PLAYER_LEVEL_UP event...

["icon"] = "Circle" help me

I have been messing around working on an add-on for some friends. I am a newb to programming language and am stuck here. for my quest givers and poi's i have been using ["icon"] = "Circle" what I would like is a clear ring similar to what gatherer uses when you mark a node so what would my icon be for that? Please help.

example:

["info"] = "If you are having trouble finding this guy, he wanders around on the top floor of the inn",

["titleCol"] = 13908198,

["icon"] = "Ring",

["title"] = "Innkeeper Thulfram",



The info section pops up on screen when you mouse over it on your mini map or reg map. My problem is using "Circle", or "Ring" creates a opaque symbol over the quest giver on the mini map and you cannot see the default gold dot. Like when you have gatherer and you can see an active node inside the clear circle.|||Download Gatherer and look in the Shaded folder. There you will find several .tga files that Gatherer uses to impose those circles over the minimap.

sqlhelper problem

hey im just instaled mod its looks cool but i get this eror on news page

Warning: mysql_connect(): Unknown MySQL server host 'dbserver' (1) in /home/content/a/t/i/atilla03/html/bp/itemstats/includes/sqlhelper.php on line 30

string(39) "Unable to connect to SQL host: dbserver"

pls help :|

Problems when highlighting text

I've been writing a mod to pull data out of wow onto notepad. To achieve this the mod puts all the data into an edit box from which you can cut and paste to wherever you want.

What I have at the moment is:

GetDataText:SetText(DataList);

GetDataText:SetFocus();

GetDataText:HighlightText();

GetDataDlg:Show();



The highlight seems to cause all the text to become selected because I can then Ctrl-C and then paste somewhere else and that all works fine. But the text is not shown as highlighted.

Even more weirdly if I run the app again the second time I show the EditBox the highlighting is shown. I've been put a ton of debug messages in and it seems to me that what I need to do is on my first pass through, after calling HighlightText() is get an OnCursorChanged event to be triggered for my edit box.

I've tried calling the function within the XML :

<OnCursorChanged>

ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);

</OnCursorChanged>

and that does nothing. So my guess is that it's some default functionality which is part of all edit boxes.

Can I just send an event to my edit box? I cannot find any function that will do that for me.

Or does anyone know of another way round my problem.

I'll be grateful for any help people can offer|||Quote:








I've been writing a mod to pull data out of wow onto notepad. To achieve this the mod puts all the data into an edit box from which you can cut and paste to wherever you want.

What I have at the moment is:

GetDataText:SetText(DataList);

GetDataText:SetFocus();

GetDataText:HighlightText();

GetDataDlg:Show();



The highlight seems to cause all the text to become selected because I can then Ctrl-C and then paste somewhere else and that all works fine. But the text is not shown as highlighted.

Even more weirdly if I run the app again the second time I show the EditBox the highlighting is shown. I've been put a ton of debug messages in and it seems to me that what I need to do is on my first pass through, after calling HighlightText() is get an OnCursorChanged event to be triggered for my edit box.

I've tried calling the function within the XML :

<OnCursorChanged>

ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);

</OnCursorChanged>

and that does nothing. So my guess is that it's some default functionality which is part of all edit boxes.

Can I just send an event to my edit box? I cannot find any function that will do that for me.

Or does anyone know of another way round my problem.

I'll be grateful for any help people can offer






Some random thoughts.... ;)

In other words, I'm not sure why your problem happens, but these are some things I'd be considering...

1.)

Have you tried the SetText and Highlight AFTER the :Show() ?

OR

You could try the SetText after the :Show(), and put the Highlight() in the EditBox's OnUpdate function.... ?

( This relates to the suggestion about the ScrollingEdit_OnUpdate function below... )

2.)

If your EditBox is part of a ScrollChild then I think you do need the XML you mentioned above, but you also need to call a default <OnTextChanged> function and OnUpdate function too ...although if you are only ever filling the edit box via code and the user isn't ever manually editing it then maybe its not important.


Code:


<OnTextChanged>
ScrollingEdit_OnTextChanged();
</OnTextChanged>
<OnCursorChanged>
ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);
</OnCursorChanged>
<OnUpdate>
ScrollingEdit_OnUpdate();
</OnUpdate>

3.)

Have you set your EditBox to autofocus="true" ?

It might be worth a try....

4.)

Finally, its just a thought, but have you tried Hiding, and then Showing your EditBox again

to refresh it....based on your comment about the text being highlighted the next time you run it....although this is just me thinking about that autofocus feature again really...|||Thanks for all of those Telic. I've tried them all. No luck I'm afraid, but thanks for the suggestions.

I tried using ResetCursor() today that does send an OnCursorChanged event, but still no joy with the display so back to the drawing board. You may be right in that the ScrollChild could be responsible for updating the selected shading. So I'll try putting all my debug messages there, rather than the edit box, next time I get a chance to play :o)|||Prat displays URLs in a pop up box and the text is highlighted, you could check how it's done there.|||Can I see your entire frames xml?|||Quote:








Can I see your entire frames xml?




It still needs alot of work on the focusing and the like, but I'm hoping that isn't my problem. Anyway here it is:


Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<!-- Lua Scripts -->
<Script file="GetData.lua"/>

<!-- Frames -->
<Frame name="GetData_MainFrame">
<Scripts>
<OnLoad>
DEFAULT_CHAT_FRAME:AddMessage("Adding Slash XML",1,1,1);
GetData_OnLoad();
</OnLoad>
</Scripts>
</Frame>


<Frame name="GetDataDlg" toplevel="true" parent="UIparent" movable="false" resizable="false" enableMouse="true" hidden="true" enableKeyboard="true" frameStrata="DIALOG">
<Size>
<AbsDimension x="450" y="350"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
</Backdrop>
<Frames>
<Button name="GetDataButtonClose" inherits="UIPanelButtonTemplate" text="Close">
<Size>
<AbsDimension x="75" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-20" y="20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
GetDataDlg:Hide();
</OnClick>
</Scripts>
</Button>

<ScrollFrame name="GetDataScrollFrame" inherits="UIPanelScrollFrameTemplate">
<Size>
<AbsDimension x="390" y="255"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="18" y="-18"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="GetDataScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
<Size>
<AbsDimension x="31" y="156"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="0" y="5"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
</Texture>
<Texture name="GetDataScrollBarBottom" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
<Size>
<AbsDimension x="31" y="106"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
</Texture>
<Texture name="GetDataScrollBarMiddle" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
<Size>
<AbsDimension x="31" y="60"/>
</Size>
<Anchors>
<Anchor point="TOP" relativeTo="GetDataScrollBarTop" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
<Anchor point="BOTTOM" relativeTo="GetDataScrollBarBottom" relativePoint="TOP">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0" right="0.484375" top=".75" bottom="1.0"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnTextChanged>
ScrollingEdit_OnTextChanged(GetDataScrollFrame);
</OnTextChanged>
<OnCursorChanged>
ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);
</OnCursorChanged>
<OnUpdate>
ScrollingEdit_OnUpdate(GetDataScrollFrame);
</OnUpdate>
</Scripts>
<ScrollChild>
<EditBox name="GetDataText" autofocus="true" multiLine="true" letters="12000">
<Size>
<AbsDimension x="541" y="234"/>
</Size>
<Scripts>
<OnTextChanged>
ScrollingEdit_OnTextChanged(GetDataScrollFrame);
</OnTextChanged>
<OnCursorChanged>
ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);
</OnCursorChanged>
<OnUpdate>
ScrollingEdit_OnUpdate(GetDataScrollFrame);
</OnUpdate>
</Scripts>
<FontString inherits="ChatFontNormal"/>
</EditBox>
<Scripts>
<OnTextChanged>
ScrollingEdit_OnTextChanged(GetDataScrollFrame);
</OnTextChanged>
<OnCursorChanged>
ScrollingEdit_OnCursorChanged(arg1, arg2, arg3, arg4);
</OnCursorChanged>
<OnUpdate>
ScrollingEdit_OnUpdate(GetDataScrollFrame);
</OnUpdate>
</Scripts>
</ScrollChild>
</ScrollFrame>

</Frames>
</Frame>


</Ui>
|||Quote:








Prat displays URLs in a pop up box and the text is highlighted, you could check how it's done there.




hehe on first scan I thought you were insulting me ;o)

I downloaded Prat and gave it a try. Am I right in that the URL pops up in an separate box with just a single line of text. If so I'm not sure it helps. I stole some similar code from Deadly Boss Mods to base mine on. My problem seems to be the volume of text I'm trying to highlight. If I just populate a couple of lines in the edit box they get highlighted fine. But what I'm trying to do involves hundreds of lines of text, the start of which is beyond the top of the scroll box and has scrolled off. I'm wondering if I'm actually trying to get the UI to do something for which it was has never really been tested :o/

K|||Yeah it's just the URL on a single line as you say, ah well figured it was worth mentioning, hope you get it working :) .|||This 'probably' won't help with your problem but just to clarify my earlier point...

The "ScrollingEdit_On..." Scripts only need to be set for the EditBox. (i.e. within the EditBox tags)

Not for the ScrollFrame or the ScrollChild

I'm not sure what the consequences would be of trying to add those scripts to all 3 - it probably just generates FrameXML errors, and skips 'em when not needed...

Anyway, sorry the suggestions didn't help - don't forget to post the solution if you do find one ;)|||Quote:








This 'probably' won't help with your problem but just to clarify my earlier point...

The "ScrollingEdit_On..." Scripts only need to be set for the EditBox. (i.e. within the EditBox tags)

Anyway, sorry the suggestions didn't help - don't forget to post the solution if you do find one ;)




No worries. This wasn't my inention for the final XML, I just went mad (mainly with desparation) and dumped the handler stuff all over the place. Thanks for pointing out that it was still there, I'll take it out again

Thanks for all the help and don't worry if I ever solve the problem I'll let you know

Checking for combat

I was wondering if anyone has any idea on how to determine a) whether or not a player is in combat and if so b) if the unit they are attacking/being attacked by is an npc boss, like an in instance. I'm trying to create an auto-reply system for whispers but I can't get UnitAffectingCombat to work. Sorry if that was confusing, and thanks in advance.|||Quote:








I was wondering if anyone has any idea on how to determine a) whether or not a player is in combat and if so b) if the unit they are attacking/being attacked by is an npc boss, like an in instance. I'm trying to create an auto-reply system for whispers but I can't get UnitAffectingCombat to work. Sorry if that was confusing, and thanks in advance.




There has always been an option in AlphaMap to hide the map during combat, (and re-open it when combat is over).

It does this by monitoring for the "PLAYER_REGEN_DISABLED" and "PLAYER_REGEN_ENABLED" events, and has always seemed pretty reliable to me. I haven't tested what happens when a player has special buffs/abilities that allow some regeneration during combat, but I suspect they will still receive these events.



For determining target details you could try the following :

UnitClassification should report "worldboss", "rareelite", "elite", "rare",........

http://www.wowwiki.com/API_UnitClassification

and

UnitLevel should report -1 when unit is a special boss (whatever that means...)

http://www.wowwiki.com/API_UnitLevel



Other people may have better suggestions :)|||Quote:




UnitLevel should report -1 when unit is a special boss (whatever that means...)




If I remember correctly this means that the target is a "Skull" level monster so it should work for what you're trying to detect here.

For reference, the skull means it pretends to be three levels above you regardless of your level (in terms of hit/resist chances but its health/mana/damage/etc stay the same).|||Not sure if it will work in all situations but I'm currently using InCombatLockdown() to check for combat status.|||I can't remember the name of the mod right now, but there is an answering machine type addon that takes your messages when afk, but also auto-replies to tells during combat. The one I saw replied with the name of the boss you were fighting as well. Anyone remember the name of that mod?|||Thank you for the help, I've managed to detect whether the player is in combat with a boss in order to determine if an auto-reply is needed. I've been working on a few keyboard replacements (eg %HP for Boss Health Percent) but can't seem to get it work right.


Code:
autoreply=string.gsub(autoreply,"$B" , UnitName("target"));
autoreply=string.gsub(autoreply,"$P", UnitName("player"));
autoreply=string.gsub(autoreply,"$HP",((UnitHealth("target")/UnitHealthMax("target"))*100).." %");

Which returns the correct number as a percentage, and allows for other things to be added after it, but the % sign is always mysteriously missing, any ideas?

For example, if you type "$P is fighting $B, who has $HP health left. Try again later."

This is returned: "Dinarin is fighting Pygmy Venom Web Spider, who has 100 . health left. Try again later."|||Since it is a pattern do you need to code it this way, with an extra % sign? Pattern matching confuses me so I am just guessing since % is a "magic" character.


Code:
autoreply=string.gsub(autoreply,"$HP",((UnitHealth("target")/UnitHealthMax("target"))*100).." %%");
|||Yes, you need to escape it somehow, but I'm not certain on how you do that in Lua.|||Quote:








Since it is a pattern do you need to code it this way, with an extra % sign? Pattern matching confuses me so I am just guessing since % is a "magic" character.


Code:
autoreply=string.gsub(autoreply,"$HP",((UnitHealth("target")/UnitHealthMax("target"))*100).." %%");






That did it, thank you very much. Now I just have to make sure my conditions to test for raid/5-man bosses are correct lol.|||I think this is the problem... Some "magic characters" (such as %) have special uses in LUA. These are:

^ $ ( ) % . [ ] * + - ?

To use these in a pattern you have to precede them with a % symbol. So for example, "%%" would match a single %... lol, just saw that Jumpy beat me to this:)

Mod to Suppress Quest Progression Messages

I was wondering if it were at all possible for someone to create (if one is not already made that I am unaware of) a mod to block the Quest Progression Messages that come up. i.e. "Quest Crystals: 5/8" that come up. I am using nQuest Log and like how they're progression text comes up but cannot find a way to turn off the other one.

layers in .lua

Hi,

I have a little issue with my minimap and my UI frames which i have configured using Ten UI mod. Im using lua to make frames and attach frames to minimap, omen, SW damage meters etc. But when im moving my minimap over one of the frames the border is crossing over the minimap. I wonder if i can make a higher layer or priority of the minimap such that it gets over the borders.

Screenshot of the current:

large image of the UI



First time posting on these forums so be gentle :)|||Have fun messing about with frame:SetFrameLevel(level)

Example:


Code:
MyMinimap:SetFrameLevel(100)
|||Figured out the porblem. It was a nasty little addon called Bongos MapBar which caused all the trouble. :)

thank you for the response though

Healbot

Any chance someone might be working on updating the Healbot mod since the latest patch?

Customizable guildbank pricer (is there one? is it possable?)

I am looking for a mod that will make adjustments for item prices out of a guild bank

example

Greens = Vendor price + 5%

Blues = vendor price + 50%

Epics = Vendor price + 110%

then reports this price to the user somehow.

If there is a mod out there that already does this, please let me know.

If there is no mod out there, but it is possible, Please let me know.

Thank you in advance for all your help =)

Learning lua

Could some one help with learning lu? More specifically where to go to learn it. I've been looking around wowwwiki a lor.



Thanks for any help.|||http://www.lua.org/pil/

http://www.lua.org/manual/5.1/manual.html

Chat Throttling Question...

As I understand it, the new 2.3 chat throttling limits are something like 10 messages every ten seconds, correct? So you can send ten lines at once so long as you wait ten seconds before sending the next batch.

I have an addon that (is supposed to) report missing buffs in raid/party/whatever chat. One at a time is no problem, but trying to use the "report" function, which sends out five lines in one fell swoop, doesn't always work. Reporting to a custom channel works fine, but it gets throttled in raid or party chat.

Am I wrong about the throttling mechanics?|||My understanding is the same as yours regarding the 10/10 sec rule but I thought raid/party chat was exempted. But I haven't tested any of that.|||I thought that too, Jumpy, but then my first line prints and nothing else:(|||Iriel posted this in the Blizz UI and mods forum.


Quote:




* Each chat channel is limited separately, at a rate of 10 messages in 10 seconds. This means that you can send one message every second without ever seeing delays, or a burst of 10 messages every 10 seconds without seeing delays. Messages that exceed this rate are not dropped, but simply delayed in order until they can be sent. (This does not affect SendAddonMessage() or party/raid/guild chat. )




But I did not see anything about this in the patch notes. So either it was not properly implemented, or what he said was incorrect, or something is wrong with your code(?).|||It is always possible something is wrong with my code:) but it worked fine pre-2.3, so that's not my first thought. Also, it works fine in self and custom channels. I'll check through it again, but I'm wondering if chat throttling is not completely fixed yet...|||Maybe you should post the question on the Blizzard UI forums.|||Thanks Jumpy, but I did post there with no luck.

Rarefinder

Is anyone working on the mod update for RareFinder by chance? I LOVED that mod but it isnt working and hasn't been for several patches.|||Quote:








Is anyone working on the mod update for RareFinder by chance? I LOVED that mod but it isnt working and hasn't been for several patches.




Well..... it's strange, this addon. Mine is out of date and says so, but when I check 'enable out of date addons' or something like that on the addon screen, it now works fine for me. I don't understand why.....|||when it says Out of Date on the addons screen it just means that the toc version dosnt match that of the actual game, some mods have been out dated since version 1.2 but still work.

Mh to Oh

I would like to know, how to put a dagger in mainhand when i stealth, and when i breakstealth use the sword on mainhand.

ty|||Presuming that you're dual-wielding and want to switch weapons between hands, you could use this macro:

/script PickupInventoryItem(16); PickupInventoryItem(17);

/cast Stealth

The first line switches weapons between your hands (presuming that you're not using a main-hand-only weapon in your main hand!). The second should put you in stealth if you're not in it, and take you out if you are.

Note that the first line will always go, even if you can't go into stealth -- so you could wind up switching weapons, then not going into stealth because you can't right then.|||thanks for reply, although i found an awsome add-on called. ShadowDancer 2

question

anyone know the name of the mod to show quest coordinates of where the objectives are located?? thought it was atlaswuest but that only works for instances and dungeons|||HK_QuestInitiators

Odd Buff Detection Problem...

Hi Folks,

I'm having an odd buff detection problem and I'm wondering if anyone has any ideas/similar issues for resolving it.

My buff tracking mod is picking up regular buffs like AI, PWF, MotW, and Fort with no trouble. It is also tracking other buffs like Well Fed and Mage Armor beautifully. What it isn't tracking are some other secondary buffs like Amplify Magic, Dampen Magic, and Mana Shield. (There may be more such buffs but those are the ones I notice on my mage.)

I'm using the exact same code/process, I'm using the precise names displayed by the buff, yet, no joy. Has anything about these buffs changed recently? Can anyone think of another reason these particular magic buffs wouldn't track while other magic buffs do? Thanks:)|||what buff mod are you using would be a help.|||I'm using BuffBuddyBC, but I think it was some kind of temporary glitch due to lag, perhaps. Last night it worked with no problems at all.|||have u looked at Elk Buff Bars you can find it at wowace.

Conditional Macros

Hi Folks, I'm trying to write a macro to conditionally run a mod command. I understand how to write conditional macros, and I know how to script mod commands, but I can't seem to figure out how to do both.

And example:

I want to equip my Outfitter DPS suit when I switch into shadowform

/cast [stance:0] Shadowform

/outfitter wear DPS

/cancelaura [stance:1] Shadowform

/outfitter wear Healing

Obviously lines 2 and 4 are not perfect. I only want to run line 2 if stance is 0 and run line 4 if stance is 1.

Any help would be appreciated.|||You can't use conditional logic in macros, apart from the simple conditions used in /cast and /castsequence. Anything else Blizzard considers botting and can permaban you.|||Not true at all. You can use condionals in macros but you have to do it through a lua script and it won't work combat.|||that's easy to do, but can only be done properly if you have Supermacro. Here's how:

Shadow Macro

/cast [stance:0] Shadowform

/equip "dps gear" /script SetActionMacro( lastActionUsed, Heal)

Heal Macro

/cancleaura [stance:1] Shadowform

/equip "healing gear" /script SetActionMacro( lastActionUsed, Shadow)

Set one macro on a hotkey. Now, everytime you run one, they'll switch.

This can also be done for driud using the same idea.

Let me know if it works for you.

Note: this is NOT conditional logic, as it does not check for a condition to make a decision.|||Why??

Outfitter already has special outfits for all stances. Simply use the facilities provided by the addon rather than trying to work around it with macros. ie: In outfitter scroll down to the bottom of the list and find Shadowform, then setup the kit you want there then Outfitter will do the job for you no macros required.

Idea for a Titan addon

Well, quite literaly, i was wondering if there could be a mod made for titan that shows the exact speed percentage that a char has on him currently.

possible?|||I think this would be possible and fairly simple to do given the limited number of items that affect speed. I don't use Titan but I'm sure it has an item bonuses module that might already have this.|||Quote:








I think this would be possible and fairly simple to do given the limited number of items that affect speed. I don't use Titan but I'm sure it has an item bonuses module that might already have this.






It does have a bit of a one, but it just says either "Mounted" or "On Foot"

So, this should be able to work..

the only two things that might make things harder would be the paladin talent 8% speed boost (that gets cancelled out by other things, so im assuming any other boost over 8% will get rid of it) that makes me think that is there is an 8% speed boost trinket, and you have this talent, its kinda pointless to use the trinket :/ so anything under 8% becomes pointless, and of course there are all the other unstackable speed boost trinkets etc..

should be fiun!|||There used to be one which worked on Titan called MonkeySpeed.

Fubar has SpeedFu.|||A little off topic (sorry)

Someone should recode titan. It makes too much garbage, and (for me) hogs FPS. Other than that it's fine.|||in the latest update Titan release TitanPerformance has a garbage collection ability.|||Quote:




Someone should recode titan. It makes too much garbage, and (for me) hogs FPS. Other than that it's fine.




This is why Fubar exists.|||There used to be one but was never updated.|||There is an addon that does precisely this its called TitanSpeed (wow there's a surprise). It works perfectly with patch 2.3 as I am using it now.|||I used Titan for ages, but FuBar is really superior. Some parts are updated everyday, and if you use the wowace-updater, your life will be a lot easier.

Advanced Guilding

I have a dream! ... and then I stop to think, and realised I don't know squat about LUA, and only a tiny bit about XML.

Playing with the idea of learning both, since I have got lots and lots of time on my hands nowadays anyway. But yeah... time seems to pass like a speeding train nonetheless, so I can atleast share my idea, and hope someone other than me actually likes it.



Onwards to the idea(s)

We can start with the basic guild permission structure.

Personally, I think the current system sucks, and defenetly not in a positive way. Every permissionsgroup is a rank, and people can get has to go trough aaaall the ranks to get to the one they want, and ofcourse this is shown to the rest of the guild. I want to have special ranks, that people can just get! without being demoted or premoted. And I don't really want to use the public note for that.

(and really, why does a new rank you make always have to end up on the bottom of the ranklist?! )

My idea is pretty much to make a new rank system, layered ontop of the real one, since you ofcourse can't change the whole engine. You need to work around it. If possible.

So my first question is this: Is it possible to make the console *not* tell everyone when a person is demoted or promoted?

You could give a user seperate permissions, and it'd make a seperate rank in the games system for that user, shuffle around on the other ranks. Or assign a rank with the specified specs, and have it hide the real rank. And show the rank given by the Advanced Guilding interface. it *should* be doable. it's just take a good bit of decent programming.



Another thing, is the newly arrived guildbanks. Awesome as they are, they are also a little limited in their features. Since not all can withdraw items, I want a request item interface. Where people without withdrawing rights from e.g a equipmentstab, can request an item. And where people with the right permissions, can approve of this request. And then manually take it out of the bank, and send it to the person who requested it. Or deny the request.

Maybe also enable the guild to put prices on the guildbank items. Some guild operate with free stuff, some don't.



The addon also handle sharing of tradeskills of the guilds crafters. So you can assign people as crafters, and the addon would register what they could make, and transfer the information. And you'd be able to request that a crafter makes this and that item for you. And if your guild doesn't do crafting for free, the crafters could edit the tradeskill and say how much they'd want for that item, with and without materials.

The addon would also handle event planning, signups, and so on.



I'd love it, if this Addon cooperated with a downloadable website suite.

Maybe then you could also make the addon handle guild recruiting, if someone wrote an application in the guild websuite, it'd alert people with the right permissions ingame, and they could accept/deny the application, ingame. And if the application was accepted, check if the user is online, and invite. If the user wasn't online, the addon would check on intervals, and invite when the user who needs the invite is online, and a person who *can* invite is online.



-------

Another thing I'd personally want, is a voluntary guild"tax" addon, which lets you specify that a % of whatever you make after you enable the addon, goes into a guilddonation "piggybank". and it'll deposit the amount when a member visits a guildbank, and empties the "piggybank" to restart the moneycount.

^ I'm thinking of making that last bit my first LUA / XML project...



And I'm hoping whatever I wrote here made sense to most of you.

Feel free to add comments, and more ideas. I'd love to hear it all.|||Quote:




So my first question is this: Is it possible to make the console *not* tell everyone when a person is demoted or promoted?




no - its possible to make it not show for your self but for the rest of the guild not to see would require the whole guild using the same addon


Quote:




You could give a user seperate permissions, and it'd make a seperate rank in the games system for that user, shuffle around on the other ranks. Or assign a rank with the specified specs, and have it hide the real rank. And show the rank given by the Advanced Guilding interface. it *should* be doable. it's just take a good bit of decent programming.




again not possible , you cant affect other guild members UI (inc what they see in chat from system messages ) so to hide a rank and show a different one in its place the whole guild would have to have the addon. same for the rest of your requests.


Quote:




I'd love it, if this Addon cooperated with a downloadable website suite.

Maybe then you could also make the addon handle guild recruiting, if someone wrote an application in the guild websuite, it'd alert people with the right permissions ingame, and they could accept/deny the application, ingame. And if the application was accepted, check if the user is online, and invite. If the user wasn't online, the addon would check on intervals, and invite when the user who needs the invite is online, and a person who *can* invite is online.




an addon cannot communicate with with 3rd party software i.e. anything not world of warcraft. and vice versa an external program cannot communicate with an addon, this is a ban able offense.

some great idea, as a guild leader myself i wish they were possible esp the ranks idea, best thing go on wow sugestions forum and post there.|||Quote:




an addon cannot communicate with with 3rd party software i.e. anything not world of warcraft. and vice versa an external program cannot communicate with an addon, this is a ban able offense.




I don't see how this is not possible? we have thottbot, wowhead, and profiler addons that work with 3rd party programs, and I don't see any of those being banned :)



Also, the point of the guildaddon would ofcourse be to have all the guildmembers in the guild use it. But in theory, it is all possible, you just need everyone to use the addon.

But yes, I will go to the WoW suggestions forum, and post about a change in the Guild management interface^^



Thanks :)|||the profiler addons store what ever informations they gather in their sv's and the programs simply read whats in there and upload it where ever it is told to upload them. there is no direct interaction between the addon and its profiler part.|||Quote:




the profiler addons store what ever informations they gather in their sv's and the programs simply read whats in there and upload it where ever it is told to upload them. there is no direct interaction between the addon and its profiler part.




Ah, did not know. But it's still possible to do I guess, just not as perfectly as I had first imagined. You'd get updates everytime someone logged in though, if they had the client that operates with the site running.|||Skimming through your post, your ideas are very possible.

For custom permissions: It would require the guild leader to be online, but you can have the members addon send a message to the leaders addon asking to do xxx, and the leaders addon could do the action for them if they are allowed.

About professions: Heh, I already have an addon out that does that (and gear, talents, etc) - check the site for "Twilight Member" (not updated since 2.3 because I'm planning a big update)

About the guild bank: Very tricky... Can't think of any ideas from the top of my head.

And finally, recruiting: You answered that one in your last post =D|||Quote:




About the guild bank: Very tricky... Can't think of any ideas from the top of my head.




Shouldn't be much different than the functionality of DuckieBank. Where you have alternate characters as bankers, and they send off information about what is in the bank to other people with the DuckieBank addon, who can then request items. And the banker character gets the requests, and then the banker char takes the item and mails it to the person who requested it.

Just need to make it work with the new guildbank instead, and not the alternate character bankers.

I just need to learn lua and XML first! =D|||Quote:








Just need to make it work with the new guildbank instead, and not the alternate character bankers.




That's the tricky part. You can have it read every item in the bank and send that data easily enough, you can even have it take out certain items on request, but it would be an ugly system.|||Quote:








That's the tricky part. You can have it read every item in the bank and send that data easily enough, you can even have it take out certain items on request, but it would be an ugly system.




It doesn't really need to read what items are in the bank, if requesting of items is done on a visit to the actual guildbank, does it?

But it would be neat if you always knew when there was new items in the bank and stuff, and could do the requesting on the run though.



Please note I have no idea how things actually work yet, I'm just throwing ideas into the air. :)|||Hmm, not sure what I was thinking when I said about having it read items in the bank, I must have misread your post.

It is possible to have an addon that sends a request to the leader of the guild (its really the easiest way to have addons request to the leader/GM, it avoids complex problems) if the person doesn't have sufficient privileges to withdraw an item from the guild bank, and the GM could handle it from there.

Oh, your other idea about guild banks and putting prices on items - you could write an addon to ask the person for a *voluntary* donation whenever he/she withdraws from the bank, but there would be no way to force them to pay up as they could just disable the addon and withdraw as normal.

XML and LUA

Quick question, is it possible to make a table of references to XML fontstrings, sliders, text-boxes in lua?|||http://home.blarg.net/~tyroney/wow/uitutorial/

is this what your looking for?|||Quote:








http://home.blarg.net/~tyroney/wow/uitutorial/

is this what your looking for?






Not really, I've made my whole addon using XML for the graphics, and don't want to convert it all to LUA if I don't have to. I'm trying to condense code in my add-on, and it requires me to use tables and in turn put XML elements in a table. For instance if CustomOneInput, CustomTwoInput, and CustomThreeInput were all XML textboxes, I'm trying to do something like this:


Code:
CustomInputs={CustomOneInput, CustomTwoInput, CustomThreeInput}
CustomNums={CustomOneNum,CustomTwoNum, CustomThreeNum};

--assume that these are in an Options GUI and CustomInputs have been collected from the GUI and inserted into the table.

function getInfo()
for i=1,#RR_CustomInputs do
if(RR_CustomInputs[i]~="") then
RR_CustomNums[i]=RR_CustomNums[i]:GetValue();
else
RR_CustomNums[i]=RR_DEFAULT_CUSTOM; --default value
end
end
end

The Problem occurs when I try to use an XML method with my table. Any help would be appreciated, I hope that's clear.|||Anyone have an idea?|||I have no idea. But you say the problem occurs and don't say what the problem is or what happens.|||Oh sorry, I get a syntax error when I try to save my Options GUI (when the method is called) for the line:


Code:
RR_CustomNums[i]=RR_CustomNums[i]:GetValue();

The actual error says: "attempt to index field '?' (a nil value)"|||3 ideas off the top of my head :

1.) You've defined CustomInputs as a Table, but then refer to RR_CustomInputs ?

Is there some kind of meta-reference or something ? Or am I drunk ? Yes, you're drunk.

2.) You've defined CustomInputs in your LUA outside of any function.

Assuming that your AddOn is loading the LUA file BEFORE the XML file, then the variables you are adding to the CustomInputs Table will be nil values, because the XML elements haven't been defined yet.

I would define the table after the VARIABLES_LOADED event, so you know the XML has been parsed and loaded and all the elements exist.

3.) Just off the top of my head, does :GetValue() work with TextBoxes ? I've always used :GetText()

Maybe I'm just being too literal and you're saying :GetValue() as an example :)



It's late - sorry if I've misunderstood you, and my ideas are just plain silly ;)



Feel free to post an actual XML and LUA code example :)|||Quote:








2.) You've defined CustomInputs in your LUA outside of any function.

Assuming that your AddOn is loading the LUA file BEFORE the XML file, then the variables you are adding to the CustomInputs Table will be nil values, because the XML elements haven't been defined yet.

I would define the table after the VARIABLES_LOADED event, so you know the XML has been parsed and loaded and all the elements exist.




Pretty sure that was the problem, I think I've fixed it now. Thank you very much.

Socket colors

How can I find out what SOCKETS are available, based on a certain item (item id and so on obtained via GetItem())?

For example, I am not interested in what gems are socketed, I want to know what sockets are available, i.e. 2 red sockets and 1 blue socket.

Sort of like this:

local r,y,b,m = GetSocketColors( ItemLink )

Variables r,y,b,m would contain a number, in the example above 2,0,1,0 for 2 red socket slots, 0 yellow, 1 blue and 0 meta slot.

Is this possible? I mean, it is possible to read the string "Red socket" if the item has no gems socketed, but that is not sufficient for what I had in mind.

Hope someone can help with this. Thanks in advance!|||I don't know if what you exactly want is here but check out these pages to give you a place to start looking.

itemlink @ http://www.wowwiki.com/ItemString

"itemLink" = GetInventoryItemLink("unit", slotId) @ http://www.wowwiki.com/API_GetInventoryItemLink|||The only way of checking what sockets are available that I know of is to scan the tooltip of an item.

Read through http://wowwiki.com/UIOBJECT_GameTooltip to get a basic idea of how to scan tooltips.|||I don't know if you misunderstood me, of if I was unclear about the issue.

I have no problems getting the ItemLink or scan the tooltips (as you suggested). What I don't know how to do, either while scanning the tooltip or in some other way based on an item id or an ItemLink, is to find out what SOCKETS are available. Please note: I have no interest at all what gems are socketed, I want to know the color of the actual socket - for example, you can put a red gem in a blue socket - I want to check the color of the socket (blue), not the gem (red).

When a gem is socketed, scanning the tooltip doesn't seem to return any information about the socket color, which is why I am here, asking you for help|||I understood what you meant, and there's no blizzard API to do it (that I know of, I could easily be wrong.)

You can scan the tooltip to get available sockets, but remember that tooltips don't just contain text, you have to look at the images too.

Basically, as well as GameTooltipText, theres GameTooltipTexture1 (2, 3, 4, etc)

Try this:

Set the tooltip to the item ID only of whatever item you want to scan (just the ID means it clears any sockets the item has, so you will only get the sockets as if it were never socketed). For example, GameTooltip:SetHyperlink("item:32006")

Scan GameTooltipTexture1, GameTooltipTexture2, etc up to 10 to see if their GetTexture() returns these strings:

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Meta"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Blue"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Red"

"Interface\\ItemSocketingFrame\\UI-EmptySocket-Yellow"|||Quote:








What I don't know how to do, either while scanning the tooltip or in some other way based on an item id or an ItemLink, is to find out what SOCKETS are available.




You can't get the socket colors of an item purely by sniffing its itemlink. Plain and simple. What you can (reliably) get from an itemlink is the itemID, enchantID, suffix (if any), instance, and the the ID's of any gems socketed.


Quote:




When a gem is socketed, scanning the tooltip doesn't seem to return any information about the socket color, which is why I am here, asking you for help




Correct. It only returns the id of the gem or gems as I noted above. To the best of my knowledge as well there is no API to get the gem colors, so you either have to scan the itemlink and search for plain strings like "<Color> Socket" or "Meta Socket" (you still have to set the hyperlink to that of the original, unsocketed item) or use dinnerbone's approach and possibly check for the texture.|||Quote:








search for plain strings like "<Color> Socket" or "Meta Socket" (you still have to set the hyperlink to that of the original, unsocketed item)




I would not recomend this method unless the addon is going to be a private one, as "Meta Socket" would change in each language, but textures do not.|||Correct, if you mix with strings, there is always localization to consider.|||Tristanian, Dinnerbone... Many thanks!

Haven't had the time to test this yet (currently at work), but GetTexture() was a new one for me (yes, I am a noob when it comes to addons). And although the addon is a private one, so far, it is always better to try to stay away from localized strings, I know

I will post back in this thread if I come up with anything whether it is a solution or a new question/problem|||Here's what I did, no time to go further, have raiding to do

XML:

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">

<GameTooltip name="MyScanningTooltip" inherits="GameTooltipTemplate">

<Scripts>

<Onload>

this:SetOwner(UIParent, "ANCHOR_NONE");

</Onload>

</Scripts>

</GameTooltip>

</Ui>



LUA:

MyScanningTooltip:ClearLines();

MyScanningTooltip:SetHyperlink("item:"..id)

local tmp = getglobal("MyScanningTooltipTexture1"):GetTexture();

Result: tmp contains for example "Interface\ItemSocketingFrame\UI-EmptySocket-Blue"

For now, this result is exactly in the direction I wanted to go

Thanks for pointing me in the right direction!

Macro; Counterattack or Mongoose

Would it be possible to create a macro that would either use counterattack if it's ready, or Mongoose if that is ready.

If someone could help me with this, I would be greatly appreciative.|||No, macros cannot check cooldowns in combat.|||Thanks for the reply.

But isn't it possible to make it so that it doesn't check for cooldowns, just make it either use counterattack or mongoose, and let wow decide if any of those are ready to use?|||No, since you can only cast one spell per macro, so WoW hits the first one, tries to cast it, fails due to cooldown, and then stops.|||Quote:








No, since you can only cast one spell per macro, so WoW hits the first one, tries to cast it, fails due to cooldown, and then stops.




/castrandom Counterattack, Mongoose Bite|||Quote:








/castrandom Counterattack, Mongoose Bite




That still won't quite do what's wanted, though... if one's on cooldown, then hitting it has a 50% chance of doing nothing.

Cancel Autotarget CC for melee?

Does anyone know of, of be willing to make, a mod that removes the ability for melee to auto target a mob that is crowd controlled?

l

We've all been there, your killing a mob and as the mob dies you click another attack and instead of attacking the dying mob, you automaticly target and hit the sheep that was right in front of you.

So is there a mod that can help prevent this? Being able to manually click on the crowd controlled mob to target it is fine, I just don't want to have to stop doing everything but white damage when the mob gets to 10% out of fear of breaking a sheep right in front of me.

I don't even know if this is possible or not, but if it is, if someone could point me in it's direction, I'd be very thankful.

SabellaReborn Co-Developer

Hey there! I'm Isognomy (as you can tell I'm sure hehe). I'm looking for someone to help me with developing SabellaReborn. I'm using Henge as a base and going from there. So far the main things that I need assistance with is:

Adding Item Class to possible buttons

Adding Itemization/Bag Scanning via PeriodicTables

And anything else another can help with. Basically Henge is great as it is but it doesnt use PeriodicTables, instead it can use items by calling the individual Item ID's. The main reason I'm asking for another developer to come on board, is because it would greatly speed up the process, providing beta's much quicker to the masses. Anyways, I appreciate you taking the time to read this, and hope someone will have something to contribute to SabellaReborn. Take care!

<FontString>

I am trying to change a font in an xml file.

Here is my code:


Quote:




<FontString name="Simple_Text" inherits="ChatFontNormal" font="./Fonts/Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">




For some reason it is NOT using my font. who is this? I have "Impact.TTF" in:

C:\Program Files\World of Warcraft\Interface\AddOns\wow_compass\Fonts\

Why does it not work?|||Try


Code:
<FontString name="Simple_Text" inherits="ChatFontNormal" font="Interface\AddOns\wow_compass\Fonts\Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">

The XML doesn't use the addon folder as the base directory, it uses the folder for WoW itself.|||For some reason, it still does not work. Please take a look at my code. If you could PLEASE help me out, it would meat the work to me.

http://www.redcrusher.com/wow_compass.zip

THANKS|||I don't know if you can use a font other than those Blizzard provides. I just use the ones that Blizzard provides.|||http://wowui.incgamers.com/?p=mod&m=1424

are you so sure about that?

I know for a fact, that a LOT of addons use other fonts. Take SCT, casting bart and others. They do, i ust don't know ine is not working. Take a look at the file , and please help me.

thanks|||Take a look at their code and see what they are doing.|||Quote:








Take a look at their code and see what they are doing.




I have, and i can not find that i am doing anything differently...|||When you change the font of a font string, you need to specify a FontHeight; So to change the font file in XML, you will also need the following :


Code:

<FontString name="Simple_Text" inherits="ChatFontNormal" font="Interface\AddOns\wow_compass\Fonts\Impact.TTF" text="Type in something:" justifyV="TOP" justifyH="LEFT">; -- Set Font String
<FontHeight>
<AbsValue val="15"/>
</FontHeight>

( Not necessarily a height of 15 obviously )

You will have had XML errors reported in your FrameXML.log file explaining why the font wasn't applied. ( I mention this in the tutorial thread )

See also, the SetFont(font, fontHeight, [optional attributes]) API at WoWWiki, where the font height is mandatory.



For some useful dev tips :

http://wow.incgamers.com/forums/show...t=FrameXML.log

GameTooltip fading ?

Does anyone know if you can determine whether the GameTooltip is in the process of fading or not ?

I'm interested in getting its Alpha setting, but not if its half way through disappearing...



Mmm, I guess I could, get alpha, and then :Show() it again maybe.... and then set the alpha back.... ???

How to Copy and Paste one model onto another

Hello, I am new here, and I figured this was the place to ask. But if I wanted to, for example, turn any human model I see in game wearing certain armor and copy and paste it into a lich model, how would I do that?|||Modifying the MPQ files by doing things like replacing models is a violation of the TOS/TOU and will get you perma-banned almost immediately. Don't do it.|||please delete this thread as it is a banned topic.

Slash command is a myth?

Hello All!

Insert standard n00b disclaimer here.

After reading Klishu's sticky tutorial on XML, I was pumped, ready to forge into new ground and make that simple add on not so simple. That's where it all fell apart.

I cannot get the system to recognize a slash command. From all the tutorials and all the examples, one would think this is the easiest next step to do. Yet, I failed. Repeatedly.

If anyone has time to write a little "fix this code here" response, I'd be very grateful.

HelloWorld.toc


Code:
## Interface:          20300
## Title: HelloWorld
## Notes: Not so simple anymore!
## Dependencies:
HelloWorld.xml

HelloWorld.xml (almost exactly from the Simple.xml)


Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">

<Script file="HellowWorld.lua" />

<Frame name="HelloWorldFrame" visible="true" parent="UIParent">
<!-- set the size of the frame -->
<Size>
<AbsDimension x="200" y="133"/>
</Size>

<!-- set where the frame will be anchored -->
<Anchors>
<Anchor point="CENTER" />
</Anchors>

<!-- define background and borders -->
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
</Backdrop>

<!-- set the parameters for the text -->
<Layers>
<Layer level="ARTWORK">
<FontString name="HelloWorld_Text" inherits="ChatFontNormal" text="Type in: Hello World">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-33" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>

<!-- buttons and edit box -->
<Frames>
<Button name="HelloWorld_CloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-3" y="-3" />
</Offset>
</Anchor>
</Anchors>

<Scripts>
<OnClick>HelloWorld_Close();</OnClick>
</Scripts>
</Button>

<EditBox name="HelloWorld_EditBox" letters="50">
<Layers>
<Layer level="BACKGROUND">
<Texture name="HelloWorld_Background">
<Color r=".2" g=".2" b=".2" a="1"/>
</Texture>
</Layer>
</Layers>

<Size>
<AbsDimension x="190" y="20"/>
</Size>

<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="5" y="-66"/>
</Offset>
</Anchor>
</Anchors>

<Scripts>
<OnEnterPressed>HelloWorld_AcceptButton:Click();</OnEnterPressed>
</Scripts>

<FontString inherits="ChatFontNormal"/>
</EditBox>

<Button name="HelloWorld_AcceptButton" inherits="OptionsButtonTemplate" text="GO!">
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="20"/>
</Offset>
</Anchor>
</Anchors>

<Scripts>
<OnClick>HelloWorld_ButtonClick();</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Ui>

HellowWorld.lua


Code:
function HelloWorld_OnLoad()
if( DEFAULT_CHAT_FRAME ) then
DEFAULT_CHAT_FRAME:AddMessage("HelloWorld Loaded");
end
local stopVar = 0;
SLASH_HelloWorld1 = "/helloworld";
SLASH_HelloWorld2 = "/hw"; -- A shortcut or alias
SlashCmdList["HelloWorld"] = function(cmd)
HelloWorld_Command(cmd);
end
end

function HelloWorld_Command(cmd)
if (cmd == "1") then
stopVar = 1;
DEFAULT_CHAT_FRAME:AddMessage("HelloWorld Message On");
HelloWorldFrame:Show();
end
if (cmd == "0") then
stopVar = 0;
DEFAULT_CHAT_FRAME:AddMessage("HelloWorld Message Off");
HelloWorldFrame:Hide();
end
end

function HelloWorld_ButtonClick()
DEFAULT_CHAT_FRAME:AddMessage(HelloWorld_EditBox:GetText());
HelloWorld_EditBox:SetText("");
end

function HelloWorld_Close()
HelloWorldFrame:Hide();
end



Once I added the _Onload and _Command functions, I started getting attempted to call global value nil errors. I see that the XML never calls the _OnLoad (If I stick

<Scripts>

<OnLoad>HelloWorld_OnLoad();</OnLoad>

</Scripts>

into any of the frames, I do get the loaded message, but still, no slash commands.)

Any suggestions would be greatly appreciated!!|||Could just be the way I do it but I don't understand this part:


Code:
SlashCmdList["HelloWorld"] = function(cmd)
HelloWorld_Command(cmd);
end

Shouldn't that just be:


Code:
SlashCmdList["HelloWorld"] = HelloWorld_Command(cmd);
|||That would just execute HelloWorld_Command and assign its return value nil to that element of SlashCmdList. That line would work without the (cmd) on the end.

I do things a little differently. I create an Initialize() function and then just have two lines like this in it:

SLASH_PAWN1 = "/pawn"

SlashCmdList["PAWN"] = PawnCommand

Then, I have a Command(cmd) function defined later on:

function PawnCommand(Command)

Then, at the end of my lua file I set up a tiny invisible frame and wait for the VARIABLES_LOADED event, and then I call PawnInitialize from there, instead of OnLoad for any particular frame or anything like that. This has worked really well for me, and makes it so that the code is the same whether I want a UI or not. Check out one of my mods (Divisor is the simplest) for the code... you'll be interested in [ModName]OnEvent and the little block at the end of the mod's main .lua file. You could either do it like I do with a hidden frame, or since you have an XML file in your mod, you could just add an OnEvent script to your main window and leave out the whole hidden frame process.|||Thanks all! I got it finally... after I noticed the typo in "HellowWorld" I appreciate the help!

Lua pattern matching

Hi,

i'm having a bit of difficulty getting a pattern to work. I thought what i wanted to do was possible, although now not 100% sure,

I'm trying to create a pattern that will match any string containing one word, for example 'port', unless that occurs in a word from a list of safe-words like 'imPORTant' and 'supPORT'. is it actually possible with pattern matching?

Thanks

stew|||Something like :


Code:



local strSrch = "Any port in a storm.";
local strBeg, strEnd, strCap = string.find(strSrch, ".*%s+(port)%s+.*");

This won't find "Port" with any capital letters, and only finds the word when surrounded by at least one space on either side - so it also wont find "port." (i.e. with a full stop after it)



".*[%s%-][pP][oO][rR][tT][%s%.].*"

...might be more universal...

Not sure off the top of my head, but the first pattern should be reasonable if you are sure it isn't capitalised and is surrounded by spaces.

You should check out the following web site ;)

http://www.lua.org/pil/20.2.html

Raid Buffs ...

Are there any mods out there that a Raid Leader can use to assign/keep track of raid buffs. I would love to have a screen like pally power but for all classes that have buffs that I can assign (as raid leader) and that allow me to see what buffs the player has available and what rank they are specced for and also, for them to have the ability to, after I have assigned their classes/grps, simply one click an icon to buff appropriate classes/groups. Also in there, have some way of showing what classes or groups do not have the buff.

Any help would be greatly appriciated. Even is someone pointed me in the right direction to develop (although I have no mod experience). I know that this would be a great raid utility and something that many would use.

Thanks

Coding Help

Hi All,

I am pretty new to addon coding. I am a Computer Science Major particularly in the application development side of things I have two questions: 1. Is there a way to have an addon detect if the player has come in/out of stealth?

2. Is there any really good tutorials on WoW addon Development?

Thanks

Rearadmiral (Black Dragonflight, US)|||Do you mean yourself or someone else? If you mean yourself then you might be able to check using UnitBuff(unit, buffIndex)

http://www.wowwiki.com/API_UnitBuff


Code:
name, rank, iconTexture, count, duration, timeLeft =  UnitBuff(unit, buffIndex)

Where the name or the icontexture matches what you are looking for. If you mean someone else then I don't think you can unless you are targeting them.|||Thanks Jumpy I am trying to detect when I myself go stealth. Let me explain what I am trying to do. I want to detect when I go stealth as my druid so that I can automatically switch the bar pages, kinda like a rouges bars change but for some reason bliz just didn't do for a druid stealth.

Here is what I have so far:


Code:
function CatBar_OnLoad()
DEFAULT_CHAT_FRAME:AddMessage("CatProwlBar Loaded");
end

function CatBar_OnEvent()
if IsStealthed() == 1 then
ChangeActionBarPage(2);
end
if IsStealthed() == nil then
ChangeActionBarPage(1);
end
end

My function works. If I am in game and I type "/script CatBar_OnEvent();" it will switch the page accordingly. I need it to run that function when I go stealth or come out of stealth.|||If there is no event to trigger a function then you sometimes have to use OnUpdate in your xml to drive the function.

At the top of your Lua program you need to have


Code:
local CatBar_LastTime = 0

Then this function is pointed to by your xml.


Code:
function CatBar_Timer(elapsed)
CatBar_LastTime = CatBar_LastTime + elapsed
if CatBar_LastTime >= .5) then -- for half second intervals
CatBar_LastTime = 0
if IsStealthed() == 1 then
ChangeActionBarPage(2);
end
if IsStealthed() == nil then
ChangeActionBarPage(1);
end
end
end

In your frame xml, in the Scripts section you have


Code:
<Scripts>
<OnUpdate>
CatBar_Timer(arg1)
</OnUpdate>
**** other scripts ***
</Scripts>
|||You may also be able to use events such as "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS", "CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS" and "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_BUFFS". I'm guessing the first one will work for self buffs thought I haven't personally tested it. Arg1 will return the combat text chat, so if you know what effect to look for, you should be able to trigger a function when the event is fired without necessarily having to resort to a timed OnUpdate check (which should work as well).|||Thanks BTW guys for all of your input but I still cannot get it working, and it may just be me at this point but this is what I got:

CatProwlBar.lua


Code:
local CatBar_LastTime = 0

function CatBar_OnLoad()
DEFAULT_CHAT_FRAME:AddMessage("CatProwlBar Loaded");
end

function CatBar_Timer(elapsed)
CatBar_LastTime = CatBar_LastTime + elapsed
if CatBar_LastTime >= .5 then -- for half second intervals
CatBar_LastTime = 0
if IsStealthed() == 1 then
ChangeActionBarPage(2);
end
if IsStealthed() == nil then
ChangeActionBarPage(1);
end
end
end

CatProwlBar.xml


Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="CatProwlBar.lua" />
<Frame name="CatFrame" hidden="true">
<Scripts>
<OnLoad>
CatBar_OnLoad();
</OnLoad>
<OnUpdate>
CatBar_Timer(arg1);
</OnUpdate>
</Scripts>
</Frame>
</Ui>

Thats what I got and still nothing, the only sign I have that the addon is actually working is the fact that I can call the the functions and the Message "CatProwlBar Loaded" shows up when I load in. I am hopeless|||OnUpdate wont run if the frame is hidden. Change the hidden value of the frame to false.|||You may also try :

CatProwlBar.lua


Quote:




function CatBar_OnLoad()

DEFAULT_CHAT_FRAME:AddMessage("CatProwlBar Loaded");

this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS");

this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF");

end

function CatBar_OnEvent()

if (event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS") and arg1 == "You gain Prowl." then

ChangeActionBarPage(2);

end

if (event == "CHAT_MSG_SPELL_AURA_GONE_SELF") and arg1== "Prowl fades from you." then

ChangeActionBarPage(1);

end

end




CatProwlBar.xml


Quote:




<Ui xmlns="http://www.blizzard.com/wow/ui/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">

<Script file="CatProwlBar.lua" />

<Frame name="CatFrame" hidden="true">

<Scripts>

<OnLoad>

CatBar_OnLoad();

</OnLoad>

<OnEvent>

CatBar_OnEvent();

</OnEvent>

<OnUpdate>

</OnUpdate>

</Scripts>

</Frame>

</Ui>|||OMG thanks Dinnerbone and Jumpy. As soon as I clean it up some, it will be on the site. You guys will get most of the credit :P.

Thanks Again|||Bad News, I have uncovered a bug. Whenever I leave stealth by using an attack (ie Pounce) my bar does not switch back. Any Ideas?