Thread Tools Display Modes
Unread 07-03-09, 09:13 AM   #1
Rhamses
A Theradrim Guardian
Join Date: Jun 2009
Posts: 61
macro in Addon syntax

I have nearly completed the revisions I like. But, I am still perplexed by

summonButton:SetAttribute('macrotext', '/cast '..(Locale.Spells.FastCast or "").."\n/cast "..summon)

This will try to cast "fast cast" (Fel Domination)
Then it summons the pet.

But, if FD is on CD, then it gives error sound and error text, but it still completes the pet summon. I would like to remove the error. In a macro, I use


/console Sound_EnableSFX 0

/cast
/cast

/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1

Could someone help me combine the two?


Rhamses
Rhamses is offline  
Unread 07-03-09, 09:42 AM   #2
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 208
summonButton:SetAttribute('macrotext', ([[
/console Sound_EnableSFX 0
/cast %s
/cast %s
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
]]):format(Locale.Spells.FastCast or "", summon))
Vrul is offline  
Unread 07-03-09, 11:05 AM   #3
Rhamses
A Theradrim Guardian
Join Date: Jun 2009
Posts: 61
Awesome! thank you so much!

I do not know if anyone is interested, but I have an addon that creates a "spell book". When clicked, the button flowers to equally spaced children around the original button. These buttons are loaded with the demon spells the lock knows. If one is clicked, it tries to cast fel domination and then the summon the pet. And, just for kicks, (clicks?) an alt click of the pet frame casts health funnel.

N ot very complicated, but it is a step above what I taught myself last which is just changing the events.
Rhamses is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » macro in Addon syntax

Thread Tools
Display Modes

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