I made myself a set of functions that track players in the room as well as coming and going. It works great.
Now, trying to do the same thing with items is apparently not going to be as easy.
Code: Select all
function updateitems()
my_items = {}
for k,v in pairs(gmcp.Char.Items.List) do
table.insert(my_items, gmcp.Char.Items.List[k].name)
itemshere = table.concat(my_items,"\n")
echo("here:" ..itemshere)
end
end
My registered event is gmcp.Char.Items.List - should I use something else? I added an echo to check if it was registering and it came back with an empty list.
This is what I get off the lua command when I check the items list if it helps..
Code: Select all
{
items = { {
icon = "rune",
id = "61726",
name = "a runic totem"
}, {
attrib = "t",
icon = "rune",
id = "199630",
name = "a monolith sigil"
} },
location = "room"
}