Page 1 of 1

GMCP Help

Posted: Thu Apr 09, 2020 1:51 pm
by Zypher
Hello, I'm working on creating an item tracker to display to a label. So far i have created two gmcp event handlers that add and items then remove that item while in room. My question is i'm trying to figure out how to code the update function that updates each room i enter. For the add and remove functions im using table.insert(mytable, value) and table.remove(mytable,value). I'm trying to figure out how to use gmcp.Char.Items with my table to update each time an event is called.

Re: GMCP Help

Posted: Thu Apr 09, 2020 6:30 pm
by demonnic
Hey there! https://github.com/demonnic/iredata/blo ... _items.lua is the code I used to handle room inventory when I was writing a script to parse gmcp data across all the major IRE games. You may find some of it helpful by way of example

Re: GMCP Help

Posted: Thu Apr 09, 2020 8:19 pm
by Zypher
Thanks Demonic, I have found your coding helpful. I'm going to use some of your style in my own. I'll try and post again here with a good outcome.

Re: GMCP Help

Posted: Thu Apr 09, 2020 10:44 pm
by demonnic
Also feel free to drop by the Discord for some more realtime assistance if you need it =)