Quantcast
lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO Stand-Alone Plugins > Other

Category: OtherLoTRO Alerts
Interface Information
Download
Garan's Portal Bug Reports Feature Requests
How do I install this? (FAQ)
Name: LoTRO Alerts   Popular!
Author:
Date: 03-10-2016 06:47 PM
Size: 57.19 Kb
Version: 1.08
Rate File: 5 out of 5 with 12 votes  
Pictures
Click to enlarge 

Views: 0
Size: 48.48 Kb
Dimensions: 990 x 468
Sample Lm stun break alert
 
Click to enlarge 

Views: 0
Size: 55.60 Kb
Dimensions: 822 x 478
The Trigger settings for the 'Tracked' alert.
 
Click to enlarge 

Views: 0
Size: 51.70 Kb
Dimensions: 820 x 474
The Response settings for the 'Tracked' alert.
 
Description
Ever get blown-up while wandering in stealth just to realize you missed the tracking warning? Ever have some stray arrow break your stun/daze/mez on a critical NPC and not know who to rant at, er I mean provide constructive criticism too?

Well, never miss an important message just because it's burried in a rapidly scrolling mountain of chat. Welcome to Alerter.

This plugin allows you to set specific phrases to watch for in specific chat channels and if any match occurs in a specified channel, a message is displayed prominantly on your screen. You can control the position, size, text, color and duration of the message as well as whether it flashes and how quickly.

See samples of alert setups at http://www.lotrointerface.com/portal.php?id=35&a=faq

You can use the Chat Log Window to determine the channel and text you are trying to match. Click the "Show Log" button or use the "/Alerter Log Show" command to display the Chat Log Window. The chat log will have three columns, the first is the channel (text if recognized, numeric if unknown), the second is the "Sender" which currently seems to always show the current player and the third is the message Text with all hidden XML tags exposed. You can start/stop logging and clear the log from the window. You can also start/stop loggin with the "/Alerter Log Start" and "/Alerter Log Stop" chat commands. The chat log will retain up to 1000 messages before it starts automatically recycling space by dropping the oldest entries.

To install, simply download the file and unzip it into your /Plugins folder. There are no dependancies on 3rd party files, everything you need is in the zip.

To load it, use /Plugins load Alerter.

The "/Alerter setup" command will display the setup/configuration screen. By default the plugin loads hidden, you will have to display the setup screen at least once to define one or more alerts. There is no practical limit to the number of alerts you can set, but you will eventually start to notice a performance hit if you define a hundred or so

To define an Alert, select "New" from the Alert selection list. Then enter a label for the alert (this is what will display in the Alert selection list so you can modify the alert later if you wish. Then enter the text that you want to display - note, if you leave the message text blank, the entire message that triggers the alert will be used for the message (see the stun break example). Enter a Duration in seconds. You can use decimal values to get partial seconds. Select a Color and Font for the message text. Select the flash interval in seconds - by entering 0, the message will not flash but will display for the entire Duration. Select the Chat channel(s) where you wish to trap a message - note in the LM example, the stun break message occurs in the Death channel, not the Combat channel which you might expect, so some experimentation may be required to get the proper channel. Lastly, enter the portion of the message that should trigger the alert - the larger the section of text the better - and click Save. If you want to see how the alert will look, click Test.

Version 1.08
Added custom Lua code snippets for Trigger and Response. The Trigger snippet can be used to provide custom filtering of alerts while the Response snippet can be used to define additional response capabilities or alter the existing responses.
To learn more about the code snippets and their capabilites, read the ReadMe.txt file.
Changed "Show Log" Button to "Show Chat Log" to reflect that it is a log of incomming Chat messages
Changed "Add to Custom Log" Checkbox to "Add to Alert Log" and added "Show Alert Log" Button to view the log of alerts.
Added Log Viewer window. This window will display the history of alerts that had the "Add to Alert Log" check box checked during a specific session. I recommend not logging alerts unless you are trying to debug something as the log viewer doesn't handle large tables very well. However, it does have a couple of handy features:
You can left drag column headings to reorder the columns, you can left drag the header separators to resize columns and you can right click the header to check/uncheck columns to be displayed
You can control the size of the text in the grid by selecting a font and size by clicking the font select button in the upper right corner. You can also increase/decrease the font by simply holding Ctrl and scrolling your mouse wheel while over the grid - note, the font change can take a second or two for large tables so it is best to select a font while reviewing a session with fewer alerts to find a font that is comfortable.
The Response column is the actual text displayed by the Alert while the Message column is the original text from the incomming Chat message that triggered the alert.

Version 1.07
Restored Shared alerts and Custom Logs that were accidentally removed in 1.06
Added "message" to Custom Logs.
Note, Custom Logs are log files per client session that are stored at the account level, in the AllServers folder, as "Alerter_Log_YYYYMMDD_HHMMSS.plugindata" where YYYYMMDD is Year, Month and Day and HHMMSS is Hours, Minutes and Seconds. A log viewer is planned for a future version.

Version 1.06
Added "World" chat channel
Added support for Emote, Pet and Hobby quickslots in Responses
Changed default behavior of quickslots to display for Duration and added option to "Hide after Clicked"

Version 1.05
Fixed alert position bug for alerts using Mouse Position and a Delay time.
Fixed bug that could generate an error when displaying the "Alert Saved" or "Alert Deleted" message.
Fixed bug in language selection not immediately updating State radio button labels and selection list labels.

Version 1.04
Added separate tabs for Trigger settings and Result settings to help group settings and clean up the cluttered interface
Updated the DE and FR support. The whole interface should now support both German and French (although some translations may still be a bit literal).
Changed channel select boxes to automatically reorder alphabetically when language changes.
Added the new channels from Update 6 (Combat - Player and Combat - Enemy).
Changed Item quickslots to accept item instance IDs instead of generic IDs (the first part of the ID should not be 0). Use drag & drop to generate the ID. Note, for items with more than one stack, only the stack that is actually dragged to the control will work.
Implemented permanent fix for the version 1.03 infinite loop bug caused by ExaminationItemID tags containing byte data.
Added Delay setting for alerts - you can now trigger an alert to go off x number of seconds after the chat message which is great for knowing when to refresh certain skills, etc.
Added States (currently only "In Combat" and "Out of Combat") for triggers. You can choose to delay an alert until the state is no longer true or suppress he alert all together. This way you won't be bothered by social alerts while in combat (but you can choose to have them pop up once combat ends), etc.
Fixed a bug that could allow an alert Quickslot to continue to display even after the alert duration had expired.

Version 1.03
Modified Alerts so that more than one alert can be active simultaneously - alerts no longer override each other.
Added limits to the alert template when resizing with the mouse - you can still override the limits by manually entering lower values.
Re-added the Opacity slider
Added tinting to areas of the setup panel to indicate related fields and help a little with the clutter
Added Quickslot controls to alerts - these let you click on the alert to execute an alias, perform a skill or use an item
Added an option to display alert at the mouse position, overriding the Top and Left coordinates (mostly useful for Quickslot alerts)
Added an option to scroll the text vertically upwards within the defined alert box - the scroll rate is controlled by the duration

Version 1.02
Added Cooldown setting to alerts - allows setting a minimum time between alerts for the same trigger.
Added a graphical frame which is visible when the setup window is visible for graphically moving/resizing the alert panel in addition to left, top, width and height fields that can be manually entered.
Added the ability to use a graphic image with alerts. Save the image in the GaranStuff/Alerter/Resources folder and then just enter the image file name (without path). Alternately, you can use any of the built in resource IDs.
Added a chat log which displays the chat channel, sender and message arguments for the last 1000 incomming chat messages.
Altered the way that channels are selected - you will need to redefine any previously created alerts by reselecting the channels and resaving.
Added a "Custom" channel to allow users to match agains any previously undefined channel that they find in the log. Undefined channels will show up as a number, enter that number in the Custom Channel field. Note, undefined channels will still be matched by the "Any" channel category.
Added the ability to use "captures" in the Pattern which can be reproduced in the alert Message by inserting a %number where "number" is the iteration of the capture.
note that the captures do not need to be reproduced in the order in which they were captured, that is %2 can preceed %1 in the Message.
When creating patterns, note that the incomming message may not be quite what you expect, the built in chat window processes some of the text before adding it to the chat display. For instance, "Tells" do not include the sender's name or the words "tells you," in the message, those are added by the chat window.
The Message field can contain three special fields, %C for the Channel and %S for the Sender and %M for the original Message.
Added a chat command to Start, Stop and Show the Chat Log - "/Alerter Log Start","/Alerter Log Stop","/Alerter Log Show"
Added an "Enabled" checkbox. Clear this to temporarily disable an alert without having to delete the alert definition.

Version 1.01
Added a Delete button
Added French and German translations for most of the interface, Chat channels are not yet translated
Fixed incorrect label for the Font selection list
Fixed the mouse click-though bug (reported by Eldarian on LoTROInterface).
Archive List (Old Versions)
File Name
Version
Size
Author
Date
1.07
40.33 Kb
Garan
02-19-2016 11:23 AM
1.06
38.09 Kb
Garan
02-15-2016 10:25 PM
1.05
34.49 Kb
Garan
09-25-2012 02:19 PM
1.04
32.82 Kb
Garan
03-30-2012 10:42 AM
1.03a
28.21 Kb
Garan
02-29-2012 05:17 PM
1.02
21.70 Kb
Garan
02-22-2012 01:51 AM
1.01
13.12 Kb
Garan
10-01-2011 12:30 PM
1.0
11.79 Kb
Garan
09-30-2011 10:07 PM
File Statistics
User Rating:
5 out of 5 with 12 votes
Downloads: 61979
Views: 186204
Favorites: 63
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 06-09-2021, 07:22 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Refreshing Motivating Speech

OK. Turns out there IS a good reason to use the Custom Lua code. If you refresh the skill using a client quickslot instead of the alert quickslot, the alert will sit there and continue to cover the screen instead of nicely going away. By using the Custom Lua in the trigger it will clear the alert no matter how you refresh:


So, just edit the existing alert definition (or add this when creating a new one) and it will clear whether you refresh using the quickslot in the alert or a built-in quickslot.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 06-09-2021, 10:20 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
For Cappys that are frustrated by SSG's latest move with Motivating Speech, you can set up an alert to easily help you to keep Motivating Speech up. The following screens show an alert definition that will trigger 20 seconds before Motivating Speech expires and includes a quickslot for easily reactivating the skill. You do have to fire the skill once to start the alert cycle processing - you can use LogRemind to remind you to fire the skill the first time (great for reminding you to renew things after defeat as well).

When you are first creating the definition, the "Alert" dropdown will be "New" instead of "Motivating Speech" - these screenshots were of an existing definition.
The delay of 280 will trigger the alert after 280 seconds (4 minutes 40 seconds) or 20 seconds before the prior Motivating Speech expires.





Nothing is needed on the third tab - I had previously posted a version using Custom Lua as a work around but realized the "Hide after Click" works fine in the published version of Alerter, I just broke something on my local copy

Last edited by Garan : 06-09-2021 at 10:52 AM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-18-2021, 03:25 PM  
greyhare
The Wary

Forum posts: 0
File comments: 9
Uploads: 0
Thank you for the help. I love this plugin for the things that it does as for the being detected...I will just have to pay closer attention!
greyhare is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-18-2021, 02:39 PM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Re: Stealth question

Quote:
I do not know if anyone is still using/helping with this but I have a question. How can I set up a alert for my Burglar to let me know when someone/thing is detecting my stealth? Sometimes I miss the little wisp above their heads and cannot seem to find the right trigger to set my alert.
Hi, yep, the lights are still on and somebody is still home Well, most of the time...

Alerter only works on things that have chat notifications. For instance, in the Ettenmoors when an enemy tracks you there is a message "You feel as though you are being followed." or something similar. That would tell a stealthed character that they need to unstealth, move away and reenter stealth to break the track. Similarly, if you spot a stealthed enemy, you get a chat message that says something like "You sense something moving nearby" (I forget the exact verbiage). Unfortunately, there is no chat message for being detected when you are in stealth just by someone seeing you.

Last edited by Garan : 02-18-2021 at 02:41 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-18-2021, 01:34 PM  
greyhare
The Wary

Forum posts: 0
File comments: 9
Uploads: 0
Stealth question

I do not know if anyone is still using/helping with this but I have a question. How can I set up a alert for my Burglar to let me know when someone/thing is detecting my stealth? Sometimes I miss the little wisp above their heads and cannot seem to find the right trigger to set my alert.
greyhare is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-30-2018, 06:55 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Re: Execute an external file

Quote:
Originally Posted by swendi
Hello, here's a quick question. is it possible during an event to have an "external file" executed via the custom LUA? Thanks for your help.
Sorry for the individual English. The last English lesson was a long time ago.

Greetings Swendi
Hi, your English is fine Unfortunately, there is no way to execute external files from the LotRO Lua API. We asked the devs for the ability to play sound files years ago but they never implemented it - the API hasn't changed since 2014 other than minor bug fixes.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 03-30-2018, 06:25 AM  
swendi
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Execute an external file

Hello, here's a quick question. is it possible during an event to have an "external file" executed via the custom LUA? Thanks for your help.
Sorry for the individual English. The last English lesson was a long time ago.

Greetings Swendi
swendi is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 01-25-2018, 06:25 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Re: Awesome Plugin!

Quote:
Originally Posted by elsinir
Setup a simple alert for "Fatal Poison" for Roving Threat: Scythe-jaw...
Now - if I miss the fatal-poison debug - where I only have like 10 seconds or so to drink a potion or use another poison cure - I now get a big alert message displayed in the middle of my screen.

Label: Fatal Poison
Message: Fatal Poison!
Trigger:
Channel = Combat - Enemy
Pattern = with Fatal Poison

Response: (leave default values)

That's all it took - so easy to setup - works great!
Thanks. Glad to hear you like it. FWIW, you can also add a quickslot to the response with the appropriate potion (or cure skill) so that it is even easier to apply the needed cure.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 01-24-2018, 11:33 PM  
elsinir
The Wary
 
elsinir's Avatar
Interface Author - Click to view interfaces

Forum posts: 1
File comments: 4
Uploads: 1
Thumbs up Awesome Plugin!

Setup a simple alert for "Fatal Poison" for Roving Threat: Scythe-jaw...
Now - if I miss the fatal-poison debug - where I only have like 10 seconds or so to drink a potion or use another poison cure - I now get a big alert message displayed in the middle of my screen.

Label: Fatal Poison
Message: Fatal Poison!
Trigger:
Channel = Combat - Enemy
Pattern = with Fatal Poison

Response: (leave default values)

That's all it took - so easy to setup - works great!
elsinir is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-27-2017, 08:19 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Quote:
Originally Posted by mattspencer
Thanks for the help...

The in game chat log reads "Character scored a critical hit with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Alerter Chat Log reads "Character scored a <rgb=#B22222>critical hit</rgb> with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Here is the screenshot of the Alerter Chat Log...

http://imgur.com/gallery/1vJo5

I would ideally like to have 2 or 3 different alerts, for Guardian's Bleed - 8 through 10, so I can see when 10 is almost there, and I will be using the cashout skill at tier 10 normally. If this isn't possible, and I have to show every tier that would be okay, if it will flash the alert up of what tier I am at.

Thanks again for your help with this.

P.S. I asked for some help on this in game forums and someone gave me a decent set of Message and Pattern to use here...
https://www.lotro.com/forums/showthr...ars-2-1-1-Help
Going to tweak it to 8/9/10 if possible, and add in delays or whatever to make it work without being annoying, but it is getting there.

P.P.S.

Looks like I have it working now. Here is the screenshot for Tier 10....

http://imgur.com/a/i0UMm

I changed Pattern = Guardian's Bleed - (.*.10) on (.*)
to
Pattern = Guardian's Bleed - (.*.9) on (.*)

for Tier 9, and did another alert for Tier 8.

I'll have to play with it in actual game play, but the Training dummies are feeling the pain lol.
Great to hear you worked most of it out. It looks as though the xml tag does not actually cause any problem, it is most likely the '-' character confusing the parser. You can try simplifying your patterns by stripping out the captures (the parenthesis aren't needed if you are using distinct alerts for each tier) and adding a percent sign in front of the '-' to tell the parser that it is a literal character and not part of a pattern range. For example:
Guardian's Bleed %- 10 .*
to match tier 10. Let me know if that works for you.

Putting the parenthesis around parts of the pattern allow capturing that part for use in the response. The parenthesis you had would capture the tier and the entire remainder after the 'on' but since you had separate alerts for each tier, capturing the tier was overkill. Using lua in the response, it should be possible to create a single alert that displays text for tiers 8 and 9 but a skill quickslot for tier 10 (I'd have to play around with that a bit to see if I can make it work). Meanwhile, you should be able to create three separate alerts, one for tier 8, one for 9 and one for 10 to do the same thing, just a tiny bit less efficiently.

Let me know if the percent sign works and I'll look into lua response snippets to make more efficient alerts.

EDIT: Further testing revealed a bug in the Trigger Lua functionality which prevents access to the captures (they work correctly in response snippets). Unfortunately, this bug fix won't get published for some time as there are other significant changes in the development copy that are not yet functional. So basically, you are better off creating several separate alerts, one for each tier, for the time being. I posted a more detailed solution on the SSG LotRO forum.

Last edited by Garan : 07-27-2017 at 09:31 AM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 10:42 PM  
mattspencer
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Thanks for the help...

The in game chat log reads "Character scored a critical hit with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Alerter Chat Log reads "Character scored a <rgb=#B22222>critical hit</rgb> with Guardian's Bleed - 1 on the Training-dummy for 2,834 Beleriand damage to Morale."

Here is the screenshot of the Alerter Chat Log...

http://imgur.com/gallery/1vJo5

I would ideally like to have 2 or 3 different alerts, for Guardian's Bleed - 8 through 10, so I can see when 10 is almost there, and I will be using the cashout skill at tier 10 normally. If this isn't possible, and I have to show every tier that would be okay, if it will flash the alert up of what tier I am at.

Thanks again for your help with this.

P.S. I asked for some help on this in game forums and someone gave me a decent set of Message and Pattern to use here...
https://www.lotro.com/forums/showthread.php?596108-BuffBars-2-1-1-Help
Going to tweak it to 8/9/10 if possible, and add in delays or whatever to make it work without being annoying, but it is getting there.

P.P.S.

Looks like I have it working now. Here is the screenshot for Tier 10....

http://imgur.com/a/i0UMm

I changed Pattern = Guardian's Bleed - (.*.10) on (.*)
to
Pattern = Guardian's Bleed - (.*.9) on (.*)

for Tier 9, and did another alert for Tier 8.

I'll have to play with it in actual game play, but the Training dummies are feeling the pain lol.

Last edited by mattspencer : 07-26-2017 at 11:09 PM.
mattspencer is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 08:56 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Re: Guardian Bleed alert

Quote:
Originally Posted by mattspencer
I am trying to create an alert to notify me when my Guardian Bleed tiers to 10. I currently can get the alert to work when I use the Pattern "Guardian's Bleed - " but as soon as I put a number at the end it doesn't work. Any help with this please?
This should be fairly easy as long as the number appears in the text. It seems as though the number may be imbedded in an xml tag in the text so you will want to escape the extra characters in the tag since alerter matches against the raw text. To do this you must first determine what the actual raw text sent to the client was. To do that, first load the plugin and then turn on logging in the plugin by typing "/alerter log start". Then use the skill to generate the specific text. As soon as you see the text you want to match in the chat box, type "/alerter log stop" followed by "/alerter log show". That will display the log window with the raw text you are after as one of the most recently received messages. It would probably be best at that point to post a sceen shot of the log window so that I can see the exact text your are trying to match since the patterns for some of the special character sequences can get slightly complicated unless you are familiar with Lua patterns or at least RegEx patters (Lua doesn't use RegEx but it is very similar).
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-26-2017, 02:09 AM  
mattspencer
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Guardian Bleed alert

I am trying to create an alert to notify me when my Guardian Bleed tiers to 10. I currently can get the alert to work when I use the Pattern "Guardian's Bleed - " but as soon as I put a number at the end it doesn't work. Any help with this please?
mattspencer is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-30-2016, 04:20 PM  
Matsack
The Wary

Forum posts: 0
File comments: 7
Uploads: 0
Wow.. Thank you for the answer.. Everything served on a silverplate I'll try it out tomorrow..
Matsack is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-21-2016, 08:19 AM  
Garan
The Undying
 
Garan's Avatar
Interface Author - Click to view interfaces

Forum posts: 296
File comments: 851
Uploads: 20
Re: Feature or advice to do it with existing version

Quote:
Originally Posted by Matsack
I don't know if you're doing any updates anymore to the Alerter plugin, but I'll ask anyway

You added a quickslot to the alerter plugin, would it be possible to add another option?
A lot of people uses Alerter to show messages about refreshing skills when they are off cooldown.

It would be awesome to have a decreasing cooldown bar object to insert when you fire a skill on a fellowship member.

Got the idea from viewing the BuffBars plugin where all buffs on your character shows up as decreasing colour bars with buff name and timer inside.

But maybe it's already possible to add a message that show countdown in text (10 9 8 7... etc) In a fixed position on the screen??


I have used the Alerter with a LM Stun Immunity skill. I have a area with Scrolling SI text reaching top of screen when cooldown expires. That's the way I've done it atm..

Thank you for a very usefull plugin
One of the reasons I added code support for code snippets is so that users can implement custom responses without needing the plugin to be updated.

You can create a response code snippet that creates a window with a field with a background color that changes it's width based on a time value fairly easily. The most difficult part would be determining the correct time and remembering to clean up the window. I'll look at making one and publishing it in the FAQ examples.
EDIT: You can probably do it even easier by using a response code snippet to change the text and/or width of the built-in response text object.

EDIT: Here's a simple code snippet to add a blue bar behind the alert that shrinks in width as the duration expires
Code:
self=args.self;

args.width=tonumber(args.width);
if args.width==nil then args.width=100 end
args.height=tonumber(args.height);
if args.height==nil then args.height=100 end
self.backdrop=Turbine.UI.Control()
self.backdrop:SetSize(args.width*displayWidth,args.height*displayHeight)
self.OrigWidth=args.width
self.backdrop:SetParent(self)
-- change color to whatever color you like
self.backdrop:SetBackColor(Turbine.UI.Color.Blue)

newUpdate=function(sender)
 if sender.DelayTime==0 then
  sender.backdrop:SetWidth((1-(Turbine.Engine:GetGameTime()-sender.StartTime)/(sender.EndTime-sender.StartTime))*sender.OrigWidth/100*displayWidth)
 end
end

self.Update={self.Update,newUpdate}
Just copy that to the Response code snippet field in the alert definition and save it. Use the above sample as a starting point and modify it, such as changing the color or adding a line to change the message text, or whatever - for example, the message text can be updated in the above snippet using
sender.Message:SetText("some message")
where "some message" would be a string or variable that changes with the time value (from Turbine.Engine:GetGameTime())

Note, the test for sender.DelayTime==0 is needed as the start and end times get re-evaluated after the delay expires - this is only really important if you have a non-zero delay, but it's good practice to account for it anyway. Also, you'll note that I explicitly convert the Update handler to a table and add my new handler instead of using the AddCallback function. That is because AddCallback will generate an error due to how the code snippets are dynamically evaluated and executed.

FWIW, I did stumble across a minor bug in the args.width and args.height defaults in the SetAlert method of the plugin, left over from the change from fixed display widths to percentages but it shouldn't affect any users because alerts should always have a width and height anyway. That bug won't affect this code as the defaults are correctly applied in this snippet.

This code snippet is also now on the FAQ page:
http://www.lotrointerface.com/portal.php?id=35&a=faq&faqid=40

Last edited by Garan : 08-26-2016 at 12:59 PM.
Garan is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 08:36 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui