本帖最后由 QQ_CAFE57 于 2024-8-31 05:27 PM 编辑
[Lua] 纯文本查看 复制代码 local Name = "阿拉希"
if not MiniMapBattlefieldFrame:IsVisible() then
BeeRun('/console Sound_EnableSFX 0')PVPParentFrame:Show()PVPParentFrameTab2:Click()
if string.find(BattlegroundType1:GetText(),Name) then
BattlegroundType1:Click()
PVPBattlegroundFrameJoinButton:Click()
end
if string.find(BattlegroundType2:GetText(),Name) then
BattlegroundType2:Click()
PVPBattlegroundFrameJoinButton:Click()
end
PVPParentFrame:Hide()BeeRun('/console Sound_EnableSFX 1')
end
local PVPP_F = PVPP_F or CreateFrame("Frame")
PVPP_F:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
PVPP_F:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
PVPP_F:SetScript("OnEvent",function(self,event,...)
if ... and string.find(...,"胜利") and event == "CHAT_MSG_BG_SYSTEM_NEUTRAL" then
LeaveBattlefield()
end
if ... and event == "UPDATE_BATTLEFIELD_STATUS" then
AcceptBattlefieldPort(...,true)
end
end) |