Lightwell Buddy

This addon allows you to personalize and randomize announcements for when someone uses your lightwell, wastes your lightwell, or when your lightwell has sat idle, expires or is summoned . A visible counter has been added to display the number of charges remaining. The addon now supports the lightspring glyph.

Configuration options can be accessed in-game through the interface menu, right-clicking the lightwell counter graphic or by typing
/lwb config or /lightwellbuddy config
(Type /lwb to see these options in your locale, as they may have been translated to your language)

Recent Updates
-Added Controls to change the font, border and background of the Lightwell Counter

New Author Needed
The current authors will continue to do occasional fixes for patches that inevitably break the addon. However, our focus will be elsewhere as one author does not play a priest and the other no longer plays WoW. Please PM an author if you are interested in taking over or contributing to the development and maintenance of the addon.

Features
Advanced options include support for custom channels, customizing messages sent only to specific players, and support for multiple profiles which you can switch between by clicking the Lightwell Counter display. The addon supports unlimited profiles and unlimited numbers of customizable and randomizable messages within each profile. For some announcement message ideas, you can visit one of the following forum threads:http://us.battle.net/wow/en/forum/topic/2721374581http://www.plusheal.com/forum/m/1833...sponses/page/1
Please feel free to contribute your own message ideas on the threads, or in the comments of this page :-)

In addition to sending announcements, the addon will track and display the number of charges remaining on your lightwell. The graphic will fade and pulse as the lightwell nears expiration. Certain behaviors and visual appearance can be controlled through the configuration menu.

Localization:
Thank you for the help provided by the following translators: koKR (Complete by Guckkasten), zhTW (Partial by Whyv), deDE (Complete by Tacid), zhCH (Completed by ranrain), itIT (Completed by TyrusPrime), ptBR (partial by laminax), and ruRU (completed by seishinnokage).
If you're interested in providing translations for localizing the addon to your language, please use the curseforge interface here:http://wow.curseforge.com/addons/lig.../localization/

Thanks to our projects contributors: Choonster for the original design of the addon, Takkix for expanding and building the original in-game configuration window, and Hershe for the original concept and the efforts to test, debug and enhance. Thank you also to tehLH, the author of the Lightwell Counter project which this projet borrowed from to create the graphic counter. It is an open-source project which appears to have been abandoned by its original author, but has since been updated by a new author. Source for this project can be found here: http://wow.curseforge.com/addons/lwcounter/.

v1.35
Updated a few localized phrases.

v1.34
Updated for 5.2.
Added controls to change the font, background and border of the Lightwell Counter

v1.33
Updated the embedded Ace3 libraries and libSharedMedia
Added the new INSTANCE_CHAT channel to the drop-down menu
Modified the "SMART" channel to send messages to "INSTANCE_CHAT" when in an LFG (Dungeon Finder) instance or battleground/arena. Players in normal raids will continue to use the "RAID" and "PARTY" channels, or "SAY" if the player is not in a raid or party.
Updated the interfaceID for 5.1

v1.32
Modified LWB:ACTIVE_TALENT_GROUP_CHANGED so that LEARNED_SPELL_IN_TAB will always remain active if the player is a priest, so that it can properly detect when a priest first learns lightwell. Previously, it would have remained disabled after the player was first detected without having the spell learned.
Added comments and re-organized the functions to make it easier to read and understand.

v1.31
Added translations for the lightspring option added in v1.30.
Updated several translations for the ruRU (Russian) locale
Made some long overdue corrections to spelling errors in the enUS (English) locale

v1.30
Addon now detects and supports Lightspring. By default, addon will not make announcements unless the player selects an option in the configuration to turn on announcements for lightspring. All other functions (like the self-announcements and the graphic counter) will work with lightspring regardless of the option selected.

v1.23
New translations for the Brazilian and Russian localizations have been added, courtesy of laminax and seishinnokage

v1.22
No changes, just updating TOC file with the new interface version number.

v1.201
No changes, just updating TOC file with the new interface version number.

v1.200
Updated for 5.0.3 API and game changes.

V1.165
Added translations for the itIT locale

V1.164
Again, updating with a few more translations for the Simplified Chinese locale.

V1.163
Updated some additional revised translations for the Simplified Chinese locale, including an update of the default messages.

V1.162
Updated some revised translations for the Simplified Chinese locale.

V1.161
Added new translations for the features added in version 1.16 for the German, Korean and Simplified Chinese locales.

Properly notated some comments in the TOC file.

"Profiles" in the interface options window is now localized

V1.16
Added translations for the zhCH (Simple Chinese) localization.

Adding options to customize the color and texture of the lightwell counter status bar.

Fixed the "Pulsing" graphic that happens during the last 10.5 seconds of the lightwell's duration. It now actually pulses.

Added an option to control when the pulsing begins.

Discovered an apparent flaw in the AceTimer 3.0 library and implemented a workaround. I do not believe the flaw impacted prior releases of the addon, but developmental versions of 1.16 would fail to properly execute the terminating functions after a timer finishes (i.e. the first occurrence of the 180 second timer for the lightwell would run fine, but all future ones would fail to execute their terminating functions). Fixed the issue by setting the timer handle = nil each time after a timer is canceled.

v1.154
Was having an issue with some nonstandard ASCII characters not loading properly from the german localization and with my computer not cooperating with me to save in UTF-8 format >:( Changed all the localization files to use escape sequences instead.

v1.151
Messages can now be sent to custom channels. Custom channels that the user has joined can be selected by name in the channel dropdown menus on the configuration window.

Incorporated AceComm 3.0 among other changes that will allow other addons to detect when a message has been sent. Meant to be used with another addon (in developement) that users can install to block messages sent by lightwell buddy, functioning as an opt out for those who find it annoying.

v1.142
The Lightwell Counter frame now recognizes two click commands: Right Clicking will open the Lightwell Buddy configuration window. Left Clicking will scroll through your profiles to make it easier to quickly change your active profile.

Changed the font in the Lightwell Counter to "GameFontNormal" to allow compatibility with other locales.

Added a button on the main configuration window to quickly take people to Profile configuration window.

The configuration window will now automatically update when the profile is changed, even if the window is already open.

Changed the way the default messages are stored and inserted into the active profiles (hopefully) completely fixing the issue of rogue defaults showing back up when the user did not enter more than the default number of messages.

Changing the active profile no longer calles the Reset() function, allowing active timers and other variables to carry over into the subsequent profile. A new function is called instead that checks that the profile has messages (and inserts defaults when it does not) and updates the settings on the Lightwell Counter.

v.1.141
Lightwell Buddy wasn't always detecting the talent points on player log in, resulting in it determining that the player was not a holy priest. Corrected the inspections to wait for INSPECT_READY to fire before inspecting talent points on initial login.

v.1.14
Being abandoned by its original author, I've incorporated the Lightwell Counter project to create a graphical counter. The counter displays the number of charges left and fades as the lightwell timer runs out. The source for the Lightwell Counter project can be found here:http://wow.curseforge.com/addons/lwcounter/

To enable detection for when the counter should be visible or hidden, I've hooked the following new events: PLAYER_REGEN_DISABLED to show the counter while in combat. PLAYER_REGEN_ENABLED to hide the counter while out of combat. ACTIVE_TALENT_GROUP_CHANGED to hide the counter while not in holy spec.

Added two new tabs to the configuration window. Tab 1 (the original tab) is dedicated to options for controlling the messaging. Tab 2 contains a few options for controlling the new Lightwell Counter, similar to the options that existed in the original project. Tab 3 contains instructions and controls for blacklisting.

Updated the english localization file with a few new phrases found on the Counter configuration and displayed on the counter itself.

v1.13
Added a few more zhTW translations and activated the localization to appear in game (missed that part previously, whoops)

Updated the koKR localization with a few revised translations from Guckkasten.

Improved (made more complicated) the band aid fix on deleting extra default messages that appear when the user saves less than the number of default messages.

v.1.123
Adding partial localization for the zhTW locale (traditional Chinese), translations provided in part by Whyv and in part by Google Translate.

v.1.122
Minor update fixing a few strings that I forgot to localize.

v.1.12
Localized for koKR (Korean). Translations provided by Guckkasten. Please submit a ticket or comment if you have issues with the localization.

Updated the default phrases to accept strings and split them into tables using a "\n" delimiter, allowing for compatibility with curseforge's localization tool.

v.1.11
AceLocale-3.0 libraries have been incorporated at the (apparent) request of the korean developer.

v1.10
Band-aide fixed an issue where the second default general use and summon phrase would appear if no second phrase was saved by the user.

Prepared some more configuration and alert phrases for localization.

v1.09
Prepared the addon to be localized. Translations will need to be provided by anyone that wants the addon localized to their language.

v1.08
Fixed the function that adds manually entered names to the blacklist and personal use lists, where previously it was not always handling hyphens in server names correctly. Hopefully without breaking anything else in the process...

The configuration window can now be edited regardless of what toon you're on.

v1.07
Updated for patch 4.3

Improved the idle timer

v1.06
Fixed an issue where non-standard ascii characters were not being recognized when trying to add a player to a Personal Use list.

v1.05
Added an "Idle" event that can send a message after the lgihtwell has not been used for a given period of time.

You can now create new lists of messages that will be sent to specific players when they use the lightwell. There is not limit to the number of unique lists you can have, and there's no limit to how many players can be on one list. An individual player may only be on one list at time.

Improved the GUI for controlling the blacklist

Blacklist is no-longer case-sensitive

v1.04
Fixed an error that was triggered when the lightwell disappeared early where all of the arguments were not being passed to the message function.

You can now blacklist someone by targeting them and typing /lwb blacklist

Lag with the server allows extra charges to be used before the Lightwell Renew HoT has been applied. Lightwell Buddy will now detect when extra charges are consumed when people double-click the lightwell, improving the accuracy of the LWB's count. If all goes well, the early disappearance event will no longer be triggered when extra charges are consumed. Instead, a new event has been added with its own list of messages that can be sent when extra charges are consumed.

--v1.02
New options have been added to the configuration window for the following features:

The table "blacklist" has been added. When players whose names are in this table use the lightwell, a message will not be sent. Only applies to the "Use" event.

To prevent lightwell message spamming, the variable useCD has been added to specify a cooldown time in seconds between sending messages. After sending a message, no messages will be sent until the cooldown time has passed. Only applies to the "Use" event.

--v1.01
Added the slash commands /lwb and /lightwellbuddy to make it easier to open the configuration window

To prevent repetition, Lightwell Buddy will now track messages used, and will not allow a message to be used again until at least 2/3rds of the other available messages have been used.

The token %u (for the user's name) will now replace the server name of the player with a "(*)".

Changed a few tooltips and messages defaults to make it easier for users to figure out how to add messages.

--v1.00
This was submitted by takkix, and with his permission, is being submitted as v1.00. It almost completely overhauls the code in previous versions, which now exist primarily in concept alone. Changes include:

In addition to sending messages on Summon and Use events, the addon can also send messages for waisted charges, when all charges are consumed, when the lightwell expires with charges remaining, and when the lightwell disappears without expiring and without having all charges consumed.

Ace3 libraries were incorporated to design an in-game interface and save settings and messages to a saved variable. The configuration now also supports multiple profiles.

Message notifications now come across the player's screen notifying when the lightwell was clicked, who clicked it, and charges remaining.

--v0.07--
Very small cleanup build.

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

Changed the Notes field of the .TOC to reflect the addition of random summon messages.

--v0.06--
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".

--v0.05--
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)--
-Summary-
Added a summon message and the ability to put the number of used/remaining charges in messages.

This is a great addon, thank you. Unfortunately, it's resulted in me realizing just how rarely my lightwell is actually used... /sigh

Depressing eh? lol. Still, I hope the addon has helped some priests out there get some extra use out of it, or at least bring a smile to their face with the naughty and humorous sayings they put into it :-).

Originally posted by cardo how can I change the announce? He saves me from my not entered. I want it in German

type /lwb

On the lower part of the configuration window, select the event you want to change the announcements for. Type in your new announcements (they can be in german), then press "Accept" at the bottom to save them.

Originally posted by Detvarjannik Hello, I just got your brillant work installed and I love it!
- But running a few heroics, I've noticed that it's only some of the functions that works.

The Waste, Empty, Expire and Disappear has not fired any messages at all.
I know that at least the disappear one should, since the self message in white once showed me it had 4 charges left when it disappeared.

I have set the channel to smart, if that is any lead.
*edit* I have also ticked all the boxes.

The use function has proven very worthy however, people are using it and perhaps a bit too eager (double clicking), which is why I would love the warning to fire as well =)

Thank you for this AddOn!<3

I'll have to do some more testing to see if I can duplicate the problem, but I do know that all messages have worked for me in combat. outside of combat, I'm not sure yet.

Hello, I just got your brillant work installed and I love it!
- But running a few heroics, I've noticed that it's only some of the functions that works.

The Waste, Empty, Expire and Disappear has not fired any messages at all.
I know that at least the disappear one should, since the self message in white once showed me it had 4 charges left when it disappeared.

I have set the channel to smart, if that is any lead.
*edit* I have also ticked all the boxes.

The use function has proven very worthy however, people are using it and perhaps a bit too eager (double clicking), which is why I would love the warning to fire as well =)

First of all i wanna thank u for this great addon. I love it very much!
I've a small question about this addon. When someone from other
server clicking it says the name-server name. is it possible to hide the
server name like Xieje(*), instead of Xieje-Aggramar as example.
It makes the name shorter without the realm server.
I hope it could help u with this. Would be lovely.

Sorry, there was a message here asking how to add multiple messages to the newest version of the addon so they are sent out at random. Yes, this is still possible! Just separate each message with a return/enter. I accidentally deleted your comment instead of replying to it >.< lol. So in the big message box, just make it look something like:

Whitty message 1
Whitty message 2
Etc.

Similar to how it was done in the old versions, except no need for the [1] "Whitty message", syntax