hey all i wanted to add a auto freind invite that supports realid. but with no luck, this is what i have. thanks for your time
Code:
eventHandlers['PARTY_INVITE_REQUEST'] = function(name)
local accept
ShowFriends()
for index = 1, GetNumFriends() do
if GetFriendInfo(index) == name then
accept = true
break
end
end
if not accept and IsInGuild() then
GuildRoster()
for index = 1, GetNumGuildMembers() do
if GetGuildRosterInfo(index) == name then
accept = true
break
end
end
end
if not accept then
for index = 1, BNGetFriendToonInfo() do
if GetRealmName(index) == name then
accept = true
break
end
end
end
if accept then
name = StaticPopup_Visible('PARTY_INVITE')
if name then
StaticPopup_OnClick(_G[name], 1)
return
end
else
SendWho('n-"' .. name .. '"')
end
en