Thread Tools Display Modes
04-06-13, 03:57 AM   #1
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Mount macro

I'm using a mount addon that casts random mounts depending on location. Simple /rmount.

How can i make a macro will be grayed out if i can not mount(like in combat or indoors), or glow as if equiped?
  Reply With Quote
04-06-13, 12:52 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
If I'm not mistaken, you'll need to poll the action buttons to see which slot your macro is in. Your addon would then need to handle the change of its display manually.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-06-13, 06:49 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It would be easier to update your macro to use "/cast" commands and let the Blizzard code handle coloring and highlighting the action button.

For example, the addon would need to edit the macro with a new "/cast Mount Name" after each time you mounted (or every 2 minutes, etc) to show the next mount to be used.

Since addons can't edit macros in combat, if you wanted the macro to be useful in combat, your addon would need to edit the macro when entering combat to something like "/cast Travel Form" and edit it back to use a mount after combat ended.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-09-13, 06:55 AM   #4
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Hehe this all sound way to complicated for me Think i'm just gonna stick with the simple macro i have.
  Reply With Quote
10-26-13, 04:21 PM   #5
morpheusxeno
A Flamescale Wyrmkin
 
morpheusxeno's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 126
#showtooltip [flyable]Red Drake;[noflyable]Swift Gray Ram
/run if IsMounted()then return end local t if not IsFlyableArea()then t={3,8,9,10}else t={1,2,4,6,7}end CallCompanion("MOUNT",t[random(#t)])

I think there is a condition for #show something like [notmountable] or something...
__________________
My mother-in-law fell down a wishing well. I was amazed; I never knew they worked...

Last edited by morpheusxeno : 10-26-13 at 04:23 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Mount macro


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

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