GMCP Help

Post Reply
Zypher
Posts: 5
Joined: Thu Aug 08, 2019 1:39 am
Location: Texas

GMCP Help

Post 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.

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: GMCP Help

Post 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

Zypher
Posts: 5
Joined: Thu Aug 08, 2019 1:39 am
Location: Texas

Re: GMCP Help

Post 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.

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: GMCP Help

Post by demonnic »

Also feel free to drop by the Discord for some more realtime assistance if you need it =)

Post Reply