Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------
- -- Module Declaration
- --
- local mod = BigWigs:NewBoss("Lord Rhyolith", 800, 193)
- if not mod then return end
- mod:RegisterEnableMob(52577, 53087, 52558) -- Left foot, Right Foot, Lord Rhyolith
- --------------------------------------------------------------------------------
- -- Locales
- --
- local moltenArmor,superheated,stomp,fragments,spark,heatedVolcano,meltdown,lavaLine = GetSpellInfo(98255),GetSpellInfo(101305),GetSpellInfo(97282),GetSpellInfo(98136),GetSpellInfo(98552),GetSpellInfo(98493),GetSpellInfo(101648),GetSpellInfo(100650)
- local lastFragments = nil
- local secondFragments = nil
- local moltenArmorTime = nil
- --------------------------------------------------------------------------------
- -- Localization
- --
- local CL = LibStub("AceLocale-3.0"):GetLocale("Big Wigs: Common")
- local L = mod:NewLocale("enUS", true)
- if L then
- L.superheated_message = "%dx stacks on boss!"
- L.molten_message = "%dx stacks on boss!"
- L.armor_message = "%d%% armor left"
- L.armor_gone_message = "Armor go bye-bye!"
- L.phase2_soon_message = "Phase 2 soon!"
- L.stomp_message = "Stomp! Stomp! Stomp!"
- L.heated_volcano_message = "Volcano Activating!"
- L.heated_volcano_message = "Magma Flow Activating!"
- L.big_add_message = "Big add spawned!"
- L.small_adds_message = "Small adds inc!"
- end
- L = mod:GetLocale()
- --------------------------------------------------------------------------------
- -- Initialization
- --
- function mod:GetOptions(CL)
- return {
- 98632, 98552, 98136, 97282, 98255, 99846, 101305,98493,101648,100650,
- "bosskill"
- }, {
- [98632] = "general"
- }
- end
- function mod:OnBossEnable()
- self:Log("SPELL_AURA_APPLIED_DOSE", "Superheated", 101305)
- self:Log("SPELL_AURA_APPLIED_DOSE", "MoltenArmor", 98255, 101157)
- self:Log("SPELL_CAST_START", "Stomp", 97282, 100411, 100968, 100969)
- self:Log("SPELL_CAST_SUCCESS", "HeatedVolcano", 98493)
- self:Log("SPELL_CAST_SUCCESS", "LavaLine", 100650)
- self:Log("SPELL_SUMMON", "Spark", 98552)
- self:Log("SPELL_SUMMON", "Fragments", 100392, 98136)
- self:Log("SPELL_AURA_REMOVED_DOSE", "ObsidianStack", 98632)
- self:Log("SPELL_AURA_REMOVED", "Obsidian", 98632)
- self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckBossStatus")
- self:Death("Win", 52558)
- end
- function mod:OnEngage(diff)
- self:RegisterEvent("UNIT_HEALTH_FREQUENT")
- lastFragments = GetTime()
- moltenArmorTime = nil
- self:Bar(101305, superheated, 301, 101305)
- self:Bar(97282, stomp, 15, 97282)
- self:Bar(98136, fragments, 24, 98136)
- self:Bar(98493, heatedVolcano, 30.5, 98493)
- secondFragments = true
- end
- --------------------------------------------------------------------------------
- -- Event Handlers
- --
- function mod:Obsidian(_, spellId, _, _, _, _, _, _, _, dGUID)
- local unitId = tonumber(dGUID:sub(7, 10), 16)
- if unitId ~= 52558 then return end
- self:Message(98632, L["armor_gone_message"], "Positive", spellId)
- end
- function mod:ObsidianStack(_, spellId, _, _, _, buffStack, _, _, _, dGUID)
- local unitId = tonumber(dGUID:sub(7, 10), 16)
- if unitId ~= 52558 then return end
- if buffStack % 20 ~= 0 then return end -- Only warn every 20
- self:Message(98632, L["armor_message"]:format(buffStack), "Positive", spellId)
- end
- function mod:Spark(_, spellId)
- self:Message(98552, L["big_add_message"], "Important", spellId, "Alarm")
- self:Bar(98136, fragments, 23, 98136)
- secondFragments = nil
- end
- function mod:Fragments(_, spellId)
- local t = GetTime()
- if lastFragments and t < (lastFragments + 5) then return end
- lastFragments = t
- self:Message(98136, L["small_adds_message"], "Attention", spellId, "Info")
- self:Bar(101648, meltdown, 30, 101648)
- if (secondFragments) then
- self:Bar(98552, spark, 23, 98552)
- else
- self:Bar(98136, fragments, 23, 98136)
- secondFragments = true
- end
- end
- function mod:Stomp(_, spellId, _, _, spellName)
- self:Message(97282, L["stomp_message"], "Urgent", spellId, "Alert")
- self:Bar(97282, L["stomp_message"], 3, spellId)
- self:Bar(97282, spellName, 30, spellId)
- end
- function mod:HeatedVolcano(_, spellId, _, _, spellName)
- self:Message(98493, L["heated_volcano_message"], "Attention", spellId)
- self:Bar(98493, L["heated_volcano_message"], 5, spellId)
- self:Bar(98493, spellName, 25.5, spellId)
- end
- function mod:LavaLine(_, spellId, _, _, spellName)
- self:Message(100650, L["lava_line_message"], "Urgent", spellId, "Alert")
- self:Bar(100650, L["lava_line_message"], 4, spellId)
- end
- function mod:MoltenArmor(_, spellId, _, _, _, stack, _, _, _, dGUID)
- if moltenArmorTime == nil and stack > 0 then
- moltenArmorTime = GetTime()
- self:Bar(98255, moltenArmor, 15*stack, spellId)
- end
- if moltenArmorTime ~= nil and stack > 0 then
- self:Bar(98255, moltenArmor, (GetTime() - moltenArmorTime) % 15 + (stack - 1) * 15, spellId)
- end
- local unitId = tonumber(dGUID:sub(7, 10), 16)
- if stack < 4 or stack % 2 ~= 0 or unitId ~= 52558 then return end
- self:Message(98255, L["molten_message"]:format(stack), "Attention", spellId)
- end
- function mod:Superheated(_, spellId, _, _, spellName, stack)
- self:Message(101305, L["superheated_message"]:format(stack), "Attention", spellId)
- self:Bar(101305, superheated, 10, spellId)
- end
- function mod:UNIT_HEALTH_FREQUENT(_, unitId)
- -- Boss frames were jumping around, there are 3 up with the buff on, so one of boss1 or boss2 is bound to exist
- if unitId == "boss1" or unitId == "boss2" then
- local hp = UnitHealth(unitId) / UnitHealthMax(unitId) * 100
- if hp < 30 then -- phase starts at 25
- self:Message(99846, L["phase2_soon_message"], "Positive", 99846, "Info")
- self:UnregisterEvent("UNIT_HEALTH_FREQUENT")
- local stack = select(4, UnitBuff(unitId, moltenArmor))
- if stack then
- self:Message(98255, L["molten_message"]:format(stack), "Important", 98255, "Alarm")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement