Thread: auto g invite
View Single Post
03-09-11, 03:49 PM   #11
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Aprikot View Post
Would this function block all inc sig requests?

lua Code:
  1. function abc:GUILD_INVITE_REQUEST()
  2.     StaticPopup_Hide("GUILD_INVITE")
  3.     DeclineGuild()
  4. end
If you had a frame watching that event and running the function.
I'd rather run it as a hook on UIParent, that would have 100% reliability to run after UIParent tries to show the popup (if the function runs before that, the popup could still show even though the guild is declined). This is based off the same code I use to auto-decline duel requests.

lua Code:
  1. UIParent:HookScript("OnEvent",function(self,event,...)
  2.     DeclineGuild();
  3.     StaticPopup_Hide("GUILD_INVITE");
  4. end);



On a side note, if such addon does exist, Blizzard would probably make it a protected function if not at least requiring a hardware event to run the API function to send out guild invites. Either way, it's impossible for an addon to detect nearby players that don't have a valid UnitID (those that aren't targeted by you or a party/raid member). There is a workaround for this theoretically if it's possible to take names form a /who scan run by the player. That would take players from the entire zone if written right, otherwise the first 49 players it finds on the entire server.

I would rather see an advertisement addon sending out a message to the general/recruitment channel every 5-10 minutes, or some other time that won't be considered spam or an annoyance to others.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 03-09-11 at 04:05 PM.