DataType:cachedbuff

From the wonderful RedGuides Wiki

Allows checking if cached buffs on others have expired without targeting. Inherits members from DataType:spell

NOTE: Buff caching is now default in MacroQuest. You're advised to use DataType:buff for nearly all cases. See this note on the official docs.


This Data Type is added by core MacroQuest.
cachedbuff is used as a return type by these members:  [ Toggle ]

Page Member Description
spawn Buff[#] Returns the target's spell by buff index number, or the first buff if no Index is provided.
Buff[name] Returns the target's spell name, or the first buff if no Index is provided.
CachedBuff[#|*|^x] Caches buff information cast on others. Index accepts spell ID by default. To accept buffslot (between 1 and 97) prefix with #. The * prefix is for an index, and ^ prefix is a keyword (Slowed Rooted Mezzed Crippled Maloed Tashed Snared and Beneficial).
FindBuff[<term> <option>...] Uses the Buff Find DSL to search for buffs.
MyBuff[#|name]
target Aego Returns the name of this type of spell if one exists on the target.
Beneficial
Brells
Charmed
Clarity
Corrupted
Crippled
Cursed
Diseased
Dotted
DSed
Feared
Focus
Growth
Hasted
HybridHP
Invulnerable
Maloed
Mezzed
Poisoned
Pred
Regen
RevDSed
Rooted
SE
Shining
Silenced
Skin
Slowed
Snared
Strength
SV
Symbol
Tashed

Members

Type Member Description
int Count Returns the amount of buffs catched, or -1 if none
Slot Returns the buff slot the target had the buff in
SpellID Alias: ID. Returns the buff's spell ID
spell Spell Access the spell type
string Caster Alias: CasterName. Returns the name of the caster who applied the cached buff
timestamp Duration Returns the duration of the cached buff
OriginalDuration Original duration of the buff
Staleness How long since information was refreshed

Inherits spell

You may also use members of spell, shown here: [ Toggle ]

Type Member Description
action Inspect Open an inspect window for the spell
bool Beneficial
CanMGB
Deletable If spell can be deleted from spellbook
Dispellable returns true if a spell can be dispelled
HasSPA[#]
IllusionOkWhenMounted Can you mount with that illusion?
IsActiveAA
IsSkill is this spell a skill?
IsSwarmSpell Is this spell a Swarm spell?
StacksPet[duration] Does the selected spell stack with your pet's current buffs (duration is in ticks)
StacksSpawn[#|name] Stack on spawn?
StacksTarget Does the selected spell stack with your target's current buffs
StacksWithDiscs
Stacks[duration] Alias: NewStacks. Does the selected spell stack with your current buffs? Duration is in ticks.
WillStack[name] Alias: StacksWith, NewStacksWith. If a spell stack with another spell. Does not work with AAs.
float AERange AE range (group spells use this for their range)
MyRange Adjusted spell range, including focus effects, etc.
PushBack Push back amount
Range Maximum range to target (use AERange for AE and group spells)
int ActorTagId
Attrib[#]
AutoCast
BaseEffectsFocusCap
CalcIndex
Calc[#]
CategoryID category ID this spell belongs to
DurationValue1 Duration of the spell (if any)
DurationWindow
EnduranceCost
GemIcon Icon number of the spell. Example ${Spell[blah].GemIcon}
HastePct Percentage of haste, example of use ${Me.Hasted.HastePct} or ${Spell[Speed of Milyex].HastePct}
ID spell id
Level
Location Appears to be max distance
Mana Mana cost (unadjusted)
MinCasterLevel Reports the minimum class level of a spell. A use case is when you want to check if your spell is too powerful for the intended target.
NoExpendReagentID[#]
NumEffects
Rank Returns either 1, 2 or 3 for spells and 4-30 for clickables and potions.
ReagentCount[#]
ReagentID[#]
RecastTimerID
ResistAdj Resist adjustment
SlowPct Percentage of slow, example of use ${Target.Slowed.SlowPct} or ${Spell[Slowing Helix].SlowPct}
SpellGroup
SpellIcon ID of the icon used for the spell. You may also use "BookIcon" or "GemIcon"
SubcategoryID ID of the subcategory for the spell.
SubSpellGroup
TimeOfDay
WillLand This is like stacks but without the duration check. It's a clean: "Will this spell land." Returns the slot it would land in.
WillLandPet Same as WillLand but for your pet.
int64 Base
Base2[#,name]
CounterNumber The number of counters that the spell adds
MaxLevel
Max[#]
spell RankName Returns the spell/combat ability name rank character has.
Trigger
string BaseName Removes rank information from spell
CastByMe
CastByOther
CastOnAnother Message when cast on others
CastOnYou Message when cast on yourself
Category The category name of the spell
CounterType The resist counter. Will be one of "Disease", "Poison", "Curse" or "Corruption"
Description
Extra
Link Generate a clickable spell link.
Link[text] Generate a clickable spell link, <text> replaces the text of the link.
Name spell name
ResistType Returns one of the following: Corruption, Physical, Prismatic, Chromatic, Disease, Poison, Cold, Fire, Magic, Unresistable, Unknown
Restrictions[#|name]
Skill Will return spell skill. e.g. Abjuration, Alteration, Conjuration, Divination, Evocation
SpellType "Beneficial(Group)", "Beneficial", "Detrimental" or "Unknown"
Subcategory The subcategory name of the spell
TargetType Returns one of the following: Target_AE_No_Players_Pets, Single Friendly (or Target's Target, Pet Owner, Target of Target, Free Target, Beam, Single in Group, Directional AE, Group v2, AE PC v2, No Pets, Pet2, Caster PB NPC, Caster PB PC, Special Muramites, Chest, Hatelist2, Hatelist, AE Summoned, AE Undead, Targeted AE Tap, Uber Dragons, Uber Giants, Plant, Corpse, Pet, LifeTap, Summoned, Undead, Animal, Targeted AE, Self, Single, PB AE, Group v1, AE PC v1, Line of Sight, Unknown
WearOff The "wear off" message
ticks Duration Duration of the spell (if any)
EQSpellDuration
MyDuration
timestamp CastTime Cast time (unadjusted)
FizzleTime Alias: RecoveryTime. Time to recover after fizzle.
MyCastTime Adjusted cast time
RecastTime Time to recast after successful cast

Examples

Using CachedBuff to get buff info on targets, group members etc, only requires you to target the entity once. After that's done, buffs are cached. The upside is obviously that we don't have to target back and forth constantly.

For example: lets say you are a druid and you want to know if a group members sow buff has worn off, you can just check CachedBuff without having to retarget the group member.

/echo ${Group.Member[2].CachedBuff[Spirit of Wolf].Duration}

If you want the name of the clarity spell on your target,

/echo ${Target.Clarity.Name}

2019 patch note Introduction

  • Added: .CachedBuff[x] to the spawn tlo where x is a spellid if its a number and a spell name if not. It returns a MQ2CachedBuffType.
  • Added: .CachedBuff[#x] to the spawn tlo where #x is a buffslot between 1-97. It returns a MQ2CachedBuffType.
  • Added: .CachedBuff[*x] to the spawn tlo where *x is a index (buffslots are not sorted). It returns a MQ2CachedBuffType.
  • Added: .CachedBuff[^x] to the spawn tlo where ^x is a keyword. It returns a MQ2CachedBuffType.
    • ^x keywords: Slowed Rooted Mezzed Crippled Maloed Tashed Snared and Beneficial

See also