Hey guys,
I was playing with a bashing script to find targets for me, and I was playing around with this:
function bashCheck()
for i, v in ipairs(gmcp.Char.Items.List.items) do
if v.attrib=="m" then
target = v.id
end
end
end
Which works for the intial target grab, but it won't update once that target is dead. I've tried using 'ql' or even leaving/reentering the room, but it won't trigger again without some sort of server side intialised update. How can I get this to update, or initiate an update from the server?
Comments
The Char.Items.List.items message is sent for items in-room:
In response to a "char.items.room" request sent by a client
When you enter a new room
All other changes, you need to track the gmcp.Char.Items.Add, gmcp.Char.Items.Remove, and gmcp.Char.Items.Update messages yourself.