
Сообщение от
Фунтик
Ищу аддон на автоматическое принятие пати (желательно с функцией принятия только от друзей). Так же было бы не плохо аддон на автоподтвержение готовности суммона и т.д. :)
заранее спасибо.
попробуй что нибудь сделать, думаю убрать первую строчку и будет все ок
Код:
-------------------------------------------------------------------------- Auto accept invite
------------------------------------------------------------------------
if TukuiCF["invite"].autoaccept == true then
local tAutoAcceptInvite = CreateFrame("Frame")
local OnEvent = function(self, event, ...) self[event](self, event, ...) end
tAutoAcceptInvite:SetScript("OnEvent", OnEvent)
local function PARTY_MEMBERS_CHANGED()
StaticPopup_Hide("PARTY_INVITE")
tAutoAcceptInvite:UnregisterEvent("PARTY_MEMBERS_CHANGED")
end
local InGroup = false
local function PARTY_INVITE_REQUEST()
local leader = arg1
InGroup = false
-- Update Guild and Freindlist
if GetNumFriends() > 0 then ShowFriends() end
if IsInGuild() then GuildRoster() end
for friendIndex = 1, GetNumFriends() do
local friendName = GetFriendInfo(friendIndex)
if friendName == leader then
AcceptGroup()
tAutoAcceptInvite:RegisterEvent("PARTY_MEMBERS_CHANGED")
tAutoAcceptInvite["PARTY_MEMBERS_CHANGED"] = PARTY_MEMBERS_CHANGED
InGroup = true
break
end
end
if not InGroup then
for guildIndex = 1, GetNumGuildMembers(true) do
local guildMemberName = GetGuildRosterInfo(guildIndex)
if guildMemberName == leader then
AcceptGroup()
tAutoAcceptInvite:RegisterEvent("PARTY_MEMBERS_CHANGED")
tAutoAcceptInvite["PARTY_MEMBERS_CHANGED"] = PARTY_MEMBERS_CHANGED
InGroup = true
break
end
end
end
if not InGroup then
SendWho(leader)
end
end
tAutoAcceptInvite:RegisterEvent("PARTY_INVITE_REQUEST")
tAutoAcceptInvite["PARTY_INVITE_REQUEST"] = PARTY_INVITE_REQUEST
end