Thread: Addon help
View Single Post
09-21-15, 12:48 AM   #18
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by Nimhfree View Post
In my addon Grail, I look for LOOT_CLOSED
Don't ask me why, but it never worked with LOOT_CLOSED, that's why i use LOOT_OPENED


Originally Posted by semlar View Post
Since the GUID could potentially contain any of those numbers, rather than string.find it would be better to match the ID portion of the GUID specifically.

Something like this, or instead of using "tonumber" just convert the npc IDs in your table to strings.
Lua Code:
  1. if tonumber(string.match(GUID, '%-(%d+)%-[^-]+$')) == champions[id + 1] then
Works perfectly. I usually stay far away from those patterns, in all those years, i never managed to understand them completely lol. Thanls
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 09-21-15 at 01:06 AM.
  Reply With Quote