Originally Posted by Caellian
So basically, you're saying something like this would suffice ? (untested, drycoded)
|
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:
if tonumber(string.match(GUID, '%-(%d+)%-[^-]+$')) == champions[id + 1] then