Here's a complete BM Hunter UI example showing how to build a SYNQ UI and integrate it with your routine.
Create your UI file:
local Unlocker, synq, example = ...
local ui, settings, cmd = synq.UI:New('example', {
title = "BM Hunter Settings",
colors = {
title = {255, 215, 0, 1}, -- Rich gold for title
primary = {255, 255, 255, 1}, -- Pure white for text
accent = {255, 191, 0, 1}, -- Amber for interactive elements
background = {15, 15, 20, 0.85}, -- Dark background with slight blue tint
}
})
-- Make settings available to the rest of your project so routines can access them
example.settings = settings
-- Create the main Rotation settings tab
local Rotation = ui:Tab("Rotation")
Rotation:Text({
text = "Rotation Settings",
header = true,
size = 14,
paddingBottom = 10,
})
Rotation:Checkbox({
text = "Enable Burst Mode",
var = "enableBurst",
default = false,
tooltip = "Automatically use Bestial Wrath and Aspect of the Wild together"
})
Rotation:Slider({
text = "Focus Threshold",
var = "focusThreshold",
min = 0,
max = 100,
step = 5,
default = 50,
valueType = "%",
tooltip = "Maintain Focus above this percentage"
})
Rotation:Dropdown({
var = "rotationMode",
options = {
{ label = "Single Target", value = "st", tooltip = "Optimized for single target DPS" },
{ label = "Multi Target", value = "aoe", tooltip = "Optimized for AoE situations" },
{ label = "Auto", value = "auto", tooltip = "Automatically switch based on enemy count" },
},
placeholder = "Select rotation mode",
header = "Rotation Mode:",
default = "auto"
})
-- Create a Pet Management tab
local Pet = ui:Tab("Pet Management")
Pet:Slider({
text = "Pet Heal Threshold",
var = "petHealHP",
min = 0,
max = 100,
step = 5,
default = 40,
valueType = "%",
tooltip = "Heal pet when HP drops below this percentage"
})
Pet:Checkbox({
text = "Auto Mend Pet",
var = "autoMendPet",
default = true,
tooltip = "Automatically heal pet when below threshold"
})
-- Create a Defensive settings tab
local Defensive = ui:Tab("Defensive")
Defensive:Slider({
text = "Exhilaration HP Threshold",
var = "exhilarationHP",
min = 0,
max = 100,
step = 5,
default = 35,
valueType = "%",
tooltip = "Use Exhilaration when HP drops below this"
})
Defensive:Checkbox({
text = "Use Health Potions",
var = "useHealthPots",
default = true,
})
Defensive:Checkbox({
text = "Use Feign Death",
var = "useFeignDeath",
default = true,
tooltip = "Use Feign Death when health is critically low"
})
Use the settings in your BM Hunter routine:
local Unlocker, synq, example = ...
local bm = example.hunter.bm
local settings = example.settings
bm:Init(function()
if target.enemy then
StartAttack()
-- Use burst mode setting from UI
if settings.enableBurst and synq.burst then
bestialWrath("burst")
aspectOfTheWild("burst")
bloodshed("burst")
end
-- Rotation mode logic
if settings.rotationMode == "aoe" or (settings.rotationMode == "auto" and #enemies >= 3) then
-- Execute AoE rotation for multiple targets
-- Multi-shot priorities, etc.
elseif settings.rotationMode == "st" or (settings.rotationMode == "auto" and #enemies < 3) then
-- Execute single target rotation
killCommand()
barbedShot("maintain")
cobraShot()
end
-- Pet management from UI settings
if settings.autoMendPet and pet.exists and pet.hp <= settings.petHealHP then
mendPet()
end
-- Defensive logic from UI settings
if player.hp <= settings.exhilarationHP then
exhilaration()
end
if player.hp <= 20 and settings.useFeignDeath then
feignDeath()
end
end
end)
Don't forget to load your GUI file:
{
"load": [
"example.lua",
"gui.lua",
"hunter/bm-actor.lua",
"hunter/bm-spells.lua"
]
}
With this setup, you can:
/exampleSYNQ UI provides a complete, powerful interface system that integrates seamlessly with your routines, offering professional-grade customization with minimal code requirements.