Skip to content

Instantly share code, notes, and snippets.

@saenic
Last active December 13, 2021 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saenic/7b0427b4cfb4b7efa5d5e30cd2571777 to your computer and use it in GitHub Desktop.
Save saenic/7b0427b4cfb4b7efa5d5e30cd2571777 to your computer and use it in GitHub Desktop.
Syngergy Toggle
SynergyToggle = SynergyToggle or {}
local ST = SynergyToggle
ST.name = "SynergyToggle"
ST.version = "1.8.2"
ST.synergies = {}
ST.SYNERGYBLACKLIST = {
["/esoui/art/icons/ability_nightblade_015.dds"] = true,
["/esoui/art/icons/ability_dragonknight_006.dds"] = true,
["/esoui/art/icons/ability_dragonknight_010.dds"] = true,
["/esoui/art/icons/ability_necromancer_010_b.dds"] = true,
["/esoui/art/icons/ability_necromancer_004.dds"] = true,
["/esoui/art/icons/ability_sorcerer_lightning_splash.dds"] = true,
["/esoui/art/icons/ability_warden_005_b.dds"] = true,
["/esoui/art/icons/ability_warden_007.dds"] = true,
["/esoui/art/icons/ability_templar_cleansing_ritual.dds"] = true,
["/esoui/art/icons/ability_templar_solar_prison.dds"] = true,
["/esoui/art/icons/ability_templar_nova.dds"] = true,
["/esoui/art/icons/ability_templar_light_strike.dds"] = true,
["/esoui/art/icons/ability_templar_sun_strike.dds"] = true,
["/esoui/art/icons/ability_undaunted_005a.dds"] = true,
["/esoui/art/icons/ability_undaunted_005.dds"] = true,
["/esoui/art/icons/ability_undaunted_004b.dds"] = true,
["/esoui/art/icons/ability_undaunted_004.dds"] = true,
["/esoui/art/icons/crafting_light_armor_standard_f_005.dds"] = true,
["/esoui/art/icons/ability_undaunted_003.dds"] = true,
["/esoui/art/icons/ability_undaunted_002.dds"] = true,
["/esoui/art/icons/ability_undaunted_001_a.dds"] = true,
["/esoui/art/icons/ability_undaunted_001.dds"] = true,
["/esoui/art/icons/ability_u23_bloodball_chokeonit.dds"] = true,
}
ST.RESOURCESYNERGIES = {
["/esoui/art/icons/ability_templar_sun_strike.dds"] = true,
["/esoui/art/icons/ability_templar_light_strike.dds"] = true,
["/esoui/art/icons/ability_undaunted_004.dds"] = true,
["/esoui/art/icons/ability_undaunted_004b.dds"] = true,
}
ST.EFFECTS = {
["ALKOSH"] = 75753,
["PORTALDEBUFF"] = 104542,
["MAJORSLAYER"] = 93109,
["MAJORBERSERK"] = 61745,
["BLOBDEBUFF"] = 152993,
["SHADOWBLESSING"] = 75804,
}
ST.SETS = {
["ALKOSH"] = "|H1:item:73058:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h",
["LOKKE"] = "|H1:item:149795:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h",
["BAHSEI"] = "|H1:item:173591:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h",
["PEARLS"] = "|H1:item:171437:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h",
["MOONDANCER"] = "|H1:item:73009:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h",
}
-- alkosh mode
ST.alkoshUnits = {}
ST.lastUnit = nil
ST.alkoshAvailable = 0
-- lokke mode
ST.hasMajorSlayer = false
ST.lokkeAvailable = 0
-- moondancer mode
ST.hasShadowBlessing = false
ST.moondancerAvailable = 0
-- kinras mode
ST.SORCATRO = "/esoui/art/icons/ability_sorcerer_storm_atronach.dds"
ST.hasMajorBerserk = false
-- bahseis and pearls mode
ST.bahseiAvailable = 0
ST.pearlsAvailable = 0
-- hrc hm
ST.DESTRUCTIVEOUTBREAK = "/esoui/art/icons/ability_sorcerer_065.dds"
ST.outbreakCooldown = false
-- rg blobs
ST.PURGESOUL = "/esoui/art/icons/achievement_murkmire_kill_voriplasm.dds"
ST.blobBlock = false
function ST.InitSavedVariables()
local defaults = {
general_purgeSoul = false,
general_purgeSoul_cooldown = 2000,
general_execration = true,
general_conjurersPortal = false,
general_cloudrestPortalDebuff = true,
general_destructiveOutbreak = true,
general_arenaSigils = false,
dd_conduit = false,
dd_harvest = false,
dd_grave = false,
dd_shards = false,
dd_ritual = false,
dd_ladythorn = false,
dd_bahseisMode = false,
dd_bahseisMode_magicka = 20,
dd_kinrasMode = false,
dd_lokkestiizMode = false,
dd_moondancerMode = false,
tank_atronarch = false,
tank_alkoshMode = false,
tank_nbshadowult = false,
healer_cloudrestPortalEntirely = false,
misc_wardenPortal = false,
misc_vampirebite = false,
misc_bladeofwoe = false,
debug = false,
}
ST.savedVariables = ZO_SavedVars:NewCharacterIdSettings("STSV", 1, nil, defaults)
end
function ST.CreateAnnouncement()
local announcement = WINDOW_MANAGER:CreateTopLevelWindow("SynergyToggleAnnouncement")
announcement:SetDimensions(600, 200)
announcement:SetAnchor(CENTER, GUI_ROOT, CENTER, 0, -200)
announcement:SetHidden(true)
announcement:SetClampedToScreen(true)
announcement:SetMouseEnabled(false)
announcement:SetMovable(false)
local label = WINDOW_MANAGER:CreateControl(announcement:GetName() .. "Label", announcement, CT_LABEL)
label:SetAnchor(CENTER, announcement, CENTER, 0, 0)
label:SetVerticalAlignment(TEXT_ALIGN_CENTER)
label:SetHorizontalAlignment(TEXT_ALIGN_CENTER)
label:SetFont("esoui/common/fonts/univers67.otf|60|soft-shadow-thick")
label:SetText("|c00FF00BLOB SYNERGY|r")
end
function ST.UpdateAlkosh()
for boss, uptime in pairs(ST.alkoshUnits) do
if uptime > 0 then
ST.alkoshUnits[boss] = uptime - 1
else
ST.alkoshUnits[boss] = nil
end
end
ST.OnReticleTargetChanged(_)
end
function ST.OnReticleTargetChanged(_)
local reticleTargetName = GetUnitNameHighlightedByReticle()
if reticleTargetName and reticleTargetName ~= '' then
local unitDifficulty = GetUnitDifficulty("reticleover")
if not IsUnitPlayer("reticleover") and unitDifficulty == MONSTER_DIFFICULTY_DEADLY then
local alkoshDuration = ST.GetAlkoshDuration("reticleover")
ST.alkoshUnits[reticleTargetName] = alkoshDuration
ST.lastUnit = reticleTargetName
end
end
end
function ST.GetAlkoshDuration(targetUnit)
for i = 1, GetNumBuffs(targetUnit) do
local _, _, timeEnding, _, _, _, _, _, _, _, abilityId, _, _ = GetUnitBuffInfo(targetUnit, i)
if abilityId == ST.EFFECTS.ALKOSH then
local duration = (timeEnding - GetGameTimeSeconds())
return math.floor(duration)
end
end
return 0
end
function ST.HasTargetAlkosh()
if ST.alkoshUnits[ST.lastUnit] then
local duration = ST.alkoshUnits[ST.lastUnit]
return (duration > 2)
end
return false
end
function ST.HasLowStamina()
local currentStamina, maxStamina = GetUnitPower("player", POWERTYPE_STAMINA)
local threshold = (maxStamina * 0.2)
if currentStamina < threshold then
return true
end
return false
end
function ST.HasLowMagicka()
local currentMagicka, maxMagicka = GetUnitPower("player", POWERTYPE_MAGICKA)
local threshold = (maxMagicka * ST.savedVariables.dd_bahseisMode_magicka / 100)
if currentMagicka < threshold then
return true
end
return false
end
function ST.CheckSet(setItem)
local _, _, _, numNormalEquipped, _, _, numPerfectedEquipped = GetItemLinkSetInfo(setItem, true)
return numNormalEquipped + numPerfectedEquipped
end
function ST.OnWeaponSwap(_, didChange, _, _)
if didChange then
ST.alkoshAvailable = ST.CheckSet(ST.SETS.ALKOSH)
ST.lokkeAvailable = ST.CheckSet(ST.SETS.LOKKE)
ST.moondancerAvailable = ST.CheckSet(ST.SETS.MOONDANCER)
ST.bahseiAvailable = ST.CheckSet(ST.SETS.BAHSEI)
ST.pearlsAvailable = ST.CheckSet(ST.SETS.PEARLS)
SYNERGY:OnSynergyAbilityChanged()
end
end
function ST.OnEffectChanged(_, changeType, _, effectName, unitTag, beginTime, endTime, _, _, _, _, _, _, _, unitId, abilityId, sourceType)
if ST.savedVariables.general_purgeSoul
and abilityId == ST.EFFECTS.BLOBDEBUFF
and changeType == EFFECT_RESULT_GAINED
and ST.savedVariables.general_purgeSoul_cooldown > 0 then
ST.blobBlock = true
SynergyToggleAnnouncement:SetHidden(false)
zo_callLater(function()
ST.blobBlock = false
SYNERGY:OnSynergyAbilityChanged()
SynergyToggleAnnouncement:SetHidden(true)
end, ST.savedVariables.general_purgeSoul_cooldown)
end
if ST.savedVariables.dd_lokkestiizMode and abilityId == ST.EFFECTS.MAJORSLAYER then
local cooldown = endTime - beginTime
if cooldown > 0 then
ST.hasMajorSlayer = true
zo_callLater(function()
ST.hasMajorSlayer = false
end, (cooldown * 1000) - 1000)
end
end
if ST.savedVariables.dd_moondancerMode and abilityId == ST.EFFECTS.SHADOWBLESSING then
local cooldown = endTime - beginTime
if cooldown > 0 then
ST.hasShadowBlessing = true
zo_callLater(function()
ST.hasShadowBlessing = false
end, (cooldown * 1000) - 1000)
end
end
-- no need to check set since it wont change anything
if ST.savedVariables.dd_kinrasMode and abilityId == ST.EFFECTS.MAJORBERSERK then
if changeType == EFFECT_RESULT_GAINED then
ST.hasMajorBerserk = true
SYNERGY:OnSynergyAbilityChanged()
elseif changeType == EFFECT_RESULT_FADED then
ST.hasMajorBerserk = false
SYNERGY:OnSynergyAbilityChanged()
end
end
if not ST.savedVariables.healer_cloudrestPortalEntirely then
if ST.savedVariables.general_cloudrestPortalDebuff and abilityId == ST.EFFECTS.PORTALDEBUFF then
local cooldown = endTime - beginTime
if cooldown > 0 then
ST.oldPortalState = ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"]
ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"] = true
zo_callLater(function()
ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"] = ST.oldPortalState
end, cooldown * 1000)
end
end
end
end
function ST.OnPlayerDeath(_)
if not ST.savedVariables.healer_cloudrestPortalEntirely then
if ST.savedVariables.general_cloudrestPortalDebuff then
ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"] = false
end
end
end
function ST.OnPlayerCombatChange(_, inCombat)
if IsUnitDead("player") then return end
if inCombat then
if ST.savedVariables.general_conjurersPortal and ST.DoesBossExist("vrol", "boss1") then
ST.synergies["/esoui/art/icons/malatar_agonizingbolts.dds"] = true
else
ST.synergies["/esoui/art/icons/malatar_agonizingbolts.dds"] = false
end
end
if ST.savedVariables.tank_alkoshMode then
if inCombat then
EVENT_MANAGER:RegisterForUpdate(ST.name .. "AlkoshUpdateLoop", 1000, ST.UpdateAlkosh)
else
EVENT_MANAGER:UnregisterForUpdate(ST.name .. "AlkoshUpdateLoop")
end
end
end
function ST.DoesBossExist(name, unitTag)
if DoesUnitExist(unitTag) then
local lowerName = string.lower(GetUnitName(unitTag))
if string.find(lowerName, name) then
return true
end
end
return false
end
function ST.InitSynergies()
local settings = ST.savedVariables
ST.synergies["/esoui/art/icons/ability_necromancer_016.dds"] = settings.general_execration
ST.synergies["/esoui/art/icons/sigil_defense_001.dds"] = settings.general_arenaSigils
ST.synergies["/esoui/art/icons/sigil_healing_001.dds"] = settings.general_arenaSigils
ST.synergies["/esoui/art/icons/sigil_speed_001.dds"] = settings.general_arenaSigils
ST.synergies["/esoui/art/icons/sigil_power_001.dds"] = settings.general_arenaSigils
ST.synergies["/esoui/art/icons/ability_sorcerer_lightning_splash.dds"] = settings.dd_conduit
ST.synergies["/esoui/art/icons/ability_warden_007.dds"] = settings.dd_harvest
ST.synergies["/esoui/art/icons/ability_necromancer_004.dds"] = settings.dd_grave
ST.synergies["/esoui/art/icons/ability_templar_sun_strike.dds"] = settings.dd_shards
ST.synergies["/esoui/art/icons/ability_templar_cleansing_ritual.dds"] = settings.dd_ritual
ST.synergies["/esoui/art/icons/ability_u23_bloodball_chokeonit.dds"] = settings.dd_ladythorn
ST.synergies["/esoui/art/icons/ability_sorcerer_storm_atronach.dds"] = settings.tank_atronarch
ST.synergies["/esoui/art/icons/ability_nightblade_015.dds"] = settings.tank_nbshadowult
ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"] = settings.healer_cloudrestPortalEntirely
ST.synergies["/esoui/art/icons/ability_warden_005_b.dds"] = settings.misc_wardenPortal
ST.synergies["/esoui/art/icons/ability_u26_vampire_synergy_feed.dds"] = settings.misc_vampirebite
ST.synergies["/esoui/art/icons/achievement_darkbrotherhood_003.dds"] = settings.misc_bladeofwoe
if settings.tank_alkoshMode then
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_RETICLE_TARGET_CHANGED, ST.OnReticleTargetChanged)
end
ST.OnPlayerCombatChange(_, IsUnitInCombat("player"))
ST.OnWeaponSwap(_, true, _, _)
ST.CreateAnnouncement()
end
function ST.BlockSynergies()
ZO_PreHook(SYNERGY, 'OnSynergyAbilityChanged', function(self)
local name, icon = GetSynergyInfo()
if name and icon then
if ST.savedVariables.debug then
local link = ZO_LinkHandler_CreateLink(zo_strformat("<<C:1>>", name), nil, "synergydisplay", name, icon);
d("|cf05a4f" .. link .. "|r");
end
if ST.synergies[icon] then
--d("Blocking '" .. name .. "'")
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
if ST.savedVariables.general_purgeSoul and icon == ST.PURGESOUL then
if ST.blobBlock then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
if ST.savedVariables.dd_kinrasMode and icon == ST.SORCATRO and ST.hasMajorBerserk then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
if ST.savedVariables.general_destructiveOutbreak and icon == ST.DESTRUCTIVEOUTBREAK then
if not ST.outbreakCooldown then
ST.outbreakCooldown = true
zo_callLater(function()
ST.outbreakCooldown = false
end, 10000)
ST.ShowDialog("DestructiveOutbreak",
"|t35:35:/esoui/art/icons/ability_sorcerer_065.dds|t Destructive Outbreak",
"Are you sure you want to break free?\nPlease look after your mates.",
function()
SYNERGY:OnSynergyAbilityChanged()
end,
function()
SYNERGY:OnSynergyAbilityChanged()
end)
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
if not ST.HasLowMagicka() then
if ST.savedVariables.dd_bahseisMode and (ST.bahseiAvailable == 5 or ST.pearlsAvailable == 1) then
if ST.RESOURCESYNERGIES[icon] then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
end
if not ST.HasLowStamina() then
if ST.savedVariables.tank_alkoshMode and ST.alkoshAvailable > 0 then
if ST.HasTargetAlkosh() or ST.alkoshAvailable < 5 then
if ST.SYNERGYBLACKLIST[icon] then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
end
if ST.savedVariables.dd_lokkestiizMode and ST.lokkeAvailable > 0 then
if ST.hasMajorSlayer or ST.lokkeAvailable < 5 then
if ST.SYNERGYBLACKLIST[icon] then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
end
end
if ST.savedVariables.dd_moondancerMode and ST.moondancerAvailable > 0 then
if ST.hasShadowBlessing or ST.moondancerAvailable < 5 then
if ST.SYNERGYBLACKLIST[icon] then
SHARED_INFORMATION_AREA:SetHidden(SYNERGY, true)
return true
end
end
end
end
end)
end
function ST.OnAddOnLoaded(_, addonName)
if addonName ~= ST.name then return end
ST.InitSavedVariables()
ST.InitAddonMenu()
ST.InitSynergies()
ST.BlockSynergies()
LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, ST.HandleClickEvent)
LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, ST.HandleClickEvent)
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_ACTION_SLOTS_ACTIVE_HOTBAR_UPDATED, ST.OnWeaponSwap)
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_EFFECT_CHANGED, ST.OnEffectChanged)
EVENT_MANAGER:AddFilterForEvent(ST.name, EVENT_EFFECT_CHANGED, REGISTER_FILTER_UNIT_TAG, "player")
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_PLAYER_COMBAT_STATE, ST.OnPlayerCombatChange)
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_PLAYER_DEAD, ST.OnPlayerDeath)
end
function ST.HandleClickEvent(rawLink, mouseButton, linkText, linkStyle, linkType, name, icon)
if linkType == "synergydisplay" then
d("|cFFFFFF ===== Synergy ===== |r")
d("|cFFFFFFName: " .. name .. "|r")
d("|cFFFFFFIcon: " .. icon .. "|r")
return true
end
end
function ST.ShowDialog(name, dialogTitle, dialogText, confirmCallback, cancelCallback)
local uniqueId = string.format("%s%s", "SynergyToggleDialog", name)
ESO_Dialogs[uniqueId] = {
canQueue = true,
uniqueIdentifier = uniqueId,
title = {text = dialogTitle},
mainText = {text = dialogText},
buttons = {
[1] = {
text = SI_DIALOG_CONFIRM,
callback = function() if confirmCallback then confirmCallback() end end,
},
[2] = {
text = SI_DIALOG_CANCEL,
callback = function() if cancelCallback then cancelCallback() end end,
},
},
setup = function() end,
}
ZO_Dialogs_ShowDialog(uniqueId, nil, {mainTextParams = {}})
end
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_ADD_ON_LOADED, ST.OnAddOnLoaded)
SynergyToggle = SynergyToggle or {}
local ST = SynergyToggle
function ST.InitAddonMenu()
local panelData = {
type = "panel",
name = "Synergy Toggle",
displayName = "Synergy Toggle",
author = "ownedbynico",
version = ST.version,
slashCommand = "/synergy",
registerForRefresh = true,
}
local optionData = {}
optionData[#optionData+1] = {
type = "header",
name = "General",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/sigil_power_001.dds|t Maelstrom Arena & Blackrose Prison Sigils",
getFunc = function() return ST.savedVariables.general_arenaSigils end,
setFunc = function(value)
ST.savedVariables.general_arenaSigils = value
ST.synergies["/esoui/art/icons/sigil_defense_001.dds"] = value
ST.synergies["/esoui/art/icons/sigil_healing_001.dds"] = value
ST.synergies["/esoui/art/icons/sigil_speed_001.dds"] = value
ST.synergies["/esoui/art/icons/sigil_power_001.dds"] = value
end,
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_sorcerer_065.dds|t Destructive Outbreak (Hel Ra Citadel HM)",
getFunc = function() return ST.savedVariables.general_destructiveOutbreak end,
setFunc = function(value) ST.savedVariables.general_destructiveOutbreak = value end,
tooltip = "Adds a confirmation you have to accept if you want to break out.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/collectible_memento_pearlsummon.dds|t Cloudrest Portal (Dont Portal Twice)",
getFunc = function() return ST.savedVariables.general_cloudrestPortalDebuff end,
setFunc = function(value) ST.savedVariables.general_cloudrestPortalDebuff = value end,
tooltip = "Blocks the synergy if you have the debuff from previous portal and would die to it.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_necromancer_016.dds|t Execration (Kyne’s Aegis HM)",
getFunc = function() return ST.savedVariables.general_execration end,
setFunc = function(value)
ST.savedVariables.general_execration = value
ST.synergies["/esoui/art/icons/ability_necromancer_016.dds"] = value
end,
tooltip = "Disables the synergy in Kyne’s Aegis endboss fight where you would harm yourself.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/malatar_agonizingbolts.dds|t Conjurer's Portal (Kyne’s Aegis)",
getFunc = function() return ST.savedVariables.general_conjurersPortal end,
setFunc = function(value) ST.savedVariables.general_conjurersPortal = value end,
tooltip = "Disables the portal in Kyne’s Aegis where you would get teleported to the ship at the fight against Captain Vrol.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/achievement_murkmire_kill_voriplasm.dds|t Purge Soul (Rockgrove)",
getFunc = function() return ST.savedVariables.general_purgeSoul end,
setFunc = function(value) ST.savedVariables.general_purgeSoul = value end,
tooltip = "Blocks the blob synergy for Xms and notifies you to move outside the group.",
width = "half",
}
optionData[#optionData+1] = {
type = "slider",
name = "ms Blocktime",
getFunc = function() return ST.savedVariables.general_purgeSoul_cooldown end,
setFunc = function(value) ST.savedVariables.general_purgeSoul_cooldown = value end,
min = 0,
max = 5000,
default = 2000,
step = 100,
width = "half",
}
optionData[#optionData+1] = {
type = "header",
name = "Damage Dealer",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_sorcerer_lightning_splash.dds|t Conduit",
getFunc = function() return ST.savedVariables.dd_conduit end,
setFunc = function(value)
ST.savedVariables.dd_conduit = value
ST.synergies["/esoui/art/icons/ability_sorcerer_lightning_splash.dds"] = value
end,
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_warden_007.dds|t Harvest",
getFunc = function() return ST.savedVariables.dd_harvest end,
setFunc = function(value)
ST.savedVariables.dd_harvest = value
ST.synergies["/esoui/art/icons/ability_warden_007.dds"] = value
end,
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_necromancer_004.dds|t Grave",
getFunc = function() return ST.savedVariables.dd_grave end,
setFunc = function(value)
ST.savedVariables.dd_grave = value
ST.synergies["/esoui/art/icons/ability_necromancer_004.dds"] = value
end,
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_templar_sun_strike.dds|t Blessed Shards",
getFunc = function() return ST.savedVariables.dd_shards end,
setFunc = function(value)
ST.savedVariables.dd_shards = value
ST.synergies["/esoui/art/icons/ability_templar_sun_strike.dds"] = value
end,
tooltip = "Blocks only the healer morph.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_templar_cleansing_ritual.dds|t Ritual",
getFunc = function() return ST.savedVariables.dd_ritual end,
setFunc = function(value)
ST.savedVariables.dd_ritual = value
ST.synergies["/esoui/art/icons/ability_templar_cleansing_ritual.dds"] = value
end,
tooltip = "Useful for the Plaguebreak set.\nBlocks base skill and both morphs.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_u23_bloodball_chokeonit.dds|t Lady Thorn",
getFunc = function() return ST.savedVariables.dd_ladythorn end,
setFunc = function(value)
ST.savedVariables.dd_ladythorn = value
ST.synergies["/esoui/art/icons/ability_u23_bloodball_chokeonit.dds"] = value
end,
tooltip = "Blocks the Sanguine Burst synergy.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "Lokkestiiz Mode",
getFunc = function() return ST.savedVariables.dd_lokkestiizMode end,
setFunc = function(value) ST.savedVariables.dd_lokkestiizMode = value end,
tooltip = "Disables (not important) synergies while having the Major Slayer buff. You will only be able to use synergies if the 5th set bonus is active (e.g not on your bow backbar). If you drop below 20% stamina you are able to take synergies.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "Moondancer Mode",
getFunc = function() return ST.savedVariables.dd_moondancerMode end,
setFunc = function(value) ST.savedVariables.dd_moondancerMode = value end,
tooltip = "Disables (not important) synergies while having the Shadow Blessing buff. You will only be able to use synergies if the 5th set bonus is active (e.g not on your bow backbar).",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "Kinra's Mode",
getFunc = function() return ST.savedVariables.dd_kinrasMode end,
setFunc = function(value) ST.savedVariables.dd_kinrasMode = value end,
tooltip = "Disables the Sorcerer Atronach synergy while having the Major Berserk buff. Also works for Unchained Aggressor, Heem-Jas' Retribution and Sithis' Touch.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "Bahsei's / Pearls Mode",
getFunc = function() return ST.savedVariables.dd_bahseisMode end,
setFunc = function(value) ST.savedVariables.dd_bahseisMode = value end,
tooltip = "Disables orbs and templar shards while having more then X% magicka.",
width = "half",
}
optionData[#optionData+1] = {
type = "slider",
name = "% Magicka",
getFunc = function() return ST.savedVariables.dd_bahseisMode_magicka end,
setFunc = function(value) ST.savedVariables.dd_bahseisMode_magicka = value end,
min = 0,
max = 100,
default = 20,
width = "half",
}
optionData[#optionData+1] = {
type = "description",
title = "",
text = "If you are playing with Alkosh you can enable \"Alkosh Mode\" in the tank section. It will also work for damage dealers.",
}
optionData[#optionData+1] = {
type = "header",
name = "Tank",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_sorcerer_storm_atronach.dds|t Charged Lightning (Atronach)",
getFunc = function() return ST.savedVariables.tank_atronarch end,
setFunc = function(value)
ST.savedVariables.tank_atronarch = value
ST.synergies["/esoui/art/icons/ability_sorcerer_storm_atronach.dds"] = value
end,
tooltip = "Disables the Sorcerer Atronach to prevent you from stealing the damage buff.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_nightblade_015.dds|t Hidden Refresh (Nightblade Ultimate)",
getFunc = function() return ST.savedVariables.tank_nbshadowult end,
setFunc = function(value)
ST.savedVariables.tank_nbshadowult = value
ST.synergies["/esoui/art/icons/ability_nightblade_015.dds"] = value
end,
tooltip = "Disables the nightblade ultimate so you will not get invisible.",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "Alkosh Mode",
getFunc = function() return ST.savedVariables.tank_alkoshMode end,
setFunc = function(value)
ST.savedVariables.tank_alkoshMode = value
if value == true then
EVENT_MANAGER:RegisterForEvent(ST.name, EVENT_RETICLE_TARGET_CHANGED, ST.OnReticleTargetChanged)
else
EVENT_MANAGER:UnregisterForEvent(ST.name, EVENT_RETICLE_TARGET_CHANGED)
EVENT_MANAGER:UnregisterForUpdate(ST.name .. "AlkoshUpdateLoop")
end
end,
tooltip = "Disables all synergies if the boss you are looking at has Alkosh applied. If you drop below 20% stamina you are able to take synergies.",
}
optionData[#optionData+1] = {
type = "header",
name = "Healer",
}
optionData[#optionData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/collectible_memento_pearlsummon.dds|t Cloudrest Portal (Entirely)",
getFunc = function() return ST.savedVariables.healer_cloudrestPortalEntirely end,
setFunc = function(value)
ST.savedVariables.healer_cloudrestPortalEntirely = value
ST.synergies["/esoui/art/icons/collectible_memento_pearlsummon.dds"] = value
end,
tooltip = "Disables the Cloudrest Portal Synergy entirely.",
}
local miscData = {}
miscData[#miscData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_warden_005_b.dds|t Warden Portal",
getFunc = function() return ST.savedVariables.misc_wardenPortal end,
setFunc = function(value)
ST.savedVariables.misc_wardenPortal = value
ST.synergies["/esoui/art/icons/ability_warden_005_b.dds"] = value
end,
}
miscData[#miscData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/ability_u26_vampire_synergy_feed.dds|t Vampire Bite",
getFunc = function() return ST.savedVariables.misc_vampirebite end,
setFunc = function(value)
ST.savedVariables.misc_vampirebite = value
ST.synergies["/esoui/art/icons/ability_u26_vampire_synergy_feed.dds"] = value
end,
}
miscData[#miscData+1] = {
type = "checkbox",
name = "|t35:35:/esoui/art/icons/achievement_darkbrotherhood_003.dds|t Blade of Woe",
getFunc = function() return ST.savedVariables.misc_bladeofwoe end,
setFunc = function(value)
ST.savedVariables.misc_bladeofwoe = value
ST.synergies["/esoui/art/icons/achievement_darkbrotherhood_003.dds"] = value
end,
}
miscData[#miscData+1] = {
type = "checkbox",
name = "Debug",
getFunc = function() return ST.savedVariables.debug end,
setFunc = function(value) ST.savedVariables.debug = value end,
tooltip = "Dumps all synergy names and icons into the chat.",
}
optionData[#optionData+1] = {
type = "submenu",
name = "Miscellaneous",
controls = miscData,
}
LibAddonMenu2:RegisterAddonPanel("STS", panelData)
LibAddonMenu2:RegisterOptionControls("STS", optionData)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment