local mq = require("mq")
-- Function to check if a player's emote is the trigger for Doomshade event
function isDoomshadeEmote(emote)
local doomshadeEmotes = {"curse", "cursed", "doom"} -- List of emotes that trigger Doomshade event
for _, doomEmote in ipairs(doomshadeEmotes) do
if string.find(emote, doomEmote) then
return true
end
end
return false
end
-- Check if a player's emote triggers the Doomshade event
if isDoomshadeEmote(emote) then
-- Verify if the character is in the raid zone "Doomshade_Raid" (Replace with the correct Doomshade raid zone)
if mq.TLO.Zone.ShortName() ~= 'Doomshade_Raid' then
return
end
-- Retrieve necessary information
local my_class = mq.TLO.Me.Class.ShortName()
local i_am_ma = mq.TLO.Group.Member(0).MainAssist()
local my_name = mq.TLO.Me.CleanName()
local ma_name = mq.TLO.Group.MainAssist.CleanName()
-- Check if character is not the main assist and is the target of the emote, or if the main assist is the target
if not i_am_ma and (target == my_name or target == ma_name) then
-- Pause certain automated actions
mq.cmdf('/%s mode 0', my_class)
-- Stop specific abilities if applicable
if my_class == 'BER' and mq.TLO.Me.ActiveDisc.Name() == mq.TLO.Spell('Frenzied Resolve Discipline').RankName() then
mq.cmd('/stopdisc') -- Stop BER disc that roots you in place so you can run if you are a BER
end
-- Move away from the Doomshade event
mq.cmd('/nav locyxz -717, -589, -31')
mq.delay(100)
mq.cmd('/nav locyxz -581, -354, -48')
mq.delay(100)
mq.cmd('/nav locyxz -581, -136, -51')
mq.delay(100)
mq.cmd('/nav locyxz -777, -143, -16')
mq.delay(100)
mq.cmd('/nav locyxz -892, -407, -32')
mq.delay(100)
mq.cmd('/nav locyxz -871, -604, -34')
-- Turn off macroquest pause and enable twisting
mq.cmd('/mqp off')
mq.cmd('/twist on')
end
end