1. #1

    Auto Invite to raid Addon

    Hello I was wondering if there is a good addon that can auto invite to raid. This is mainly for Ashran because half the time people are just not forming groups and just spamming "INVITE" into general chat. It would be nice to automate this and have an addon auto invite them via keywords in general or if they whisper me.

    Also I would like to have a macro to use for inviting people to my group. It would be a macro to say in general chat "Looking for more PST for invite". Also with this macro I would like it to report the number of people currently in the raid group as well. The message could end up looking like this "Looking for more PST for invite. Currently there are <# of people in group> in my group."
    Old Computer

    New Computer

  2. #2

  3. #3
    It doesn't look it it works for general chat though and I want an addon that picks up keywords said in ashran general chat.
    Old Computer

    New Computer

  4. #4
    Quote Originally Posted by IXBillyXI View Post
    It doesn't look it it works for general chat though and I want an addon that picks up keywords said in ashran general chat.
    Why not make a macro for general chat telling them to whisper you?

  5. #5
    Quote Originally Posted by IXBillyXI View Post
    It doesn't look it it works for general chat though and I want an addon that picks up keywords said in ashran general chat.
    "It would be nice to automate this and have an addon auto invite them via keywords in general or if they whisper me."

    I gave you what you asked for. >.>
    Don't think there is any that can pick up from X channel though, expect the whisper.

  6. #6
    Deleted
    Sorry I didn't see this earlier.

    Macro to post to general.
    Code:
    /run local n=GetChannelName("General")if n then SendChatMessage(("Looking for more, PST for invite. Currently in group: %d members"):format(GetNumGroupMembers()or 1),"CHANNEL",nil,n)end

    Addon to auto invite anybody that says "invite" in general or whisper. Use /ashraninv to toggle on/off. Defaults to off.
    Code:
    local f=CreateFrame("Frame")
    f:SetScript("OnEvent",function(_,e,m,s,_,_,_,_,_,id) if (e=="CHAT_MSG_WHISPER") or (id==GetChannelName("General")) then if m:lower():find("invite") then InviteUnit(s) end end end)
    local state=false
    SlashCmdList.ASHRANINV = function() state=not state if state then print("Now auto-inviting.") f:RegisterEvent("CHAT_MSG_WHISPER") f:RegisterEvent("CHAT_MSG_CHANNEL") else print("No longer auto-inviting.") f:UnregisterEvent("CHAT_MSG_WHISPER") f:UnregisterEvent("CHAT_MSG_CHANNEL") end end
    SLASH_ASHRANINV1 = "/ashraninv"
    How to use.

    Both are untested. Let me know if they don't work.

  7. #7
    Treeston, is there a way to look for more than one trigger?
    Im looking to invite people for the daily apex quests and i usually see "inv", "invite" "inviting" or "LF Daily".

  8. #8
    Deleted
    Sure.

    Code:
    local triggers={"inv","lf%s+.*daily"}
    local f=CreateFrame("Frame")
    f:SetScript("OnEvent",function(_,e,m,s,_,_,_,_,_,id) if (e=="CHAT_MSG_WHISPER") or (id==GetChannelName("General")) then for _,t in ipairs(triggers) do if m:lower():find(t) then InviteUnit(s) break end end end end)
    local state=false
    SlashCmdList.ASHRANINV = function() state=not state if state then print("Now auto-inviting.") f:RegisterEvent("CHAT_MSG_WHISPER") f:RegisterEvent("CHAT_MSG_CHANNEL") else print("No longer auto-inviting.") f:UnregisterEvent("CHAT_MSG_WHISPER") f:UnregisterEvent("CHAT_MSG_CHANNEL") end end
    SLASH_ASHRANINV1 = "/ashraninv"

  9. #9
    thanks a lot treeston!
    it works perfectly with whispers but doesn't work on General channel unfortunately

    update: scratch that, working now
    Code:
    local triggers={"inv","lf%s+.*daily"}
    local f=CreateFrame("Frame")
    local index = GetChannelName("General")
    f:SetScript("OnEvent",function(_,e,m,s,_,_,_,_,_,id) if (e=="CHAT_MSG_WHISPER") or index then for _,t in ipairs(triggers) do if m:lower():find(t) then InviteUnit(s) break end end end end)
    local state=false
    SlashCmdList.ASHRANINV = function() state=not state if state then print("Now auto-inviting.") f:RegisterEvent("CHAT_MSG_WHISPER") f:RegisterEvent("CHAT_MSG_CHANNEL") else print("No longer auto-inviting.") f:UnregisterEvent("CHAT_MSG_WHISPER") f:UnregisterEvent("CHAT_MSG_CHANNEL") end end
    SLASH_ASHRANINV1 = "/ashraninv"
    i took a look at raretime addon to see how they checked for general chat messages and adapted your code by defining index as the general channel.
    tested it now on shattrath and worked.
    cheers!
    Last edited by menides; 2014-11-30 at 12:24 AM. Reason: working version

  10. #10
    Deleted
    That'll invite for every chat channel though, not just for general.

  11. #11
    I went ahead and made this addon so that others could use it without having to worry about creating their own addon and pasting the code. I credited Treeston and menides on the page. Search curse for AshranAutoInvite (I can't post links yet)

  12. #12
    Quote Originally Posted by Treeston View Post

    Macro to post to general.
    Code:
    /run local n=GetChannelName("General")if n then SendChatMessage(("Looking for more, PST for invite. Currently in group: %d members"):format(GetNumGroupMembers()or 1),"CHANNEL",nil,n)end
    Hey the macro to post in general chat is not working for me. Any ideas? When I save it as a macro and click it, nothing happens at all. Tested inside and outside of Ashran.

    Edit: Got it working, changed 'General' to 'General - Ashran' and it works now.

    - - - Updated - - -

    Code:
    /run local n=GetChannelName("General - Ashran")if n and IsInRaid()and GetNumGroupMembers()<40 then SendChatMessage(("Main Raid has %d spot(s) open. PST for invite."):format(40-GetNumGroupMembers()or 1),"CHANNEL",nil,n)elseif n and GetNumGroupMembers()>39 then SendChatMessage("Main Raid full. Try again in a few minutes.","CHANNEL",nil,n) else DEFAULT_CHAT_FRAME:AddMessage("Requirements not met.")end
    I added some to the statement you gave as an example and it works great in Ashran, however outside of Ashran it doesn't do either of the first two branches (which is correct) but it also doesn't follow the 'else' clause and give me the chat frame message.

    Any ideas?
    Last edited by filthy; 2014-12-28 at 12:30 AM. Reason: updated with new problem. got original problem sorted out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •