View Single Post
04-12-11, 01:04 AM   #4
Akkorian
A Flamescale Wyrmkin
 
Akkorian's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 111
Hi Jalisco,

The script Duugu posted just needs a few adjustments. This should work:

Code:
/run local f=CreateFrame("Frame") f:RegisterEvent("CHAT_MSG_GUILD") f:SetScript("OnEvent", function(_,_,m,s) if s=="raid leader name" and m:find("search term") then SendChatMessage("phrase to send","GUILD") end end)
But, to make it easier, you could make it into a small addon instead of having to run the macro every time you log in:

AddOns\AutoInviteMe\AutoInviteMe.toc:
Code:
## Interface: 40000
AutoInviteMe.lua
AddOns\AutoInviteMe\AutoInviteMe.lua:
Code:
local f = CreateFrame( "Frame" )
f:RegisterEvent( "CHAT_MSG_GUILD" )
f:SetScript( "OnEvent", function( self, event, message, sender )
    if sender == "raid leader name"
    and message:find( "search term" ) then 
        SendChatMessage( "phrase to send", "GUILD" )
    end
end)
__________________
“Be humble, for you are made of earth. Be noble, for you are made of stars.”
  Reply With Quote