Download
(223 Kb)
Download
Updated: 03-25-13 12:25 AM
Pictures
File Info
Compatibility:
Thunder Isle (5.2)
Updated:03-25-13 12:25 AM
Created:06-27-11 01:52 AM
Downloads:4,096
Favorites:20
MD5:
Lightwell Buddy
Version: 50200-v.35
by: Choonstertwo, hershe
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/2721374581
http://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.

Incorporated LibSharedMedia and AceGUI-3.0-SharedMediaWidgets libraries to enable texture selection.

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.153
Added additional translations for the deDE (German) localization.

v1.152
Adding translations for the deDE (German) localization.

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.03
Minor update to fix typographical errors in tooltip descriptions.

--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.

-Details-
Added the MESSAGE_CHANNEL, MESSAGE_LANGUAGE, SUMMON_MESSAGE and SUMMON_CHANNEL constants.

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.

--v0.03--
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.
Optional Files (0)


Archived Files (43)
File Name
Version
Size
Author
Date
50200-v.34
222kB
Choonstertwo
03-21-13 05:05 PM
50200-v.34
222kB
Choonstertwo
03-21-13 04:35 PM
50005-v.33
221kB
Choonstertwo
12-17-12 02:38 PM
50005-v.31
263kB
Choonstertwo
10-24-12 12:43 AM
50005-v.23
262kB
Choonstertwo
10-17-12 12:18 AM
50005-v.22
254kB
Choonstertwo
10-10-12 11:21 PM
50001-v.201
254kB
Choonstertwo
08-29-12 09:43 PM
40300-v1.165
254kB
Choonstertwo
05-02-12 09:25 PM
40300-v1.164
250kB
Choonstertwo
04-01-12 10:09 PM
40300-v1.163
250kB
Choonstertwo
03-30-12 08:08 PM
40300-v1.162
249kB
Choonstertwo
03-13-12 02:26 PM
40300-v1.161
249kB
Choonstertwo
02-09-12 03:51 PM
40300-v1.16
249kB
Choonstertwo
02-08-12 01:27 AM
40300-v1.16
163kB
Choonstertwo
01-31-12 06:49 PM
40300-v1.153
160kB
Choonstertwo
01-31-12 02:02 PM
40300-v1.152
160kB
Choonstertwo
01-30-12 10:01 PM
40300-v1.151
156kB
Choonstertwo
01-26-12 04:40 PM
40300-v1.142
145kB
Choonstertwo
01-14-12 02:35 AM
40300-v1.141
145kB
Choonstertwo
01-12-12 01:41 AM
40300-v1.14
145kB
Choonstertwo
01-11-12 04:29 PM
40300-v1.13
143kB
Choonstertwo
01-08-12 08:59 PM
40300-v1.123
142kB
Choonstertwo
01-06-12 08:58 PM
40300-v1.122
141kB
Choonstertwo
01-05-12 10:18 PM
40300-v1.12
141kB
Choonstertwo
01-04-12 02:07 PM
40300-v1.11
141kB
Choonstertwo
01-03-12 02:25 AM
40300-v1.10
139kB
Choonstertwo
01-02-12 07:24 PM
40300-v1.09
138kB
Choonstertwo
01-02-12 03:28 AM
40300-v1.08
133kB
Choonstertwo
12-29-11 01:35 PM
40300-v1.07
132kB
Choonstertwo
11-29-11 03:20 PM
40200-v1.06
132kB
Choonstertwo
11-17-11 10:28 PM
40200-v1.05
132kB
Choonstertwo
11-15-11 08:41 PM
40200-v1.04
130kB
Choonstertwo
11-07-11 12:15 AM
40200-v1.03
129kB
Choonstertwo
10-29-11 12:54 AM
40200-v1.02
129kB
Choonstertwo
08-28-11 02:06 AM
40200-v1.01
158kB
Choonstertwo
07-27-11 07:04 PM
40200-v1.00
156kB
Choonstertwo
07-11-11 09:44 PM
40200-v0.07
4kB
Choonstertwo
07-05-11 02:27 AM
40200-v0.06
5kB
Choonstertwo
07-04-11 11:10 PM
40200-v0.05
4kB
Choonstertwo
07-04-11 02:50 AM
40200-v0.04
3kB
Choonstertwo
07-01-11 01:06 AM
40200-v0.03
2kB
Choonstertwo
06-28-11 01:47 PM
0.02
2kB
Choonstertwo
06-28-11 12:56 AM
0.01
27kB
Choonstertwo
06-27-11 01:52 AM


Post A Reply Comment Options
Unread 07-08-11, 02:00 AM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Originally posted by takkix
So now I would like to know if you would like to possibly look at the addon I have expanded yours in to. I welcome you to take all or none of it. I'm also willing to help maintain the addon if needed.
I've been reading up on building interfaces in XML for days (I'm brand new at this and not very good at it). I've only gotten as far as creating a frame with two drop down menus. A functioning, scrolling editbox still alludes me lol.

I'd love to take a look at what you've put togeather :-) Decisions on how to move forward will be left to Choonster as the primary author, though I'm all for offering a simpler interface. If you'd like to share your work, you can post it here or on our development thread we have going on the official forums (http://us.battle.net/wow/en/forum/topic/2721383954). Probably better to put it on the forums to keep these comments cleaner.

Cheers!
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-07-11, 09:55 PM  
takkix
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
I had used Lightwell Buddy for a while and got some people asking how I made the msgs and I was directing people to download your addon but a couple of them came to me asking me to help them configure it and they couldn't quite get it to work so I built a DB and options window in. I then got asked for msgs on empty and for expired Lightwells and a way to track how much healing the well has done. So now I would like to know if you would like to possibly look at the addon I have expanded yours in to. I welcome you to take all or none of it. I'm also willing to help maintain the addon if needed.
takkix is offline Report comment to moderator  
Reply With Quote
Unread 07-04-11, 10:56 PM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
v 0.06

Fixed some bugs with v0.05 that prevented messages from being sent. Details are in the change log.
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-04-11, 03:36 PM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Originally posted by kislio
is it possible to set this up to whisper the person who clicked the lightwell?
It's already set up for it. Just change the message channel option at the top of the code to "WHISPER" instead of "SMART".
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-04-11, 02:48 PM  
kislio
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
is it possible to set this up to whisper the person who clicked the lightwell?
kislio is offline Report comment to moderator  
Reply With Quote
Unread 07-04-11, 10:13 AM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Re: v0.05

Originally posted by Choonstertwo
I've just released v0.05, which includes a constant to adjust the frequency that messages are sent at. Thanks for the idea Aribella.

I've also made a few changes to properly support sending messages to a numbered channel (e.g. Trade is usually accessed with the /2 command) including both world channels like Trade/General and custom channels.

See the change log for the full list of changes.
Hey, I've gotten a complaint on the forums that clicking the well causes an error. The error looks like the sendchatmessage command is being executed with a nil message, causing the error. I can't look into it until I'm home from work in about 10 hours. If you have a chance before then, you might want to take a look and make sure none of your changes are causing nil messages to be sent instead of blank.

Great changes otherwise. Thanks!
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-04-11, 02:58 AM  
Choonstertwo
A Theradrim Guardian
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 65
File comments: 61
Uploads: 28
v0.05

I've just released v0.05, which includes a constant to adjust the frequency that messages are sent at. Thanks for the idea Aribella.

I've also made a few changes to properly support sending messages to a numbered channel (e.g. Trade is usually accessed with the /2 command) including both world channels like Trade/General and custom channels.

See the change log for the full list of changes.
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Unread 07-03-11, 06:14 AM  
Aribella
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
thanks!
Last edited by Aribella : 07-03-11 at 06:23 AM.
Aribella is offline Report comment to moderator  
Reply With Quote
Unread 07-02-11, 10:51 AM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Originally posted by Aribella
hey =]

love the addon!

Is there anyway to have it say as an emote? (so then I can edit all the messages to start with "'s Lightwell says:...")

And also have it on a random chance to say the messages (i.e there is a 1 in 3 or 1 in 2 chances of getting a message).

thanks again for the epic addon
Aribella
Yes to the emote. If you have the latest version, just change the message channel at the top to "EMOTE" instead of "SMART".

As for the random chance to say something, you may be able to trick it by adding 1/3 or 2/3 messages that are blank, so it will pick a blank message and do nothing. But I'm out of town and can't test it, so good luck :-). We may be able to add a more permanent solution later
When we get a chance.

edit:

Confirmed, you can rig it to not display a message a certain % of the time by adding blank messages. For example, if you have 2 messages and you want a 1/3 change for a message to come up when someone clicks it, add another 4 blank messages so it looks like this:

Code:
  [1] = "Thank you for using the Lightwell %u!",
  [2] = "May the Light bless you %u.",
  [3] = "",
  [4] = "",
  [5] = "",
  [6] = "",
not the most elegant solution but it will get the job done.
Last edited by hershe : 07-02-11 at 03:44 PM.
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-02-11, 02:42 AM  
Aribella
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
hey =]

love the addon!

Is there anyway to have it say as an emote? (so then I can edit all the messages to start with "'s Lightwell says:...")

And also have it on a random chance to say the messages (i.e there is a 1 in 3 or 1 in 2 chances of getting a message).

thanks again for the epic addon
Aribella
Aribella is offline Report comment to moderator  
Reply With Quote
Unread 07-01-11, 08:57 AM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Re: Just doesn't seem to work.

Originally posted by korleonis
Nothing.
Do you have the latest version of the addon installed (v0.04)? Patch 4.2 broke the previous version of the addon. If so, try downloading it again without configuring anything in the core.lua file and see if it gives any of the default messages when you summon and click your lightwell. The latest version appears to work just fine for me thus far. If you have more issues, please leave another comment.
hershe is offline Report comment to moderator  
Reply With Quote
Unread 07-01-11, 04:01 AM  
korleonis
A Kobold Labourer

Forum posts: 0
File comments: 27
Uploads: 0
Just doesn't seem to work.

Nothing.
korleonis is offline Report comment to moderator  
Reply With Quote
Unread 07-01-11, 01:08 AM  
Choonstertwo
A Theradrim Guardian
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 65
File comments: 61
Uploads: 28
v0.04

I've included those changes in v0.04.

Thanks again Hershe.

If anyone wants to read the development dialogue or suggest/contribute new stuff, visit this thread on the official forums:
http://us.battle.net/wow/en/forum/topic/2721383954

If you can't post there for whatever reason, post your feedback in these comments instead (I don't read them as often, but I do occasionally).
Last edited by Choonstertwo : 07-01-11 at 01:11 AM.
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Unread 06-30-11, 11:18 PM  
hershe
A Deviate Faerie Dragon

Forum posts: 10
File comments: 17
Uploads: 0
Suggested Improvements:

The addon has gotten a lot of positive feedback from other priests on the forum and the people I've ran with in dungeons :-) I've enjoyed working on it and testing it out. Based on their feedback and some of my own, I've made some improvements you may want to incorporate into the official version:

1. Added variables for "charges used" and Charges remaining". Added a new function at the bottom to reset these values, which is executed when the lightwell is summoned.
2. Added placeholders for messages to include charges remaining/used. (%x = charges used, %c = charges remaining, in addition to the original %u and %p)
3. Added a constant that the user can enter a message to be displayed when the lightwell is summoned.
4. Added a "channel" constants for the "click" message and "summon" message. The user can enter the name of a particular channel they want the messages to go to, or enter "SMART" for it to go to raid/party/say if they are in a raid or party.
5. Re-organized some of the code so that all the configurable options for channel selection, summon message and the table of messages are at the top so they're easier to find.

Code:
--SELECT YOUR CHANNEL. You may enter the name of the channel you want your messages to go to (for example "SAY", "EMOTE", "PARTY", "RAID", "BATTLEGROUND", "GUILD", "OFFICER", or "SMART"). "SMART" will send the message to raid if you're in a raid, party if you're in a party, or say if you're in neither.
local MESSAGE_CHANNEL = "SMART"


--ENTER LIGHTWELL SUMMON MESSAGE. Select a channel and enter a message to be displayed when you summon your lightwell. 
local SUMMON_MESSAGE = "Click my Lightwell for a SURPRISE!"
local SUMMON_CHANNEL = "SMART"


--[[Add Messages:
Format:
	[#] = "Phrase",
	[#] = "Phrase",

Any occurrence of the following placeholders will be replaced as follows:
%u will be replaced by the Lightwell user's name.
%p will be replace by your name.
%c will be replaced by the number of charges remaining on the lightwell
%x will be replaced by the number of charges used on the lightwell.

Put a double dash ( -- ) at the start of a line in this table to "comment" it and stop LWB from using that phrase.
To use the \ (backslash) or | (vertical bar) characters in the phrase, you may need to use \\ or || respectively.
]]


local LWB_phrases = {
  --Start of table
  [1] = "Thank you for using the Lightwell %u!",
  [2] = "May the Light bless you %u.",

  --End of table
}

--END OF CONFIGURATION. DO NOT MODIFY ANYTHING ELSE BELOW UNLESS YOU REALLY KNOW WHAT YOU'RE DOING!



local ADDON_NAME, ns = ...

local LWB_events = {}
local LWB_frame = CreateFrame("Frame")
LWB_frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")

local PLAYER_NAME = UnitName("player")
local PLAYER_GUID = UnitGUID("player")
local CHARGES_USED = 0
local CHARGES_REMAINING = 0
local LIGHTWELL_SPELLID = 724
local RENEW_SPELLID = 7001

local message;

local gsub = string.gsub
local SendChatMessgae = SendChatMessage



function LWB_events:COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellId, spellName, spellSchool, ...)
	if not PLAYER_GUID then
		PLAYER_GUID = UnitGUID("player")
	end

	if event == "SPELL_SUMMON" and sourceGUID == PLAYER_GUID and spellId == LIGHTWELL_SPELLID then
		RESET_CHARGES()
		SendChatMessage(SUMMON_MESSAGE, SUMMON_CHANNEL == "SMART" and ((GetNumRaidMembers() > 0 and RAID) or (GetNumPartyMembers() > 0 and PARTY) or (SAY)) or SUMMON_CHANNEL, nil, nil)
		
	elseif event == "SPELL_AURA_APPLIED" and sourceGUID == PLAYER_GUID and spellId == RENEW_SPELLID then
		CHARGES_REMAINING = CHARGES_REMAINING - 1
		CHARGES_USED = CHARGES_USED + 1
		message = nil --reset the message

		repeat --keep trying to pick a random message until we get one
			message = LWB_phrases[random(#LWB_phrases)] or nil
		until message

		message = gsub(message, "(%%[pucx])", function(arg)
			if arg == "%p" then
				return PLAYER_NAME
			elseif	arg == "%u" then
				return destName
			elseif arg == "%c" then
				return CHARGES_REMAINING
			elseif arg == "%x" then
				return CHARGES_USED
			end
		end)
	

	SendChatMessage(message, MESSAGE_CHANNEL == "SMART" and ((GetNumRaidMembers() > 0 and RAID) or (GetNumPartyMembers() > 0 and PARTY) or (SAY)) or MESSAGE_CHANNEL, nil, (MESSAGE_CHANNEL == "WHISPER" and destName) or nil) --Say the message. DO NOT CHANGE THE message ARGUMENT.

	--[[
	To change how the message is said (e.g. language, channel), visit this page:
		http://www.wowpedia.org/API_SendChatMessage
	]]
	end
end

function RESET_CHARGES()
	CHARGES_REMAINING = 10
	CHARGES_USED = 0
	for i = 7, NUM_GLYPH_SLOTS do
 		local enabled, glyphType, glyphTooltipIndex, glyphSpellID, icon = GetGlyphSocketInfo(i);
 		if ( enabled ) then
   			if glyphSpellID == 55673 then 
				CHARGES_REMAINING = 15
			end
		end
	end
end





LWB_frame:SetScript("OnEvent", function(self, event, ...)
	LWB_events[event](self, ...)
end)
Last edited by hershe : 07-01-11 at 12:14 AM.
hershe is offline Report comment to moderator  
Reply With Quote
Unread 06-28-11, 12:57 AM  
Choonstertwo
A Theradrim Guardian
 
Choonstertwo's Avatar
AddOn Author - Click to view AddOns

Forum posts: 65
File comments: 61
Uploads: 28
Thanks.

Thanks for the help debugging this Hershe. I've uploaded that fix as v0.02 now.
Choonstertwo is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: