View Single Post
02-14-10, 08:58 AM   #4
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by Shadowed View Post
You'd have to wait until the message is actually sent. Something like the below will send the message and once it sees that you sent the message it'll drop group.


Code:
	local finishedMsg = "Random Dungeon Reward Received! Thanks for Group."
	local function CHAT_MSG_PARTY(msg, author)
		if( msg == finishedMsg and author == UnitName("player") ) then
			LeaveParty()
		end
	end

	local function LFG_COMPLETION_REWARD)
		SendChatMessage(finishedMsg, "PARTY")
		print("Random Dungeon Completed.")
	end
For that to work, you will of course have to register that event and set your local function as an OnEvent handler.
  Reply With Quote