Detect what vials are in inventory using GMCP

Post Reply
Lyev
Posts: 6
Joined: Mon Feb 20, 2012 6:38 am

Detect what vials are in inventory using GMCP

Post by Lyev »

This is for Achaea. I want to be able to detect if I have a health/mana vial in my inventory using GMCP. I can sendGMCP("Char.Items.Inv") to the server to get it to respond with gmcp.Char.Items.List, and it looks like this:
Code: [show] | [select all] lua
...
9: table {
      'name': 'an oaken vial'
      'id': '336525'
    }
10: table {
      'name': 'an oaken vial'
      'id': '335946'
    }
    11: table {
      'name': 'a pinewood vial'
      'id': '356510'
    }
...
Would the best way to check the contents of each vial be to probe each one then use a trigger to check what they contain? Or should I do it in a different way?

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: Detect what vials are in inventory using GMCP

Post by Lezard »

Why don't you just get pipelist or elixirlist?

Post Reply