Jump to content
McKay Development

Recommended Posts

Posted (edited)

Hello, I want to index all Items in my inventory and dump the inventory contents in a csv file with their Item-ID, Name, Float and for non unique items(like cases and stickers) their quantity. For that I need a way to retrieve information about the item with the information I get from the node-globaloffensive inventory dump. For regular skins this isn't a problem as I can just lookup the paint_index in a collection like https://github.com/ByMykel/CSGO-API. But I dont know how to index items that aren't regular skins and dont have a paint_index. I assume that the data in the attribute array contains some information that can identify the items, but I dont know how to decode it.

{
  "attribute": [
    {
      "def_index": 113,
      "value": null,
      "value_bytes": {
        "type": "Buffer",
        "data": [
          166,
          6,
          0,
          0
        ]
      }
    },
    {
      "def_index": 232,
      "value": null,
      "value_bytes": {
        "type": "Buffer",
        "data": [
          44,
          0,
          0,
          0
        ]
      }
    },
    {
      "def_index": 233,
      "value": null,
      "value_bytes": {
        "type": "Buffer",
        "data": [
          7,
          0,
          0,
          0
        ]
      }
    }
  ],
  "equipped_state": [],
  "id": "22031624191",
  "account_id": 1180673465,
  "inventory": 8,
  "def_index": 1349,
  "quantity": null,
  "level": null,
  "quality": 4,
  "flags": 8,
  "origin": 24,
  "custom_name": null,
  "custom_desc": null,
  "interior_item": null,
  "in_use": null,
  "style": null,
  "original_id": null,
  "rarity": 1,
  "position": 8,
  "stickers": [
    {
      "slot": 0,
      "sticker_id": 1702,
      "wear": null,
      "scale": null,
      "rotation": null,
      "offset_x": null,
      "offset_y": null
    }
  ]
}
Edited by Pablo
Posted

Thanks for the quick reply, the dict I use to identify the items seems to be using different def_index'. I'll try it with the items_game.txt. Is the items_game.txt file different on a per user basis or is it the same for everyone?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...