To install the AddOn, follow either of these instructions:

To configure the AddOn, simply edit the core.lua file (in any text editor) as instructed.

Thanks to Hershe of Silver Hand US for the concept and for testing and fixing my initial version.

==Change Log==
Very small cleanup build.

Replaced the SAP_message and SUMMON_message variables with a single message variable to reflect Hershe's changes to GetMessage.

Fixed several bugs that prevented the addon from sending messages:

1. The GetMessage function was not recognizing the whichTable variable as a text string. As a consequence, the "If" conditions that attempted to determine which message table was being used in the GetMessage function were not working. These "if" conditions were removed.

2. The destName variable was not being passed from the COMBAT_LOG_EVENT_UNFILTERED to the GetMessage function, causing the %u token to not be changed. destName was added as an argument to the GetMessage function.

3. SAP_message and SUMMON_message were not being given a value by the GetMessage function. The SendChatMessage commands were giving nil messages, resulting in an error. The SAP_message and SUMMON_message variables were replaced with the message variable.

4. In the SendChatMessage commands, conditions such as SAP_CHANNEL_TYPE == WHISPER were not determining properly. Quotes were added to recognize WHISPER and CHANNEL as a text string, i.e. SAP_CHANNEL_TYPE == "WHISPER".

Split many of the existing configuration constants into two separate constants, one for SPELL_AURA_APPLIED events and the other for SPELL_SUMMON events.

Added the SAP_CHANCE and SUMMON_CHANCE constants to adjust the frequency that messages are sent at.

Changed the SUMMON_MESSAGE string constant into the SUMMON_PHRASES table constant. Summon messages are now randomised like SPELL_AURA_APPLIED messages.

Moved the message randomisation code to a new local function GetMessage. The first argument is the variable that the message gets assigned to, the second is the table that the message is chosen from.

Changed some of the existing single line explanation comments to more detailed multi-line comments for easier reading.

--v0.04 (Hershe's Edit)--
Added a summon message and the ability to put the number of used/remaining charges in messages.


Added the charges_remaining and charges_used variables and the resetCharges function.

Added the "SMART" channel value to use RAID, PARTY or SAY depending on your group status.

Added the %c and %x tokens to the SPELL_AURA_APPLIED message to be replaced with charges_remaining and charges_used respectively.

Added the sourceRaidFlags and destRaidFlags arguments to COMBAT_LOG_EVENT_UNFILTERED to fix for patch 4.2.

Changed Interface to 40200.

--v0.02 (Hershe's Second Fix)--
The PLAYER_GUID constant wasn't being assigned correctly during the loading process. If not already assigned, it will be assigned on the first occurrence of COMBAT_LOG_EVENT_UNFILTERED.