If the return value is nil the library most probably cannot find any data of these items, whereever it reads them from (MM, TTC data?).
A hint about the itemlinks.
Instead of redundantly re-using the same itemlink, where only the itemId changes, you could use string.format as a function.
Current:
Lua Code:
var1 = "|H0:item:883:30:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h"
var2 = "|H0:item:12345:30:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h"
var3 = "|H0:item:99999:30:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h"
New:
Lua Code:
local function buildItemLinkForItemId(itemId)
return string.format("|H0:item:%d:30:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h", tonumber(itemId))
)
end
var1 = buildItemLinkForItemId(883)
var2 = buildItemLinkForItemId(12345)
var3 = buildItemLinkForItemId("99999")