Core Concepts

General Tools

Essential SYNQ tools for timing, events, visuals, configuration, and navigation

Essential SYNQ tools for timing, events, visuals, configuration, and navigation.

Important Variables

time

Current time in seconds, updated when SYNQ framework ticks. Equal to GetTime().

lua
synq.time

buffer

Combined latency, tick rate, and jitter buffer for precise timing.

lua
synq.buffer -- latency + tickRate + jitter

latency

Latency to game server, averaged over last 30 seconds.

lua
synq.latency

tickRate

Time between each SYNQ framework tick.

lua
synq.tickRate

spellCastBuffer

Spell Queue Window duration set by SYNQ. Maximum time remaining on GCD or cast time for queuing next spell.

lua
synq.spellCastBuffer

gcd

Expected GCD duration for 1.5s GCD spells, modified by haste.

lua
synq.gcd -- 1.5 / (1 + player.haste)

hasControl

Whether the player has control of their character.

lua
synq.hasControl

zone

Current zone text.

lua
synq.zone

mapID

Current mapID.

lua
synq.mapID

powerTypes

Table mapping power type names to numeric IDs.

lua
synq.powerTypes -- { mana = 0, rage = 1, focus = 2, energy = 3, ... }

Framework Functions

onTick

Adds callback to main framework ticker. Called in order added, just before routine actor.

lua
synq.onTick(callback[, enabled])

onUpdate

Same as onTick, but runs every frame (faster).

lua
synq.onUpdate(callback[, enabled])

onEvent

Assign callback to combat log or other event.

lua
synq.onEvent(callback, eventType)

Utility Functions

bin

Converts value to binary. Any value is 1, nil or false is 0.

lua
synq.bin(conditions) : 1 | 0

controlMovement

Temporarily disables movement and optionally facing input.

lua
synq.controlMovement(duration[, facing])

controlFacing

Temporarily disables facing input.

lua
synq.controlFacing(duration)

StopMoving

Immediately stops player movement.

lua
synq.StopMoving()

Populate

Creates references to associative array entries in other tables/namespaces.

lua
synq.Populate(aArray, t1[, t2, t3, t4, t5, ...])

pullTimer

Reference to DBM/BigWigs pull timer. Defaults to 0.

lua
synq.pullTimer : 0

Alerts & Visuals

alert

Displays a toast alert. Always returns true for use in conditionals.

lua
synq.alert([message / {options}], [texture]) : true

Options: message, texture, duration, fadeIn, fadeOut, bgColor, imgX, imgY, imgScale, counter

The counter option accepts a function that returns a dynamic value displayed on the alert, useful for showing countdowns or remaining values.

lua
-- Show alert with a live DR countdown
synq.alert("Waiting for |cFFf74a4a[DR]|r", trap.id, {
    counter = function() return target.incapDRRemains end
})

textureEscape

Converts spellID or texture ID into escape sequence string.

lua
synq.textureEscape(spellID/FileDataID[, size, offsets])

Draw

Draws shapes, text, and textures in the 3D game world. See the full Draw API reference for all methods and examples.

lua
synq.Draw(function(draw)
    draw:SetColor(255, 100, 100, 200)
    draw:SetWidth(2)
    draw:Circle(x, y, z, radius, steps)
    -- 20+ drawing methods available
end)

Configuration

NewConfig

Creates persistent configuration storage. Shallow writes trigger saves.

lua
synq.NewConfig(name)

MoveTo

Safe, humanized movement to coordinates. Includes speed-based throttling and positional jitter to produce natural-looking movement.

lua
synq.MoveTo(x, y, z)
  • Throttle — Limits call frequency based on current movement speed (~0.045s at walk, ~0.040s at mount speed). Excess calls are silently dropped.
  • Jitter — Applies small random offset (±0.5yd) to X/Y coordinates each call for natural pathing.
lua
-- Move toward a target's position
local x, y, z = target.position()
if x then
    synq.MoveTo(x, y, z)
end

synq.path

Returns path object for navigation between player and coordinates.

lua
synq.path(player, x, y, z)

path object

Array of nodes with built-in methods.

lua
path.simplify(tolerance, highestQuality) -- Douglas Peucker simplification
path.draw() -- Draw path for this tick
path.follow() -- Move character along path

Face Manipulation

Low-level helpers for forcing the player to face a unit or angle. Most rotations don't call these directly — prefer the faceHack cast option documented in Spell Objects › Cast Options. Reach for these when you need facing outside of a :Cast.

FaceHack

Instantly faces the given unit (or raw angle in radians) and restores the previous orientation after, preserving mouselook. Optional offset is added in radians.

lua
synq.FaceHack(unit, offset?)
synq.FaceHack(angleRadians, offset?)

FaceHackEmpowered

Variant of FaceHack tuned for empowered casts.

lua
synq.FaceHackEmpowered(unit)

FaceSmooth

Humanised facing that turns toward unit over multiple ticks rather than snapping. Pass the spellID you intend to cast so SYNQ can stop turning once facing is satisfied. Optional alertMsg displays an alert; x and y apply a positional offset.

lua
synq.FaceSmooth(unit, spellID, alertMsg?, x?, y?)

FaceSmoothCB

Callback variant that smooths facing between two units for the given spell.

lua
synq.FaceSmoothCB(unit, unit2, spellID)

Next: Learn about the Draw API for rendering shapes and visuals in the game world.