SYNQ Objects are intelligent tables containing attributes and functions used to easily get information about and interact with units, players, and other objects in game.
All SYNQ objects with an existing underlying unit will have all of the expected attributes and functions available for you to access.
target, focus, etc.)
enemies, friends, objects) generated and returned each frame they are referencedWe access attributes by referencing them, and functions by calling them.
target.hp
target.isUnit(focus)
SYNQ objects provide a wide range of attributes for querying unit information:
object.exists - Returns true if the object existsobject.dead - Returns true if the unit is deadobject.combat - Returns true if the unit is in combatobject.casting - Returns true if the unit is castingobject.channeling - Returns true if the unit is channelingobject.moving - Returns true if the unit is movingobject.enemy - Returns true if the unit is an enemyobject.friend - Returns true if the unit is friendlyobject.player - Returns true if the unit is a playerobject.npc - Returns true if the unit is an NPCobject.hp - Returns current health percentage (0-100)object.health - Returns current health valueobject.healthMax - Returns maximum health valueobject.power - Returns current primary resource (mana, focus, energy, etc.)object.powerMax - Returns maximum primary resourceobject.distance - Returns distance from player to objectobject.meleeRange - Returns true if object is in melee rangeobject.facing - Returns true if player is facing the objectobject.los - Returns true if player has line of sight to objectobject.threat - Returns threat percentage on the objectobject.aggro - Returns true if player has aggro on the objectobject.ttd - Returns estimated time to die in secondsSYNQ objects provide powerful functions for advanced queries:
object.isUnit(otherObject) - Returns true if both objects are the same unitobject.buffRemains(spellID, source) - Returns remaining duration of a buff in secondsobject.buffStacks(spellID, source) - Returns stack count of a buffobject.debuffRemains(spellID, source) - Returns remaining duration of a debuff in secondsobject.debuffStacks(spellID, source) - Returns stack count of a debuffobject.movingToward(target, options) - Returns true if object is moving toward target
options.angle - Cone angle for direction checkoptions.duration - How long the movement must persistobject.castTarget - Returns the destination target of a spell cast as a SYNQ objectobject.castID - Returns spell ID being castobject.castRemains - Returns time remaining on current castobject.castPct - Returns cast completion percentageEmpty objects are a shell, containing only isUnit. They are only generated by functions which generate an object when there is no relevant underlying object:
object.castTarget - Returns the destination target of a spell cast as a SYNQ objectobject.target - Returns the object's target as a SYNQ objectTip: This is so you can always rule out things like object.castTarget.isUnit(healer) without the need to redundantly check for existence of the castTarget.
Always check if an object exists before querying its data. Most boolean attributes like object.enemy or object.friend also prove existence when they return true.
Good existence checks:
object.exists - Explicit existence checkobject.enemy - Checks existence AND confirms enemy statusobject.combat - Checks existence AND confirms in combatAvoid these patterns:
not object.combat don't prove existenceobject.hp < 30 may fail gracefully but won't work as intended without existence check firstNext: Learn how to create and use Spell Objects for your rotations.