自动拾取确认
local aotuClick = CreateFrame("Frame") aotuClick:RegisterEvent("CONFIRM_DISENCHANT_ROLL") aotuClick:RegisterEvent("CONFIRM_LOOT_ROLL") aotuClick:RegisterEvent("LOOT_BIND_CONFIRM") aotuClick:SetScript("OnEvent", function(self, event, ...) for i = 1, STATICPOPUP_NUMDIALOGS do local frame = _G["StaticPopup"..i] if (frame.which == "CONFIRM_LOOT_ROLL" or frame.which == "LOOT_BIND" or frame.which == "LOOT_BIND_CONFIRM") and frame:IsVisible() then StaticPopup_OnClick(frame, 1) end end end)
自动复活确认
local function ResurrectEvent() if not (UnitAffectingCombat('player') or UnitAffectingCombat(name)) then local delay = GetCorpseRecoveryDelay() if delay == 0 then AcceptResurrect() DoEmote('thank', name) else local b = CreateFrame("Button") local formattedText = b:GetText(b:SetFormattedText("%d |4second:seconds", delay)) SendChatMessage("感谢复活我!我复活CD了,还有"..formattedText.."才能起来。", 'WHISPER', nil, name) end end end local Resurrect = CreateFrame("Frame") Resurrect:RegisterEvent("RESURRECT_REQUEST") Resurrect:SetScript("OnEvent", ResurrectEvent)