Download
(4 Kb)
Download
Updated: 03/17/24 11:54 AM
Pictures
File Info
Compatibility:
Scions of Ithelia (9.3.0)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Lost Depths (8.1.5)
Updated:03/17/24 11:54 AM
Created:10/12/22 04:07 PM
Monthly downloads:532
Total downloads:4,025
Favorites:7
MD5:
9.3.0
Potent Nirncrux Alert - Loot Alert
Version: 2.0.2
by: notnear [More]
IMPORTANT:
Updating to v2.0 will reset settings!!

Dependencies:
LibAddonMenu

Yes, the surprise of opening your bag after hours of mindless farming thinking you got no Potent Nirncrux just to realize you actually got some is nice, but if you would want the game to jump scare you with a sound a big red message saying 'LOOTED X POTENT NIRNCRUX', well, it can!

You can also setup other custom other items and disable them anytime on the addon menu (/pna)
  • Version 2.0.2
    • Fixed custom item matching
  • Version 2.0.1
    • Code optimizations
  • Version 2.0.0
    • Removed limit of 5 custom items
    • Changed custom item colors to color picker wheel
    • Changed "SavedVariables" version (will reset previous settings!)
    • API bump U41
  • Version 1.2.2
    • Performance improvements
    • API bump U38
  • Version 1.2.1
    • Added lang files
    • API bump U37
  • Version 1.2.0
    • Fixed instances where it would give a blank alert if a custom item was set and then erased
    • API bump U36
  • Version 1.1.0
    • Now checks item ID instead of item name at the potent nirncrux section to make it compatible with other client languages as described by Baertram and code65536
    • Moved the event manager for loot received to prevent errors
    • Changed some variable names
  • Version 1.0.0
    • Initial release
Optional Files (0)


Archived Files (7)
File Name
Version
Size
Uploader
Date
2.0.1
4kB
notnear
03/16/24 01:52 AM
2.0.0
4kB
notnear
03/11/24 11:58 PM
1.2.2
4kB
notnear
04/21/23 11:34 PM
1.2.1
3kB
notnear
03/27/23 12:19 PM
1.2.0
2kB
notnear
11/01/22 10:09 PM
1.1.0
2kB
notnear
10/13/22 08:33 PM
1.0.0
2kB
10/12/22 04:07 PM


Post A Reply Comment Options
Unread 03/17/24, 11:43 AM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 56
Uploads: 10
Re: Great Addon. v2.0.1 - Broken Functions

Originally Posted by P5ych3
It would appear that there is an issue with v2.0.1. I am not getting notifications any longer, even after resetting my saved variables etc. Perhaps someone else can verify this behavior. The previous version (2.0.0) seems to function as expected. The ability to set a unique color per item defined would be nice to have. The addon could default to the standard custom item color otherwise.. I make regular use of this addon so I look forward to the next version. Thank you!

Blessings,
P5YCH3
Thank you for reporting, it was giving some false positives for half matches so I had to change the function on v2.0.1. Already found the issue and will upload the fix shortly.

About the colors, the idea is nice but I'm not sure I'll implement it, will keep it in mind tho so maybe in the future
Report comment to moderator  
Reply With Quote
Unread 03/17/24, 09:42 AM  
P5ych3
 
P5ych3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 83
Uploads: 2
Lightbulb Great Addon. v2.0.1 - Broken Functions

It would appear that there is an issue with v2.0.1. I am not getting notifications any longer, even after resetting my saved variables etc. Perhaps someone else can verify this behavior. The previous version (2.0.0) seems to function as expected. The ability to set a unique color per item defined would be nice to have. The addon could default to the standard custom item color otherwise.. I make regular use of this addon so I look forward to the next version. Thank you!

Blessings,
P5YCH3
Report comment to moderator  
Reply With Quote
Unread 08/24/23, 06:50 PM  
NeuroticPixels
Addon Addict
 
NeuroticPixels's Avatar
Premium Member

Forum posts: 210
File comments: 865
Uploads: 0
Originally Posted by notnear
Sorry for not being able to help much
No worries! I appreciate the kind and quick response.
Report comment to moderator  
Reply With Quote
Unread 08/24/23, 06:25 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 56
Uploads: 10
Originally Posted by NeuroticPixels
Any chance you'd add some functionality that Loot Alert had? It honestly was one of my favorite addons of all time for ESO, but ended up abandoned by its author.
I would love things like emotes and options for choosing alerts for a wider range of things like looted gear with the "intricate" trait or something of epic/purple quality? In other words, alerts for things
that would take forever (and possibly impossible) to add one by one to the addon settings.

Plus, I really enjoyed the emote function of Loot Alert. I could set it to only /cheer when I looted something I wanted to be alerted of, or I could have my character /cheer every time I looted anything. The latter really made me happy when I was out farming and someone would be clearly trying to steal my harvest node or treasure chest, but I got to it first, so my character ended up cheering right in their face. LOL.
Hi NeuroticPixels, my main vision for this addon was the alerts for Nirncrux and I added the custom ones for some other "valuable" loot so I don't plan on adding more "complex" features and many other types of loot, just keeping it basic. You could ask if someone would be willing to take over the mentioned addon if possible.
Sorry for not being able to help much
Report comment to moderator  
Reply With Quote
Unread 08/24/23, 04:03 PM  
NeuroticPixels
Addon Addict
 
NeuroticPixels's Avatar
Premium Member

Forum posts: 210
File comments: 865
Uploads: 0
Any chance you'd add some functionality that Loot Alert had? It honestly was one of my favorite addons of all time for ESO, but ended up abandoned by its author.
I would love things like emotes and options for choosing alerts for a wider range of things like looted gear with the "intricate" trait or something of epic/purple quality? In other words, alerts for things
that would take forever (and possibly impossible) to add one by one to the addon settings.

Plus, I really enjoyed the emote function of Loot Alert. I could set it to only /cheer when I looted something I wanted to be alerted of, or I could have my character /cheer every time I looted anything. The latter really made me happy when I was out farming and someone would be clearly trying to steal my harvest node or treasure chest, but I got to it first, so my character ended up cheering right in their face. LOL.
Report comment to moderator  
Reply With Quote
Unread 04/24/23, 06:13 AM  
ChrisK

Forum posts: 0
File comments: 176
Uploads: 0
Thanks for the awesome addon, this is really helpful - the alerts make my day.
Report comment to moderator  
Reply With Quote
Unread 03/28/23, 10:19 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 56
Uploads: 10
Re: Thank you!

Originally Posted by P5ych3
Came back to remind you that you're the man. Great addon. Always play with this loaded, always useful. +5
Thank you for using the addon and for the support!
Report comment to moderator  
Reply With Quote
Unread 03/27/23, 09:01 PM  
P5ych3
 
P5ych3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 83
Uploads: 2
Lightbulb Thank you!

Came back to remind you that you're the man. Great addon. Always play with this loaded, always useful. +5
Report comment to moderator  
Reply With Quote
Unread 10/16/22, 10:17 PM  
P5ych3
 
P5ych3's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 83
Uploads: 2
Lightbulb I Found This Useful

Originally Posted by notnear
hopefully someone will find it useful!
*Raises hand* I found this to be useful. Made my night in fact. Thanks for the addition to my addon list. Please continue to maintain this convenient tool.
Report comment to moderator  
Reply With Quote
Unread 10/14/22, 01:00 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Originally Posted by NeuroticPixels
Originally Posted by code65536
Originally Posted by Baertram
Should work as long as the perfect roe is really looted and teh event loot received fires due to that.
Perfect roe from filleting a fish is not looted and does not generate loot events.
LAME!
Maybe you can try if it will raise this callback where you can register your own callback function too:
Lua Code:
  1. SHARED_INVENTORY:RegisterCallback("SlotAdded", function(bagId, slotIndex, newSlotData, suppressItemAlert)

Just do the same with your own function, e.g.
Lua Code:
  1. local isPerfectRowItemId = {
  2.   [itemIdOfPerfectRoeHere] = true
  3. }
  4.  
  5. local function myInvSlotAddedCallback(bagId, slotIndex, newSlotData, suppressItemAlert)
  6.   --A totally new item which should be the case for non split but new looted items like the roe
  7.   if newSlotData ~= nil and newSlotData.brandNew then
  8.     local itemId = GetItemId(bagId, slotIndex)
  9.     if isPerfectRowItemId[itemId] then
  10.      --alert!!
  11.     end
  12.   end
  13. end
  14. SHARED_INVENTORY:RegisterCallback("SlotAdded", myInvSlotAddedCallback)
Last edited by Baertram : 10/14/22 at 01:00 PM.
Report comment to moderator  
Reply With Quote
Unread 10/14/22, 12:55 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
Yep, the custom names are entered with the string shown with the client language used, or it's an error 17: User

ItemId checks are better, right. You can get the itemId from an itemLink pretty easily:
If you put an item by right click context menu to chat, just mark it in the chat editbox with your mouse and copy to clipboard via CTRL+C.
Paste it somewhere in notepad e.g. (outside of the game not the addon "notepad"!) and you'll see the itemlink as string like
|H1:<data>:<data>:<data>: ...|H
Could be starting by H0 too.

The itemId is the number (5 to 6 digits) after the 3rd :
You can also use /script GetItemLinkItemId("put the itemlink copied from chat here")
And then compare the itemId to your loot function's itemId. If the loot function does not provide an itemId and just an itemLink just use GetItemLinkItemId(itemLink) there again, and if you only got bagId and slotIndex use GetItemId(bagId, slotIndex).

Build your lookup table like I've shown for the String comaprisons, just use the itemId as table key then, and it should work.

Edit:
lol and after writing this I noticed you already added that to your update

Originally Posted by notnear
Originally Posted by Baertram
You should move your EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived) inside your callback function
OnAddonLoaded after your addon was definately loaded:

Lua Code:
  1. local function OnAddonLoaded(event, name)
  2.     if name ~= addon.name then
  3.         return
  4.     end
  5.     EVENT_MANAGER:UnregisterForEvent(addon.name, EVENT_ADD_ON_LOADED)
  6.  
  7.     addon.ASV = ZO_SavedVars:NewAccountWide("NearPotentNirncruxAlert_Data", 1, nil, addon.defaults)
  8.  
  9.     addon:SetupSettings()
  10.         EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived)
  11. end
  12.  
  13. EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_ADD_ON_LOADED, OnAddonLoaded)

Else it might fire too early and raise error messages as your SavedVariables were not loaded or the addon was not ready yet.
I didn't know that could be a problem, thank you!

Originally Posted by code65536
Originally Posted by Baertram
And as your addon currently hardcodes the name
formattedName:lower() == 'potent nirncrux'
you should describe at your addon descripton that this will only work with the EN client currntly!
Or you'd have to change the language ingame via /script SetCVar("language.2", "en")
where en could also be ru, de, fr, es
to check the item names of the other languages and add them to your string comparison too!
The better approach is to just check the item ID; name checks should be avoided whenever possible.
Also didn't realise that about the name, the custom ones should be fine since the user will input according to their language, right? Unless they have a typo on the name.

Thank you both for the help and tips!
Last edited by Baertram : 10/14/22 at 12:55 PM.
Report comment to moderator  
Reply With Quote
Unread 10/13/22, 09:09 PM  
NeuroticPixels
Addon Addict
 
NeuroticPixels's Avatar
Premium Member

Forum posts: 210
File comments: 865
Uploads: 0
Originally Posted by code65536
Originally Posted by Baertram
Should work as long as the perfect roe is really looted and teh event loot received fires due to that.
Perfect roe from filleting a fish is not looted and does not generate loot events.
LAME!
Report comment to moderator  
Reply With Quote
Unread 10/13/22, 07:53 PM  
notnear
 
notnear's Avatar
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 56
Uploads: 10
Originally Posted by Baertram
You should move your EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived) inside your callback function
OnAddonLoaded after your addon was definately loaded:

Lua Code:
  1. local function OnAddonLoaded(event, name)
  2.     if name ~= addon.name then
  3.         return
  4.     end
  5.     EVENT_MANAGER:UnregisterForEvent(addon.name, EVENT_ADD_ON_LOADED)
  6.  
  7.     addon.ASV = ZO_SavedVars:NewAccountWide("NearPotentNirncruxAlert_Data", 1, nil, addon.defaults)
  8.  
  9.     addon:SetupSettings()
  10.         EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived)
  11. end
  12.  
  13. EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_ADD_ON_LOADED, OnAddonLoaded)

Else it might fire too early and raise error messages as your SavedVariables were not loaded or the addon was not ready yet.
I didn't know that could be a problem, thank you!

Originally Posted by code65536
Originally Posted by Baertram
And as your addon currently hardcodes the name
formattedName:lower() == 'potent nirncrux'
you should describe at your addon descripton that this will only work with the EN client currntly!
Or you'd have to change the language ingame via /script SetCVar("language.2", "en")
where en could also be ru, de, fr, es
to check the item names of the other languages and add them to your string comparison too!
The better approach is to just check the item ID; name checks should be avoided whenever possible.
Also didn't realise that about the name, the custom ones should be fine since the user will input according to their language, right? Unless they have a typo on the name.

Thank you both for the help and tips!
Report comment to moderator  
Reply With Quote
Unread 10/13/22, 08:56 AM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 21
File comments: 371
Uploads: 40
Originally Posted by Baertram
And as your addon currently hardcodes the name
formattedName:lower() == 'potent nirncrux'
you should describe at your addon descripton that this will only work with the EN client currntly!
Or you'd have to change the language ingame via /script SetCVar("language.2", "en")
where en could also be ru, de, fr, es
to check the item names of the other languages and add them to your string comparison too!
The better approach is to just check the item ID; name checks should be avoided whenever possible.


Originally Posted by Baertram
Should work as long as the perfect roe is really looted and teh event loot received fires due to that.
Perfect roe from filleting a fish is not looted and does not generate loot events.
Report comment to moderator  
Reply With Quote
Unread 10/13/22, 04:03 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
You should move your EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived) inside your callback function
OnAddonLoaded after your addon was definately loaded:

Lua Code:
  1. local function OnAddonLoaded(event, name)
  2.     if name ~= addon.name then
  3.         return
  4.     end
  5.     EVENT_MANAGER:UnregisterForEvent(addon.name, EVENT_ADD_ON_LOADED)
  6.  
  7.     addon.ASV = ZO_SavedVars:NewAccountWide("NearPotentNirncruxAlert_Data", 1, nil, addon.defaults)
  8.  
  9.     addon:SetupSettings()
  10.         EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_LOOT_RECEIVED, OnLootReceived)
  11. end
  12.  
  13. EVENT_MANAGER:RegisterForEvent(addon.name, EVENT_ADD_ON_LOADED, OnAddonLoaded)

Else it might fire too early and raise error messages as your SavedVariables were not loaded or the addon was not ready yet.

And as your addon currently hardcodes the name
formattedName:lower() == 'potent nirncrux'
you should describe at your addon descripton that this will only work with the EN client currntly!
Or you'd have to change the language ingame via /script SetCVar("language.2", "en")
where en could also be ru, de, fr, es
to check the item names of the other languages and add them to your string comparison too!
e.g.
build a table:

Lua Code:
  1. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2. -- Alert handler
  3. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. local potentNirnCruxLang = {
  5.   ["potent nirncrux"] = true,       --en
  6.   ["potentes nirncrux"] = true,     --de
  7. }
  8.  
  9. function OnLootReceived(eventCode,lootedBy,itemLink,quantity,itemSound,lootType,isStolen)
  10.     local colors = NEAR_PNA.utils.color
  11.  
  12.     local itemName = GetItemLinkName(itemLink)
  13.     local formattedName = LocalizeString("<<1>>", itemName)
  14.  
  15.     --[[ Debug ]]
  16.     -- d(itemLink)
  17.     -- d('itemName: ' .. itemName)
  18.     -- d('formattedName: ' .. formattedName)
  19.     -- d('formattedName lower: ' .. formattedName:lower())
  20.  
  21.     if addon.ASV.toggle then
  22.         if potentNirnCruxLang[formattedName:lower()] == true then
Thanks

Hint:
As you use addon.ASV multiple times in the same function OnLootReceived just create 1 local lookup variable for perfomance improvement:
local sv = addon.ASV

And then instead of using if addon.ASV.x == and addon.ASV.y == just use
if sv.x == or sv.y == then ...



Will this work for Perfect Roe?
Should work as long as the perfect roe is really looted and teh event loot received fires due to that.
You need to test it I guess but effectivey all items looted somehow from overland, chests, boxes in inventory, stolen, etc. should raise this event.
Last edited by Baertram : 10/13/22 at 04:09 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: