CurseForge.com
Addons
Authors
Forums
Wiki
Paste
Sign in
Register new account
SpellFlash
Overview
Files
Images
Tickets
Pages
Forum
Repository
Localization
Subscriptions
Donate
Curse
API
r156
Source
Markup:
= ** local s = SpellFlashAddon \\ ---- \\ === ** s.SpellName This returns the localized spell name. <<code lua>>name = s.SpellName(SpellID, NoSubName)<</code>> ===== ** Arguments: ; ** SpellID : (number) Global spell ID number. ; ** NoSubName : (boolean) If true will not return the spell name with the sub name attached. ===== ** Returns: ; ** name : (string) Localized spell name. \\ ---- \\ === ** s.ItemName This returns the localized item name. <<code lua>>name = s.ItemName(ItemID)<</code>> ===== ** Arguments: ; ** ItemID : (number) Global item ID number. ===== ** Returns: ; ** name : (string) Localized item name. \\ ---- \\ === ** s.Replace This replaces text with new text in a string. <<code lua>>REPLACED_STRING = s.Replace(STRING, FIND, REPLACE, FIND, REPLACE, ...)<</code>> ===== ** Arguments: ; ** STRING : (string) The original string. ; ** FIND : (string or number) The search text. ; ** REPLACE : (string or number or nil) The replacement text. ===== ** Returns: ; ** REPLACED_STRING : (string) The replaced string. \\ ---- \\ === ** s.If A simple function that will return the second argument if the first argument is true and will return the third argument if the first argument is false. <<code lua>>Return = s.If(Argument, True, False)<</code>> ===== ** Arguments: ; ** Argument : (boolean) If true will return the second argument and if false will return the third argument. ; ** True : (variable) This is used as the return value if the first argument is true. ; ** False : (variable) This is used as the return value if the first argument is false. ===== ** Returns: ; ** Return : (variable) The returned argument. \\ ---- \\ === ** s.CopyTable A simple function that will copy a table. <<code lua>>CopiedTable = s.CopyTable(Table)<</code>> ===== ** Arguments: ; ** Table : (table) The original table. ===== ** Returns: ; ** CopiedTable : (table) The copied table. \\ ---- \\ === ** s.Class This is used to determine the class of a unit. <<code lua>>CLASS = s.Class(unit, class)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** class : (string or table or nil) English class name or table of class names to compare to. This is not case sensitive and spaces are ignored. ===== ** Returns: ; ** CLASS : (string or nil) English all capital no spaces class name or nil if the unit is not a player or did not match a given class name. \\ ---- \\ === ** s.Race This is used to determine the race of a unit. <<code lua>>RACE = s.Race(unit, race)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** race : (string or table or nil) English race name or table of race names to compare to. This is not case sensitive and spaces are ignored. ===== ** Returns: ; ** RACE : (string or nil) English all capital no spaces race name or nil if the unit is not a player or did not match a given race name. \\ ---- \\ === ** s.Healer This is used to check for a healer class. <<code lua>>ID = s.Healer(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to check raid and party members or "party" to only check party members. You may also add a combination of options separated by a line pipe such as "raid|range|afk|notself". Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. ===== ** Returns: ; ** ID : (string or nil) UnitId of the first found healer class or nil if the unit is not a healer or did not match a given option. \\ ---- \\ === ** s.Form This will return the current stance or form that you are in if you are a Druid or Warrior. <<code lua>>currentForm = s.Form(form)<</code>> ===== ** Arguments: ; ** form : (string or number or nil) Localized form or stance name or global id number of the spell to compare to. ===== ** Returns: ; ** currentForm : (string or nil) Currently used localized form or stance name or nil if you are not in a form or it did not match the given form or stance name. \\ ---- \\ === ** s.InCombat This is used to determine if you are in combat. <<code lua>>inCombat = s.InCombat()<</code>> ===== ** Returns: ; ** inCombat : (boolean) True if you are in combat. \\ ---- \\ === ** s.Shooting Determines if the player is casting a spell which automatically repeats, such as Shoot for wand users. <<code lua>>isShooting = s.Shooting()<</code>> ===== ** Returns: ; ** isShooting : (boolean) True if you are shooting. \\ ---- \\ === ** s.MeleeDistance Determine if you are within melee distance. <<code lua>>withinMeleeRange = s.MeleeDistance(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** withinMeleeRange : (boolean) True if you are within melee range of the target if melee distance can be determined, otherwise true if you are within 10 yards of the target. \\ ---- \\ === ** s.GUIDInfo Decodes the unit GUID string to find the identification information. <<code lua>>Type, ID = s.GUIDInfo(GUID)<</code>> ===== ** Arguments: ; ** GUID : (string) The GUID string of the unit. ===== ** Returns: ; ** Type : (string) The unit type: "player", "npc", "pet", "vehicle" or "unknown". ; ** ID : (number or nil) The unit identification number. \\ ---- \\ === ** s.UnitInfo Decodes the unit GUID string to find the identification information. <<code lua>>Type, ID = s.UnitInfo(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** Type : (string or nil) The unit type: "player", "npc", "pet", "vehicle" or "unknown". ; ** ID : (number or nil) The unit identification number. \\ ---- \\ === ** s.UnitSelection Returns a unit id based on conditions. <<code lua>>Unit = s.UnitSelection(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. Use "enemy" to look for the first enemy found by searching every target of target. ===== ** Returns: ; ** Unit : (string) Returns the unit id. \\ ---- = ** Talent ---- \\ === ** s.HasTalent Determines if you have any points spent on a talent. <<code lua>>hasTalent = s.HasTalent(TalentName)<</code>> ===== ** Arguments: ; ** TalentName : (string or number) Localized name or global id number of the talent. ===== ** Returns: ; ** hasTalent : (boolean) True if you have any points spent on the talent. \\ ---- \\ === ** s.TalentRank Determines the amount of points spent on a talent. <<code lua>>rank = s.TalentRank(TalentName)<</code>> ===== ** Arguments: ; ** TalentName : (string or number) Localized name or global id number of the talent. ===== ** Returns: ; ** rank : (number) Amount of points spent on the talent. \\ ---- \\ === ** s.TalentMastery Determines the talent tree with the most points spent in it. <<code lua>>hasMastery = s.TalentMastery(TreeTabNumber)<</code>> ===== ** Arguments: ; ** TreeTabNumber : (number or nil) Number representing the talent tree tab. ===== ** Returns: ; ** hasMastery : (number or nil) Number representing the talent tree tab, or nil if no talent points are spent or the talent tree number does not match the given talent tree number. \\ ---- = ** Spell ---- \\ === ** s.Autocast Determines if a spell is set to autocast or not. <<code lua>>autocastOn = s.Autocast(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ===== ** Returns: ; ** autocastOn : (boolean) True if the spell is set to autocast. \\ ---- \\ === ** s.CastTime Determine the amount of time it will take a spell to cast from start to finish. <<code lua>>castTime = s.CastTime(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ===== ** Returns: ; ** castTime : (number) Seconds it will take a spell to cast from start to finish. \\ ---- \\ === ** s.SpellCost Determines the power cost of the spell. <<code lua>>cost = s.SpellCost(SpellName, PowerType)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** PowerType : (number or nil) Power type required. ===== ** Returns: ; ** cost : (number) Power cost of the spell. \\ ---- \\ === ** s.SpellInRange Determines if a spell is in range of a target. <<code lua>>inRange = s.SpellInRange(SpellName, unit)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** inRange : (boolean) True if the spell is in range of a target. \\ ---- \\ === ** s.SpellHasRange Determines if a spell has a range limitation. <<code lua>>hasRange = s.SpellHasRange(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ===== ** Returns: ; ** hasRange : (boolean) True if the spell has a range limitation. \\ ---- \\ === ** s.UsableSpell Determines whether a spell can be used by the player character. <<code lua>>isUsable, notEnoughMana = s.UsableSpell(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ===== ** Returns: ; ** isUsable : (boolean) True if the player has learned the spell, has the required power and reagents, and reactive conditions have been met. ; ** notEnoughMana : (boolean) True if the spell can not be cast due to low power. \\ ---- \\ === ** s.CurrentSpell Determines if one of your spells is currently casting, channeling or turned on. <<code lua>>isCurrent = s.CurrentSpell(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ===== ** Returns: ; ** isCurrent : (boolean) True if the spell is currently casting, channeling or turned on. \\ ---- = ** Availability ---- \\ === ** s.HasSpell Determines if you have learned a spell. <<code lua>>isKnown = s.HasSpell(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ===== ** Returns: ; ** isKnown : (boolean) True if you have learned the spell. \\ ---- \\ === ** s.HasItem Determines if you have an item. Does not look in your bank inventory. <<code lua>>hasItem = s.HasItem(ItemName)<</code>> ===== ** Arguments: ; ** ItemName : (string or number) Localized name or global id number of the item. ===== ** Returns: ; ** hasItem : (boolean) True if you have the item. \\ ---- \\ === ** s.HasGlyph Determines if you are currently using a glyph. <<code lua>>found = s.HasGlyph(GlyphName)<</code>> ===== ** Arguments: ; ** GlyphName : (string or number) Localized name or global spell id number of the glyph. ===== ** Returns: ; ** found : (boolean) True if you are currently using the glyph. \\ ---- = ** Cooldown ---- \\ === ** s.SpellCooldown This determines the current cooldown of the spell, including a global cooldown. <<code lua>>timeLeft, duration = s.SpellCooldown(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. If nil then this function will return a nil value instead of a number. ===== ** Returns: ; ** timeLeft : (number) Seconds currently remaining on the cooldown or 0 if not on cooldown. ; ** duration : (number) Seconds the current cooldown will last in total or 0 if not on cooldown. \\ ---- \\ === ** s.ItemCooldown This determines the current cooldown of the item, including a global cooldown. <<code lua>>timeLeft, duration = s.ItemCooldown(ItemName)<</code>> ===== ** Arguments: ; ** ItemName : (string or number) Localized name or global id number of the item. If nil then this function will return a nil value instead of a number. ===== ** Returns: ; ** timeLeft : (number) Seconds currently remaining on the cooldown or 0 if not on cooldown. ; ** duration : (number) Seconds the current cooldown will last in total or 0 if not on cooldown. \\ ---- \\ === ** s.ActionCooldown This determines the current cooldown of the action bar button, including a global cooldown. <<code lua>>timeLeft, duration = s.ActionCooldown(ActionID)<</code>> ===== ** Arguments: ; ** ActionID : (number) Slot number of the action bar button. If nil then this function will return a nil value instead of a number. ===== ** Returns: ; ** timeLeft : (number) Seconds currently remaining on the cooldown or 0 if not on cooldown. ; ** duration : (number) Seconds the current cooldown will last in total or 0 if not on cooldown. \\ ---- \\ === ** s.PetActionCooldown This determines the current cooldown of the pet action bar button, including a global cooldown. <<code lua>>timeLeft, duration = s.PetActionCooldown(PetActionID)<</code>> ===== ** Arguments: ; ** PetActionID : (number) Slot number of the pet action bar button. If nil then this function will return a nil value instead of a number. ===== ** Returns: ; ** timeLeft : (number) Seconds currently remaining on the cooldown or 0 if not on cooldown. ; ** duration : (number) Seconds the current cooldown will last in total or 0 if not on cooldown. \\ ---- = ** Casting and Channeling ---- \\ === ** s.Casting Determines if a spell is casting. <<code lua>>remaining = s.Casting(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number or nil) Seconds remaining on the cast, or nil for none. \\ ---- \\ === ** s.Channeling Determines if a spell is channeling. <<code lua>>remaining = s.Channeling(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the channel is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number or nil) Seconds remaining on the channel, or nil for none. \\ ---- \\ === ** s.CastingOrChanneling Determines if a spell is casting or channeling. <<code lua>>remaining = s.CastingOrChanneling(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast or channel is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number or nil) Seconds remaining on the cast or channel, or nil for none. \\ ---- \\ === ** s.GetCasting Determines the seconds remaining on a spell that is casting. <<code lua>>remaining = s.GetCasting(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number) Seconds remaining on the cast, or 0 for none. \\ ---- \\ === ** s.GetChanneling Determines the seconds remaining on a spell that is channeling. <<code lua>>remaining = s.GetChanneling(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the channel is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number) Seconds remaining on the channel, or 0 for none. \\ ---- \\ === ** s.GetCastingOrChanneling Determines the seconds remaining on a spell that is casting or channeling. <<code lua>>remaining = s.GetCastingOrChanneling(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast or channel is interruptible. ; ** NoSubName : (boolean) If true will not look for a sub-name match. ===== ** Returns: ; ** remaining : (number) Seconds remaining on the cast or channel, or 0 for none. \\ ---- \\ === ** s.CastingName Returns the name of a spell that is casting. <<code lua>>name = s.CastingName(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast is interruptible. ; ** NoSubName : (boolean) If true will not look for or return a sub-name match. ===== ** Returns: ; ** name : (string or nil) Name of the spell that is casting or nil for none. \\ ---- \\ === ** s.ChannelingName Returns the name of a spell that is channeling. <<code lua>>name = s.ChannelingName(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the channel is interruptible. ; ** NoSubName : (boolean) If true will not look for or return a sub-name match. ===== ** Returns: ; ** name : (string or nil) Name of the spell that is channeling or nil for none. \\ ---- \\ === ** s.CastingOrChannelingName Returns the name of a spell that is casting or channeling. <<code lua>>name = s.CastingOrChannelingName(SpellName, unit, interruptible, NoSubName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** interruptible : (boolean) If true will check to see if the cast or channel is interruptible. ; ** NoSubName : (boolean) If true will not look for or return a sub-name match. ===== ** Returns: ; ** name : (string or nil) Name of the spell that is casting or channeling or nil for none. \\ ---- = ** Target ---- \\ === ** s.Enemy Determines if a target is able to be attacked by you. <<code lua>>found = s.Enemy(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is able to be attacked by you. \\ ---- \\ === ** s.ActiveEnemy Determines if a target is able to be attacked by you, and is in combat or is a player, and is not crowed controlled. <<code lua>>found = s.ActiveEnemy(unit, NoCrowedControlCheck)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** NoCrowedControlCheck : (boolean or nil) If true will not check for a crowed control debuff. ===== ** Returns: ; ** found : (boolean) True if the target is able to be attacked by you, and is in combat or is a player, and is not crowed controlled. \\ ---- \\ === ** s.GivesXP Determines if a target is able to give you honor or experience points if you kill it. <<code lua>>found = s.GivesXP(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is able to give you honor or experience points if you kill it. \\ ---- \\ === ** s.NotDieing Determines if the target has more than 25% health or is a player or a boss that is alive. <<code lua>>found = s.NotDieing(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target has more than 25% health or is a player or a boss that is alive. \\ ---- \\ === ** s.Player Determines if the target is a player. <<code lua>>found = s.Player(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is a player. \\ ---- \\ === ** s.Boss Determines if the target is a mob that is classified as a boss or is too high of a level above you to show a level number. <<code lua>>found = s.Boss(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is a mob that is classified as a boss or is too high of a level above you to show a level number. \\ ---- \\ === ** s.EnemyTargetingYourFriend Determines if the target is able to be attacked by you and is also targeting someone other than yourself that is friendly to you. <<code lua>>found = s.EnemyTargetingYourFriend(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is able to be attacked by you and is also targeting someone other than yourself that is friendly to you. \\ ---- \\ === ** s.EnemyTargetingYou Determines if the target is able to be attacked by you and is also targeting you. <<code lua>>found = s.EnemyTargetingYou(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is able to be attacked by you and is also targeting you. \\ ---- \\ === ** s.SameTargetAsPet Determines if the target is also being targeted by your pet. <<code lua>>found = s.SameTargetAsPet(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** found : (boolean) True if the target is also being targeted by your pet. \\ ---- = ** Health ---- \\ === ** s.HealthPercent Determines the percentage of health that a target has. <<code lua>>health, counted = s.HealthPercent(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to return the lowest health percent from a raid or party member or "party" for only party members. You may also add a combination of options separated by a line pipe such as "raid|range|afk|notself|healer|notfull|average". Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. Use "notfull" to not check group members who have 90% or more health. Use "average" to get the average health of the checked group members. ===== ** Returns: ; ** health : (number) Percentage of health that a target has. Will return 0 if unknown. ; ** counted : (number or nil) This will return the number of group members counted only if "raid" or "party" is used in the unit argument. \\ ---- \\ === ** s.Health Determines the amount of health that a target has. <<code lua>>health = s.Health(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** health : (number) Amount of health that a target has. Will return 0 if unknown. \\ ---- \\ === ** s.MaxHealth Determines the maximum amount of health that a target is able to have. <<code lua>>health = s.MaxHealth(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** health : (number) Maximum amount of health that a target is able to have. Will return 0 if unknown. \\ ---- \\ === ** s.HealthDamagePercent Determines the percentage of health that a target is missing. <<code lua>>damage, counted = s.HealthDamagePercent(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to return the highest health damage percent from a raid or party member or "party" for only party members. You may also add a combination of options separated by a line pipe such as "raid|range|afk|notself|healer|notfull|average". Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. Use "notfull" to not check group members who have 90% or more health. Use "average" to get the average health of the checked group members. ===== ** Returns: ; ** damage : (number) Percentage of health that a target is missing. Will return 0 if unknown. ; ** counted : (number or nil) This will return the number of group members counted only if "raid" or "party" is used in the unit argument. \\ ---- \\ === ** s.HealthDamage Determines the amount of health that a target is missing. <<code lua>>damage = s.HealthDamage(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** damage : (number) Amount of health that a target is missing. Will return 0 if unknown. \\ ---- = ** Power ---- \\ === ** s.PowerPercent Determines the percentage of power that a target has. <<code lua>>power, counted = s.PowerPercent(unit, PowerType)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to return the lowest power percent from a raid or party member or "party" for only party members. You may also add a combination of options separated by a line pipe such as "raid|range|afk|notself|healer|notfull|average". Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. Use "notfull" to not check group members who have 90% or more health. Use "average" to get the average health of the checked group members. ; ** PowerType : (number or nil) The power type of the target. FrameXML defines constants in the Constants.lua file that can be used, such as SPELL_POWER_ENERGY. If nil, uses the current primary type such as energy for a druid in cat form. ===== ** Returns: ; ** power : (number) Percentage of power that a target has. Will return 0 if unknown. ; ** counted : (number or nil) This will return the number of group members counted only if "raid" or "party" is used in the unit argument. \\ ---- \\ === ** s.Power Determines the amount of power that a target has. <<code lua>>power = s.Power(unit, PowerType)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** PowerType : (number or nil) The power type of the target. FrameXML defines constants in the Constants.lua file that can be used, such as SPELL_POWER_ENERGY. If nil, uses the current primary type such as energy for a druid in cat form. ===== ** Returns: ; ** power : (number) Amount of power that a target has. Will return 0 if unknown. \\ ---- \\ === ** s.MaxPower Determines the maximum amount of power that a target is able to have. <<code lua>>power = s.MaxPower(unit, PowerType)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** PowerType : (number or nil) The power type of the target. FrameXML defines constants in the Constants.lua file that can be used, such as SPELL_POWER_ENERGY. If nil, uses the current primary type such as energy for a druid in cat form. ===== ** Returns: ; ** power : (number) Maximum amount of power that a target is able to have. Will return 0 if unknown. \\ ---- \\ === ** s.PowerMissingPercent Determines the percentage of power that a target is missing. <<code lua>>missing, counted = s.PowerMissingPercent(unit, PowerType)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to return the highest power missing percent from a raid or party member or "party" for only party members. You may also add a combination of options separated by a line pipe such as "raid|range|afk|notself|healer|notfull|average". Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. Use "notfull" to not check group members who have 90% or more health. Use "average" to get the average health of the checked group members. ; ** PowerType : (number or nil) The power type of the target. FrameXML defines constants in the Constants.lua file that can be used, such as SPELL_POWER_ENERGY. If nil, uses the current primary type such as energy for a druid in cat form. ===== ** Returns: ; ** missing : (number) Percentage of power that a target is missing. Will return 0 if unknown. ; ** counted : (number or nil) This will return the number of group members counted only if "raid" or "party" is used in the unit argument. \\ ---- \\ === ** s.PowerMissing Determines the amount of power that a target is missing. <<code lua>>missing = s.PowerMissing(unit, PowerType)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** PowerType : (number or nil) The power type of the target. FrameXML defines constants in the Constants.lua file that can be used, such as SPELL_POWER_ENERGY. If nil, uses the current primary type such as energy for a druid in cat form. ===== ** Returns: ; ** missing : (number) Amount of power that a target is missing. Will return 0 if unknown. \\ ---- \\ === ** s.UsesMana Determines if any of the targets power bars are for mana. <<code lua>>usesMana = s.UsesMana(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** usesMana : (boolean) True if any of the targets power bars are for mana. \\ ---- \\ === ** s.HasMana Determines if any of the targets power bars are for mana and is not empty. <<code lua>>hasMana = s.HasMana(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** hasMana : (boolean) True if any of the targets power bars are for mana and is not empty. \\ ---- = ** Equipped Item ---- \\ === ** s.MainHand Determines if you have an item type that is not broken in the main hand. <<code lua>>Type = s.MainHand(ItemType)<</code>> ===== ** Arguments: ; ** ItemType : (string or number or nil) Localized name or global spell id number of the item type, or nil for any. ===== ** Returns: ; ** Type : (string or nil) Localized name of the item type, or nil if not found. \\ ---- \\ === ** s.OffHand Determines if you have an item type that is not broken in the off hand. <<code lua>>Type = s.OffHand(ItemType)<</code>> ===== ** Arguments: ; ** ItemType : (string or number or nil) Localized name or global spell id number of the item type, or nil for any. ===== ** Returns: ; ** Type : (string or nil) Localized name of the item type, or nil if not found. \\ ---- \\ === ** s.ShieldEquipped Determines if you have a shield that is not broken in the off hand. <<code lua>>found = s.ShieldEquipped()<</code>> ===== ** Returns: ; ** found : (string or nil) Localized name of the item type, or nil if not found. \\ ---- \\ === ** s.Equipped Determines if you have an item equipped that is not broken. <<code lua>>slot = s.Equipped(ItemName, Slot)<</code>> ===== ** Arguments: ; ** ItemName : (string or number or table or nil) Localized name or global id number or table of localized names or global id numbers of the item. May be nil if the Slot argument is used. ; ** Slot : (string or number or nil) Name or number of an inventory slot to query. ===== ** Returns: ; ** slot : (number or nil) Slot number that the item is equipped in or nil if broken or not found. \\ ---- = ** Buff ---- \\ === ** s.Buff This checks for buffs. <<code lua>>found = s.Buff(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to check raid and party members or "party" to only check party members. You may also add a combination of options separated by a line pipe such as "raid|all|range|afk|notself|healer". Use "all" to only return true if all group members have the buff. Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** found : (number or nil) 1 if the buff is found and all of the included arguments passed the checks or nil. \\ ---- \\ === ** s.BuffStack Determines the amount of applications for a buff. <<code lua>>applications = s.BuffStack(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** applications : (number) Amount of applications on the found buff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. \\ ---- \\ === ** s.BuffDuration Determines the remaining time left on a buff. <<code lua>>remaining = s.BuffDuration(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** remaining : (number) Seconds left on the found buff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. Will give the highest duration remaining found when a table of spell names or Global ID numbers is used. \\ ---- \\ === ** s.MyBuff This checks for buffs that came from you. <<code lua>>found = s.MyBuff(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to check raid and party members or "party" to only check party members. You may also add a combination of options separated by a line pipe such as "raid|all|range|afk|notself|healer". Use "all" to only return true if all group members have the buff. Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** found : (number or nil) 1 if the buff is found and all of the included arguments passed the checks or nil. \\ ---- \\ === ** s.MyBuffStack Determines the amount of applications for a buff that came from you. <<code lua>>applications = s.MyBuffStack(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** applications : (number) Amount of applications on the found buff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. \\ ---- \\ === ** s.MyBuffDuration Determines the remaining time left on a buff that came from you. <<code lua>>remaining = s.MyBuffDuration(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** remaining : (number) Seconds left on the found buff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. Will give the highest duration remaining found when a table of spell names or Global ID numbers is used. \\ ---- \\ === ** s.SelfBuff This checks for buffs that are cast from the same unit that you are checking. <<code lua>>found = s.SelfBuff(SpellName, unit, DurationRemainingGreaterThan, Stealable, Castable, SpellToolTipLineTwo)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. You may use the string "raid" to check raid and party members or "party" to only check party members. You may also add a combination of options separated by a line pipe such as "raid|all|range|afk|notself|healer". Use "all" to only return true if all group members have the buff. Use "range" to make sure that the unit is in range of most common spells. Use "afk" to make sure that the unit is not AFK. Use "notself" to not check yourself. Use "healer" to make sure the unit is a healer class. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the buff is able to be spellstolen. ; ** Castable : (boolean) If true will check to see if the buff is from a spell that you have. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the buff's tooltip. ===== ** Returns: ; ** found : (number or nil) 1 if the buff is found and all of the included arguments passed the checks or nil. \\ ---- = ** Item Buff ---- \\ === ** s.MainHandItemBuff Checks to see if your currently equipped main hand item has a temporary buff. <<code lua>>found = s.MainHandItemBuff(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** found : (number or nil) 1 if the buff is found or nil. \\ ---- \\ === ** s.MainHandItemBuffStack Determines the amount of charges for a temporary buff on your currently equipped main hand item. <<code lua>>charges = s.MainHandItemBuffStack(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** charges : (number) Amount of charges if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- \\ === ** s.MainHandItemBuffDuration Determines the remaining time left for a temporary buff on your currently equipped main hand item. <<code lua>>remaining = s.MainHandItemBuffDuration(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** remaining : (number) Seconds left if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- \\ === ** s.OffHandItemBuff Checks to see if your currently equipped off hand item has a temporary buff. <<code lua>>found = s.OffHandItemBuff(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** found : (number or nil) 1 if the buff is found or nil. \\ ---- \\ === ** s.OffHandItemBuffStack Determines the amount of charges for a temporary buff on your currently equipped off hand item. <<code lua>>charges = s.OffHandItemBuffStack(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** charges : (number) Amount of charges if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- \\ === ** s.OffHandItemBuffDuration Determines the remaining time left for a temporary buff on your currently equipped off hand item. <<code lua>>remaining = s.OffHandItemBuffDuration(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** remaining : (number) Seconds left if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- \\ === ** s.RangedItemBuff Checks to see if your currently equipped ranged item has a temporary buff. <<code lua>>found = s.RangedItemBuff(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** found : (boolean) 1 if the buff is found or nil. \\ ---- \\ === ** s.RangedItemBuffStack Determines the amount of charges for a temporary buff on your currently equipped ranged item. <<code lua>>charges = s.RangedItemBuffStack(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** charges : (number) Amount of charges if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- \\ === ** s.RangedItemBuffDuration Determines the remaining time left for a temporary buff on your currently equipped ranged item. <<code lua>>remaining = s.RangedItemBuffDuration(SpellName, DurationRemainingGreaterThan)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global spell id number, or a table of localized names or global id numbers, or nil for any. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the buff has more seconds left on its duration than this. ===== ** Returns: ; ** remaining : (number) Seconds left if all of the included arguments passed the checks, or 0 if not buffed or the argument checks did not all pass. \\ ---- = ** Debuff ---- \\ === ** s.Debuff This checks for debuffs. <<code lua>>found = s.Debuff(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** found : (number or nil) 1 if the debuff is found and all of the included arguments passed the checks or nil. \\ ---- \\ === ** s.DebuffStack Determines the amount of applications for a debuff. <<code lua>>applications = s.DebuffStack(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** applications : (number) Amount of applications on the found debuff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. \\ ---- \\ === ** s.DebuffDuration Determines the remaining time left on a debuff. <<code lua>>remaining = s.DebuffDuration(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** remaining : (number) Seconds left on the found debuff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. Will give the highest duration remaining found when a table of spell names or Global ID numbers is used. \\ ---- \\ === ** s.MyDebuff This checks for debuffs that came from you. <<code lua>>found = s.MyDebuff(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table or nil) Localized name or global id number of the spell, or a table of localized names or global id numbers, or nil for any spell name. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** found : (number or nil) 1 if the debuff is found and all of the included arguments passed the checks or nil. \\ ---- \\ === ** s.MyDebuffStack Determines the amount of applications for a debuff that came from you. <<code lua>>applications = s.MyDebuffStack(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** applications : (number) Amount of applications on the found debuff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. \\ ---- \\ === ** s.MyDebuffDuration Determines the remaining time left on a debuff that came from you. <<code lua>>remaining = s.MyDebuffDuration(SpellName, unit, DurationRemainingGreaterThan, Stealable, Dispelable, SpellToolTipLineTwo, Type)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ; ** SpellToolTipLineTwo : (string or nil) This searches for a name or phrase in the second line of the debuff's tooltip. ; ** Type : (string or nil) Checks to see if the debuff is a spell type: "Magic", "Disease", "Poison" or "Curse". ===== ** Returns: ; ** remaining : (number) Seconds left on the found debuff if all of the included arguments passed the checks, or 0 if not found or the argument checks did not all pass. Will give the highest duration remaining found when a table of spell names or Global ID numbers is used. \\ ---- \\ === ** s.AllDebuffSlotsUsed Determines if the last available debuff slot is being used. <<code lua>>full = s.AllDebuffSlotsUsed(unit)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** full : (boolean) True if the last available debuff slot is being used. \\ ---- = ** Pre-configured Debuff ---- \\ === ** s.BreakOnDamageCC Determines if a target has a crowed control debuff on it that will break if the target is damaged. <<code lua>>found = s.BreakOnDamageCC(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target has a crowed control debuff on it that will break if the target is damaged or nil. \\ ---- \\ === ** s.ImmunityDebuff Determines if a target has a debuff on it that makes the target immune to damage. <<code lua>>found = s.ImmunityDebuff(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target has a debuff on it that makes the target immune to damage or nil. \\ ---- \\ === ** s.NoDamageCC Determines if a target has a crowed control debuff on it that will break if the target is damaged or makes the target immune to damage. <<code lua>>found = s.NoDamageCC(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target has a crowed control debuff on it that will break if the target is damaged or makes the target immune to damage or nil. \\ ---- \\ === ** s.CrowedControlled Determines if a target has a crowed control debuff on it that will break if the target is damaged or makes the target immune to damage, or the target is feared. <<code lua>>found = s.CrowedControlled(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target has a crowed control debuff on it that will break if the target is damaged or makes the target immune to damage, or the target is feared or nil. \\ ---- \\ === ** s.Feared Determines if a target is feared. <<code lua>>found = s.Feared(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is feared or nil. \\ ---- \\ === ** s.Rooted Determines if a target is rooted. <<code lua>>found = s.Rooted(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is rooted or nil. \\ ---- \\ === ** s.MovementImpaired Determines if a target is movement impaired. <<code lua>>found = s.MovementImpaired(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is movement impaired or nil. \\ ---- \\ === ** s.Poisoned Determines if a target is poisoned. <<code lua>>found = s.Poisoned(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is poisoned or nil. \\ ---- \\ === ** s.Diseased Determines if a target is diseased. <<code lua>>found = s.Diseased(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is diseased or nil. \\ ---- \\ === ** s.Cursed Determines if a target is cursed. <<code lua>>found = s.Cursed(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target is cursed or nil. \\ ---- \\ === ** s.Magic Determines if a target has a magic debuff. <<code lua>>found = s.Magic(unit, DurationRemainingGreaterThan, Stealable, Dispelable)<</code>> ===== ** Arguments: ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ; ** DurationRemainingGreaterThan : (number or nil) Checks to see if the debuff has more seconds left on its duration than this. ; ** Stealable : (boolean) If true will check to see if the debuff is able to be spellstolen. ; ** Dispelable : (boolean) If true will check to see if you have a spell that is capable if dispelling the debuff. ===== ** Returns: ; ** found : (number or nil) 1 if the target has a magic debuff or nil. \\ ---- = ** Spell and Aura Travel Time ---- \\ === ** s.SpellDelay This determines if your spell has been cast but has not yet reached its target. <<code lua>>traveling = s.SpellDelay(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ===== ** Returns: ; ** traveling : (number or nil) How many spell casts for your specified spell(s) while targeting the same target have yet to land, or nil for none. \\ ---- \\ === ** s.AuraDelay This determines if your spell has landed on its target but has not yet applied its buff or debuff. <<code lua>>waiting = s.AuraDelay(SpellName, unit)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** waiting : (number or nil) 1 if your spell that has landed has not yet applied a buff or debuff or nil. \\ ---- \\ === ** s.SpellOrAuraDelay This determines if your spell has been cast but has not yet reached its target, or if your spell has landed on its target but has not yet applied its buff or debuff. <<code lua>>waiting = s.SpellOrAuraDelay(SpellName, unit)<</code>> ===== ** Arguments: ; ** SpellName : (string or number or table) Localized name or global id number of the spell, or a table of localized names or global id numbers. ; ** unit : (string or nil) UnitId or nil for "target" or "focus" depending on if the focus casting modifier key is pressed. ===== ** Returns: ; ** waiting : (number or nil) How many spell casts for your specified spell(s) have yet to land, or nil for none. \\ ---- \\ === ** s.RegisterOtherAurasFunction Registers a function to be ran whenever scripts using the s.SetOtherAuras function should be processed. <<code lua>>s.RegisterOtherAurasFunction(Function)<</code>> ===== ** Arguments: ; ** Function : (function) A function that utilises the s.SetOtherAuras function. \\ ---- \\ === ** s.SetOtherAuras Use this to indicate your spell that applies a buff or debuff but has a different name than the buff or debuff, so that the buff or debuff name may be used with the s.SpellDelay, s.AuraDelay and s.SpellOrAuraDelay functions. <<code lua>>s.SetOtherAuras(Spell, Aura, Delete)<</code>> ===== ** Arguments: ; ** Spell : (string or number) Localized name or global id number of your spell. ; ** Aura : (string or number) Localized name or global spell id number of buff or debuff. ; ** Delete : (boolean) If true will remove this information from the listing. This information is automatically cleared before the functions added with the s.RegisterOtherAurasFunction function are called anyway. \\ ---- = ** Castable ---- \\ === ** s.Castable Determines if a spell is able to be cast. <<code lua>>castable = s.Castable(InfoArray)<</code>> ===== ** Arguments: ; ** InfoArray : (table) A table of arguments. <<code lua>>-- Example table: a.spells["English_Spell_Name"] = { Type = "spell", --this indicates what kind of spell this is ID = GlobalSpellID--[[English_Spell_Name]], --this is for defining the correct name of the spell DebuffSlotNeeded = 1, --use this if you want to make sure that a debuff slot is free on the target so that you do not replace other debuffs Debuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may only be on a target once in total from everyone and has a cooldown shorter than the debuff duration MyDebuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may be on the target multiple times by many people and has a cooldown shorter than the debuff duration Buff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may only be on yourself once in total from everyone and has a cooldown shorter than the buff duration MyBuff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may be on the target multiple times by many people and has a cooldown shorter than the buff duration BuffUnit = "player", --you will need to use this if the buff or debuff is not applied to your target Stack = 2, --use this if the buff or debuff requires more than one application EarlyRefresh = 5, --use this to indicate the buff or debuff early for a desired number of seconds CastTime = 0, --use this only if you want to replace the spell cast time used for early indication of a buff or debuff EnemyTargetNeeded = 1, --use this if the spell should have an enemy targeted TargetThatUsesManaNeeded = 1, --use this if the spell is only useful on a target that uses mana such as mana draining spells NoRangeCheck = 1, --use this to disable range detection if the spell has a limited range but the detection in this function is not working correctly for the particular spell NotIfActive = 1, --use this if the spell may be toggled on such as auto attack or on next swing spells, or to disable when casting or channeling, or if the spell has a cooldown NotWhileMoving = 1, --use this if the spell is not able to be cast while moving NoPowerCheck = 1, --use this to disable the power checking in this function EvenIfNotUsable = 1, --use this to disable the usability checking in this function and may be used if currently in the process of completing a prerequisite that will make the spell usable Unit = "target", --this should not be used unless the spell is not to be cast on the target Interrupt = 1, --use this if the target should be casting or channeling an interruptible ability CheckFirst = function() return true end, --use this to check conditions or modify settings first before everything else has been checked CheckLast = function() return true end, --use this to check conditions last after everything else has been checked Override = function() return true end, --use this to use this function for condition checking and nothing else FlashColor = "White", --use this to change the flash color if you want it to flash something other than white FlashSize = 240, --use this to change the flash size FlashBrightness = 100, --use this to change the flash brightness FlashBlink = 1, --use this to have the button blink FlashNoMacros = 1, --use this to not flash macros } -- Example table: a.spells["English_Spell_Name"] = { Type = "form", --this indicates what kind of spell this is ID = GlobalSpellID--[[English_Spell_Name]], --this is for defining the correct name of the spell DebuffSlotNeeded = 1, --use this if you want to make sure that a debuff slot is free on the target so that you do not replace other debuffs Debuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may only be on a target once in total from everyone and has a cooldown shorter than the debuff duration MyDebuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may be on the target multiple times by many people and has a cooldown shorter than the debuff duration Buff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may only be on yourself once in total from everyone and has a cooldown shorter than the buff duration MyBuff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may be on the target multiple times by many people and has a cooldown shorter than the buff duration BuffUnit = "player", --you will need to use this if the buff or debuff is not applied to your target Stack = 2, --use this if the buff or debuff requires more than one application EarlyRefresh = 5, --use this to indicate the buff or debuff early for a desired number of seconds CastTime = 0, --use this only if you want to replace the spell cast time used for early indication of a buff or debuff EnemyTargetNeeded = 1, --use this if the spell should have an enemy targeted TargetThatUsesManaNeeded = 1, --use this if the spell is only useful on a target that uses mana such as mana draining spells NoRangeCheck = 1, --use this to disable range detection if the spell has a limited range but the detection in this function is not working correctly for the particular spell NotIfActive = 1, --use this if the spell may be toggled on such as auto attack or on next swing spells, or to disable when casting or channeling, or if the spell has a cooldown NotWhileMoving = 1, --use this if the spell is not able to be cast while moving NoPowerCheck = 1, --use this to disable the power checking in this function EvenIfNotUsable = 1, --use this to disable the usability checking in this function and may be used if currently in the process of completing a prerequisite that will make the spell usable Unit = "target", --this should not be used unless the spell is not to be cast on the target Interrupt = 1, --use this if the target should be casting or channeling an interruptible ability CheckFirst = function() return true end, --use this to check conditions or modify settings first before everything else has been checked CheckLast = function() return true end, --use this to check conditions last after everything else has been checked Override = function() return true end, --use this to use this function for condition checking and nothing else FlashColor = "White", --use this to change the flash color if you want it to flash something other than white FlashSize = 240, --use this to change the flash size FlashBrightness = 100, --use this to change the flash brightness FlashBlink = 1, --use this to have the button blink FlashNoMacros = 1, --use this to not flash macros } -- Example table: a.spells["English_Item_Name"] = { Type = "item", --this indicates what kind of spell this is ID = ItemID--[[English_Item_Name]], --this is for defining the correct name of the item DebuffSlotNeeded = 1, --use this if you want to make sure that a debuff slot is free on the target so that you do not replace other debuffs Debuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the item has a debuff that may only be on a target once in total from everyone and has a cooldown shorter than the debuff duration MyDebuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the item has a debuff that may be on the target multiple times by many people and has a cooldown shorter than the debuff duration Buff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the item has a buff that may only be on yourself once in total from everyone and has a cooldown shorter than the buff duration MyBuff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the item has a buff that may be on the target multiple times by many people and has a cooldown shorter than the buff duration BuffUnit = "player", --you will need to use this if the buff or debuff is not applied to your target Stack = 2, --use this if the buff or debuff requires more than one application EarlyRefresh = 5, --use this to indicate the buff or debuff early for a desired number of seconds CastTime = 0, --use this if the item has a cast time for indication of a buff or debuff early EnemyTargetNeeded = 1, --use this if the item should have an enemy targeted TargetThatUsesManaNeeded = 1, --use this if the item is only useful on a target that uses mana such as mana draining items NoRangeCheck = 1, --use this to disable range detection if the item has a limited range but the detection in this function is not working correctly for the particular item NoEquipCheck = 1, --use this to disable equippable detection if the item can be equipped but does not need to be NotIfActive = 1, --use this if the item may be toggled on such as auto attack or on next swing spells, or to disable when casting or channeling, or if the item has a cooldown NotWhileMoving = 1, --use this if the item is not able to be used while moving NoPowerCheck = 1, --use this to disable the power checking in this function EvenIfNotUsable = 1, --use this to disable the usability checking in this function and may be used if currently in the process of completing a prerequisite that will make the item usable Unit = "target", --this should not be used unless the item is not to be cast on the target Interrupt = 1, --use this if the target should be casting or channeling an interruptible ability CheckFirst = function() return true end, --use this to check conditions or modify settings first before everything else has been checked CheckLast = function() return true end, --use this to check conditions last after everything else has been checked Override = function() return true end, --use this to use this function for condition checking and nothing else FlashColor = "White", --use this to change the flash color if you want it to flash something other than white FlashSize = 240, --use this to change the flash size FlashBrightness = 100, --use this to change the flash brightness FlashBlink = 1, --use this to have the button blink FlashNoMacros = 1, --use this to not flash macros } -- Example table: a.spells["English_Spell_Name"] = { Type = "vehicle", --this indicates what kind of spell this is ID = GlobalSpellID--[[English_Spell_Name]], --this is for defining the correct name of the spell DebuffSlotNeeded = 1, --use this if you want to make sure that a debuff slot is free on the target so that you do not replace other debuffs Debuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may only be on a target once in total from everyone and has a cooldown shorter than the debuff duration MyDebuff = GlobalSpellID--[[English_Spell_Name]], --place debuff ID or table of IDs here if the spell has a debuff that may be on the target multiple times by many people and has a cooldown shorter than the debuff duration Buff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may only be on yourself once in total from everyone and has a cooldown shorter than the buff duration MyBuff = GlobalSpellID--[[English_Spell_Name]], --place buff ID or table of IDs here if the spell has a buff that may be on the target multiple times by many people and has a cooldown shorter than the buff duration BuffUnit = "vehicle", --you will need to use this if the buff or debuff is not applied to your target Stack = 2, --use this if the buff or debuff requires more than one application EarlyRefresh = 5, --use this to indicate the buff or debuff early for a desired number of seconds CastTime = 0, --use this if the spell has a cast time for indication of a buff or debuff early EnemyTargetNeeded = 1, --use this if the spell should have an enemy targeted TargetThatUsesManaNeeded = 1, --use this if the spell is only useful on a target that uses mana such as mana draining spells NoRangeCheck = 1, --use this to disable range detection if the spell has a limited range but the detection in this function is not working correctly for the particular spell NotIfActive = 1, --use this if the spell may be toggled on such as auto attack or on next swing spells, or to disable when casting or channeling, or if the spell has a cooldown NotWhileMoving = 1, --use this if the spell is not able to be cast while moving NoPowerCheck = 1, --use this to disable the power checking in this function EvenIfNotUsable = 1, --use this to disable the usability checking in this function and may be used if currently in the process of completing a prerequisite that will make the spell usable GlobalVehicleCooldownSpell = GlobalSpellID--[[English_Spell_Name]], -- use this if spell has more than a global cooldown Unit = "target", --this should not be used unless the spell is not to be cast on the target Interrupt = 1, --use this if the target should be casting or channeling an interruptible ability CheckFirst = function() return true end, --use this to check conditions or modify settings first before everything else has been checked CheckLast = function() return true end, --use this to check conditions last after everything else has been checked Override = function() return true end, --use this to use this function for condition checking and nothing else FlashColor = "White", --use this to change the flash color if you want it to flash something other than white FlashSize = 240, --use this to change the flash size FlashBrightness = 100, --use this to change the flash brightness FlashBlink = 1, --use this to have the button blink } -- Example table: a.spells["English_Spell_Name"] = { Type = "pet", --this indicates what kind of spell this is ID = GlobalSpellID--[[English_Spell_Name]], --this is for defining the correct name of the spell PetFrameNeeded = 1, --use this is the pet frame needs to be shown to cast this spell PetHealthNotNeeded = 1, --use this if the pet does not need to have health to cast this spell GlobalPetCooldownSpell = GlobalSpellID--[[English_Spell_Name]], -- use this if spell has more than a global cooldown EvenIfNotUsable = 1, --use this to disable the usability checking in this function and may be used if currently in the process of completing a prerequisite that will make the spell usable Unit = "pettarget", --this should not be used unless the spell is not to be cast on the pet's target }<</code>> ===== ** Returns: ; ** castable : (boolean) True if the spell is ready to be cast. \\ ---- \\ === ** s.CheckThenFlash Determines if a spell is able to be cast and if so flashes it. <<code lua>>castable = s.CheckThenFlash(InfoArray)<</code>> ===== ** Arguments: ; ** InfoArray : (table) A table of arguments. ===== ** Returns: ; ** castable : (boolean) True if the spell is ready to be cast. \\ ---- = ** Flash Functionality ---- \\ === ** s.Flashable Determines if a specified spell is able to be found on the action bars to be flashed. <<code lua>>found = s.Flashable(SpellName, NoMacros)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Spell name or global spell id number. ; ** NoMacros : (boolean) If true will skip checking for macros. ===== ** Returns: ; ** found : (boolean) True if a specified spell is able to be found on the action bars to be flashed. \\ ---- \\ === ** s.Flash This is used to flash an action bar spell. <<code lua>>s.Flash(SpellName, color, size, brightness, blink, NoMacros)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Spell name or global spell id number. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. ; ** NoMacros : (boolean) If true will skip checking for macros. \\ ---- \\ === ** s.FlashPet This is used to flash a pet bar spell. <<code lua>>s.FlashPet(SpellName, color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.FlashForm This is used to flash a stance, form, presence, aura or aspect bar spell. <<code lua>>s.FlashForm(SpellName, color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.FlashTotemCall This is used to flash the multiple totem call button. <<code lua>>s.FlashTotemCall(color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.FlashTotemRecall This is used to flash the multiple totem recall button. <<code lua>>s.FlashTotemRecall(color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.FlashFrame This is used to flash a frame. <<code lua>>s.FlashFrame(frame, color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** frame : (variable) The variable assigned to a frame that you want to be flashed. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.ItemFlashable Determines if a specified item is able to be found on the action bars to be flashed. <<code lua>>found = s.ItemFlashable(ItemName, NoMacros)<</code>> ===== ** Arguments: ; ** ItemName : (string or number) Item name or item id number. ; ** NoMacros : (boolean) If true will skip checking for macros. ===== ** Returns: ; ** found : (boolean) True if a specified item is able to be found on the action bars to be flashed. \\ ---- \\ === ** s.FlashItem This is used to flash an action bar item. <<code lua>>s.FlashItem(ItemName, color, size, brightness, blink, NoMacros)<</code>> ===== ** Arguments: ; ** ItemName : (string or number) Item name or item id number. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. ; ** NoMacros : (boolean) If true will skip checking for macros. \\ ---- \\ === ** s.VehicleFlashable Determines if a specified spell is able to be found on the vehicle action bar to be flashed. <<code lua>>found = s.VehicleFlashable(SpellName)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ===== ** Returns: ; ** found : (boolean) True if a specified spell is able to be found on the vehicle action bar to be flashed. \\ ---- \\ === ** s.FlashVehicle This is used to flash a vehicle bar spell. <<code lua>>s.FlashVehicle(SpellName, color, size, brightness, blink)<</code>> ===== ** Arguments: ; ** SpellName : (string or number) Localized name or global id number of the spell. ; ** color : (string or table or nil) Will accept color tables {r=1.0, g=1.0, b=1.0} or a string with the name of a color that has already been defined. May be nil for "White". ; ** size : (number or nil) Percent for the flash size or nil for default. ; ** brightness : (number or nil) Percent for the flash brightness or nil for default. ; ** blink : (boolean) If true will make the action button fade in and out. \\ ---- \\ === ** s.FlashSizePercent Gives the percent that SpellFlash has been set to for the flash size. <<code lua>>percent = s.FlashSizePercent()<</code>> ===== ** Returns: ; ** percent : (number) Percent that SpellFlash has been set to for the flash size. \\ ---- \\ === ** s.FlashBrightnessPercent Gives the percent that SpellFlash has been set to for the flash brightness. <<code lua>>percent = s.FlashBrightnessPercent()<</code>> ===== ** Returns: ; ** percent : (number) Percent that SpellFlash has been set to for the flash brightness. \\ ---- = ** Module Configurations ---- \\ === ** s.GetModuleConfig This is used to get the value of a module configuration. <<code lua>>value = s.GetModuleConfig(AddonName, config)<</code>> ===== ** Arguments: ; ** AddonName : (string) Addon name of the module. ; ** config : (string) Name of the module configuration. ===== ** Returns: ; ** value : Value of the module configuration. \\ ---- \\ === ** s.SetModuleConfig This is used to set the value of a module configuration. <<code lua>>s.SetModuleConfig(AddonName, config, value)<</code>> ===== ** Arguments: ; ** AddonName : (string) Addon name of the module. ; ** config : (string) Name of the module configuration. ; ** value : Any value to save to the module configuration or nil to delete the module configuration. \\ ---- \\ === ** s.ClearAllModuleConfigs This is used to delete all module configuration values. <<code lua>>s.ClearAllModuleConfigs(AddonName)<</code>> ===== ** Arguments: ; ** AddonName : (string) Addon name of the module. \\ ---- = ** local x = SpellFlashAddon.UpdatedVariables ---- \\ === ** x.Enemy This is used to determine if you are targeting an enemy. <<code lua>>value = x.Enemy<</code>> ===== ** Returns: ; ** value : (boolean) True if you are targeting an enemy. \\ ---- \\ === ** x.ActiveEnemy This is used to determine if you are targeting an active enemy. <<code lua>>value = x.ActiveEnemy<</code>> ===== ** Returns: ; ** value : (boolean) True if you are targeting an active enemy. \\ ---- \\ === ** x.NoCC This is used to determine if your target does not have a crowed control debuff. <<code lua>>value = x.NoCC<</code>> ===== ** Returns: ; ** value : (boolean) True if your target does not have a crowed control debuff. \\ ---- \\ === ** x.InInstance This is used to determine if you are in an instance. <<code lua>>value = x.InInstance<</code>> ===== ** Returns: ; ** value : (number or nil) 1 if the player is in an instance or nil otherwise. \\ ---- \\ === ** x.InstanceType This is used to determine the type of instance you are in. <<code lua>>value = x.InstanceType<</code>> ===== ** Returns: ; ** value : (string) "none" when outside an instance, "pvp" when in a battleground, "arena" when in an arena, "party" when in a 5-man instance and "raid" when in a raid instance. \\ ---- \\ === ** x.PetAlive This is used to determine if you have a combat pet that is out and alive. <<code lua>>value = x.PetAlive<</code>> ===== ** Returns: ; ** value : (boolean) True if you have a combat pet that is out and alive. \\ ---- \\ === ** x.PetActiveEnemy This is used to determine if your pet has a target that is an active enemy. <<code lua>>value = x.PetActiveEnemy<</code>> ===== ** Returns: ; ** value : (boolean) True if your pet has a target that is an active enemy. \\ ---- \\ === ** x.PetNoCC This is used to determine if your pet's target does not have a crowed control debuff. <<code lua>>value = x.PetNoCC<</code>> ===== ** Returns: ; ** value : (boolean) True if your pet's target does not have a crowed control debuff. \\ ---- \\ === ** x.Lag This is used to find the network latency in seconds. <<code lua>>value = x.Lag<</code>> ===== ** Returns: ; ** value : (number) Network latency in seconds. \\ ---- \\ === ** x.DoubleLag This is used to find the network latency in seconds times two. <<code lua>>value = x.DoubleLag<</code>> ===== ** Returns: ; ** value : (number) Network latency in seconds times two. \\ ---- \\ === ** x.ThreatPercent This is used to find the threat percent you have with your current target. <<code lua>>value = x.ThreatPercent<</code>> ===== ** Returns: ; ** value : (number) Your threat on the target as a percentage of the amount required to pull aggro, scaled according to your range from the target. At 100 you will pull aggro. 100 if you are tanking and 0 if you are not on the target's threat list. \\ ---- \\ === ** x.EnemyDetected This is used to determine if you are in combat or an enemy is targeted. <<code lua>>value = x.EnemyDetected<</code>> ===== ** Returns: ; ** value : (boolean) True if you are in combat or an enemy is targeted. \\ ---- \\ === ** x.ShouldPermanentBuff This is used to determine if you should cast buffs that have an unlimited duration. <<code lua>>value = x.ShouldPermanentBuff<</code>> ===== ** Returns: ; ** value : (boolean) True if you should cast buffs that have an unlimited duration. \\ ---- \\ === ** x.ShouldTemporaryBuff This is used to determine if you should cast buffs that have a limited duration. <<code lua>>value = x.ShouldTemporaryBuff<</code>> ===== ** Returns: ; ** value : (boolean) True if you should cast buffs that have a limited duration.
Markup Type:
The type of markup for this entry.
Click here for details
.
BBCode
Markdown
Plain Text
Safe HTML
WikiCreole