WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Technical Support (https://www.wowinterface.com/forums/forumdisplay.php?f=92)
-   -   Macros in nUI (https://www.wowinterface.com/forums/showthread.php?t=38263)

Ivivika 01-09-11 02:30 AM

Macros in nUI
 
whenever I make a macro for spells on my warlock's cast bar and use the macro'd spell instead of the regular spell, NONE of the buttons light up to let me know spell is available. what did i do to break it?:mad:

Xrystal 01-09-11 02:52 AM

I've noticed that as well and I don't know whether its a nUI thing or a WoW thing so just listen for the proc sound and combat text warning fly up and the special graphic to appear to tell me it has procced ..

But it doesn't seem all macros are affected so maybe it depends how the macro is written.

EG. Are you adding [] as a default option for the spell ? I've found I've been using that alot now for it to have a fallback trigger if the rest fail.

#showtooltip
/cast [@mouseover, help, nodead][@target,help,nodead][] Heal

Which basically says help the alive mouseover target, or the actual target otherwise fall back to your default setting and deal with the scenario as if the macro wasn't written.

Perhaps that last scenario allows the spell alerts to happen and when they don't it coincides with macros that don't have that set up.

Outside of that I can't think of what could be the cause, unless the way nUI treats its bars even in nUI5 is messing things up .

spiel2001 01-09-11 08:52 AM

It may be something to do with the IsUsableAction() method. Does it do the same thing in nUI6?

unknowndead 01-13-11 02:01 AM

it seem to be the same in nui 6
i use macros like this spec dependent one
#showtooltip
/cast [spec:1] chaos bolt
/cast [modifier:alt] Curse of Weakness
/cast [modifier:shift] Curse of Exhaustion
/cast [spec:2] Curse of Tongues
/cancelaura herbouflage
and it seems to show the global cooldown (not showing numbers) and when i cast the same spell
/cast chaos bolt
i do get the numbers in the cooldown
may just be how the macro are but if you can figure out how to get the timer to show that wold be wonderfull
o and a small request put the cooldown timer over the global cooldown, it is a little difficult to see when it is shaded over by the global cooldown

keep up the good work with nui 6 im glad to see a hud in it now, makes my life much ezer and less painful not having to look away from my toon to see my health when i might be standing in the fire o doom

Xrystal 01-13-11 04:33 AM

2 Attachment(s)
Okay, just tested this with my priest and popped a renew on myself. As you can see from my screenshot the macro doesn't show the buff counter but the direct spell does.

Will try without nUI to see if it is the same problem and also with inline auras which I used to use before I persuaded Scott to add the functionality :D

Edit:
Okay with inline auras it works fine so there must be something they are looking at that is different from nUI. Here's a screenshot.

spiel2001 01-13-11 05:23 AM

I've added this to the bug list of nUI6. It's not a top priority, but I will look into how to fix this as soon as I can.

Xrystal 01-13-11 07:02 AM

I've played with it some in the last few hours but try as I might I can't get it to display the value on the macro button despite having the values appear in both updateCooldown and abCooldown but it might be that I'm just doing stuff in the wrong area.

I can see InlineAura's code for getting the information and it seems to be retrieving the stuff Im expecting but it just doesn't get it in time for your display to use it or I'm not able to set a key variable at the right time.

I'll keep checking things out though later on.

spiel2001 01-13-11 07:36 AM

I would suggest you try playing with it in the nUi6 code... the logic for the aura durations is located in the nUI6.LayoutEngine.ActionButtons.UpdateTimers method located in [ Interface > AddOns > nUI6 > Bars > ActionButtons.lua ] That's where the cooldown text and spell duration text is calculated.

Xrystal 01-13-11 07:46 AM

Will do, and I'll try and rig up something to work in nUI5 in the mean time. I don't use nUI6 myself at the moment. There always seems to be something I want where I want it to be that isn't there rofl

spiel2001 01-13-11 08:08 AM

At this point nUI6 is getting to a fairly playable state... you have cooldowns, a HUD, all the action bars and unit frames, etc. Still lots to do, but likely at a place as of last night where you can use it fairly effectively.

Xrystal 01-13-11 08:24 AM

1 Attachment(s)
Okay, seemingly easy as pie for the most part. probably needs some more work as not all macros worked but here goes.


Code:

                                if buttonDetail.isPetButton then
                                        spellName          = GetPetActionInfo( button:GetID() );
                                        spellType, spellId = spellName and GetSpellBookItemInfo( spellName, "pet" );
                                        caster            = UnitExists( "vehicle" ) and "vehicle" or "pet";
                                else                   
                                        spellType, spellId = GetActionInfo( button.action );
                                        spellName          = spellId and GetSpellInfo( spellId );
                                        caster            = "player";
                                       
                                        if spellType == "macro" then
                                                spellName                    = spellId and GetMacroSpell( spellId );
                                        end
                                end

                                if spellId then
                                        start, duration, enable = GetSpellCooldown( spellId );
                                end


Xrystal 01-13-11 02:58 PM

And nUI Version 5 needed this change to work even the ones that didn't work in the version 6 code I posted earlier.

Code:

                        elseif id
                        and type == "macro"
                        and id > 0
                        then

                                local macroSpell,item,spell,helpful;
                               
                                if not SpellStatus[id] then SpellStatus[id] = {}; end;
                                overlay.spellID                = id;
                                overlay.spellStatus            = SpellStatus[id];
                                macroSpell                                = GetMacroSpell(id);
                                macroItem                                = GetMacroItem(id);
                               
                                if ( macroItem ) then
                                        item, spell = GetItemInfo(macroItem), GetItemSpell(macroItem)
                                elseif ( macroSpell ) then
                                        spell = GetSpellInfo(macroSpell)
                                end
                               
                                if ( spell ) then
                                        SpellStatus[id].name, SpellStatus[id].rank  = GetSpellInfo( spell );
                                end


spiel2001 01-13-11 05:20 PM

I suspect the GetMacroItem() call is needed in the nUI6 code, too, to make it work with all macros.

EDIT: See if this code block works...

Code:

                -- is there a cooldown on the action and what is the name of the action itself?
               
                if buttonDetail.isPetButton then
               
                    spellName          = GetPetActionInfo( button:GetID() );
                    spellType, spellId = spellName and GetSpellBookItemInfo( spellName, "pet" );
                    caster            = UnitExists( "vehicle" ) and "vehicle" or "pet";
                   
                else
                                   
                    spellType, spellId = GetActionInfo( button.action );
                    caster            = "player";
                   
                    if spellType == "macro" then
                        local item = spellId and GetMacroItem( spellId );
                        spellName  = (item and GetItemSpell( item )) or (spellId and GetMacroSpell( spellId ));
                    else
                        spellName = spellId and GetSpellInfo( spellId );
                    end
                   
                end

                if spellName then
                    start, duration, enable = GetSpellCooldown( spellName );
                end


Xrystal 01-13-11 06:36 PM

Yeah it probably will do, I did the nUI 5 version one afterwards and thought of adding it for completeness for trinkets and stuff like that :D

Turned off version 6 at the moment now that people are logging in rofl .. just in case we do stuff :D

I 'll test the code before rush hour tomorrow rofl.

Xrystal 01-14-11 02:02 PM

Okay, made that change and it didn't stop stuff from working and it looks like the ones I wanted to see numbers on either aura timers or cooldown timers were there.

Tordormore 02-09-13 04:18 PM

Hey guys, anyway I can get exact code info you did here? I'm having the same problem in latest version of nUI+. mod keys aren't working for macros placed in the ActionBars. Original action works, but mod keys don't allow the modified action to work.

Macro Example I use:

#showtooltip
/cast [mod:shift] Moonfire; Sunfire


Like I said, Sunfire works for this macro, when I hold down the shift key, I see the icon change to the Moonfire, but pressing the key again with the mod key doesn't trigger the macro. Works great outside of nUI.

Xrystal 02-09-13 07:42 PM

Just restored my version of nUI+ to the latest version on site here and it works as far as I could see. On my shadow priest I replaced your spells with Mind Flay and Mind Sear and could use both depending on whether I had the shift button down or not.

Just in case you misunderstood the use of the modifier keys they are simply to highlight which ability will trigger when you activate the button. The modifier key itself does not trigger the ability but clicking the button or using the bound key will.

Tordormore 02-10-13 04:12 PM

hmmm,

interesting. I'll have strip all mods out except nUI+ and give it a try.

Dridzt 02-10-13 05:36 PM

Check that you haven't chosen SHIFT as a self-cast or focus-cast modifier.

Double check the spell names (best way is to shift-click them from the spellbook directly into the macro)

Tordormore 02-10-13 11:55 PM

Quote:

Originally Posted by Dridzt (Post 272928)
Check that you haven't chosen SHIFT as a self-cast or focus-cast modifier.

Double check the spell names (best way is to shift-click them from the spellbook directly into the macro)

That's a good point. I'll check that too.


All times are GMT -6. The time now is 06:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI