Thread Tools Display Modes
01-13-06, 12:31 PM   #1
TheKID97
A Defias Bandit
Join Date: Jan 2006
Posts: 2
Buffed?

I'm having trouble using a supermacro command "buffed" that is supposed to determine if a unit is buffed or debuffed with a specific spell.
ex:
/script if buffed("Moonfire(Rank 1)", "target")

However I don't know what this line should return (help file for supermacro says it will return ' "debuff", id ' but I don't know what that means... does it output to a table/matrix?)

In case it wasn't clear yet, I'm new to this. If anyone knows how to use this to cast a debuff if it is not already active on a target, please let me know. Also, if there is a different command that will accomplish the same results, that may be my entire problem.

Thanks in advance.
  Reply With Quote
01-15-06, 09:45 AM   #2
Aquendyn
A Deviate Faerie Dragon
Join Date: Sep 2005
Posts: 12
Lua functions can return more than one value. SuperMacro's buffed or FindBuff function returns varying number of values depending on what you're looking for and what is found. For debuffs, it will return the string "debuff" and the id of that debuff. If it is not found, then nothing is returned, that is, nil.

So to check if a debuff is not found, you would say
/script if not buffed("moonfire","target") then CastSpellByName("Moonfire") end
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Buffed?


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