Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difficulties with items #53

Open
D1abll0 opened this issue May 28, 2022 · 1 comment
Open

difficulties with items #53

D1abll0 opened this issue May 28, 2022 · 1 comment
Labels

Comments

@D1abll0
Copy link

D1abll0 commented May 28, 2022

Hi guys. i have a couple questions.
First. when I inspect the item's paintwear, it's an integer. Why? in game, this is a float value.
example

    inspect_params = {'param_a': 15145586192, 'param_d': 16595344889481721483, 'param_s': 76561198282463169}
    cs.send(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest, inspect_params)
    response = cs.wait_event(ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse, timeout=10)
{
  itemid: 15145586192
  defindex: 9
  paintindex: 279
  rarity: 6
  quality: 4
  **paintwear: 1049016027**
  paintseed: 492
  stickers {
    slot: 3
    sticker_id: 3171
  }
  inventory: 51
  origin: 4
}

Second. is it possible to send a list of items to the server and get a response with the data of all the items instead of doing it one by one? more or less like this:

cs.send( ECsgoGCMsg.EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest,
[ 
    'itemLink1', 
    'itemLink2', 
    'itemLinkN', 
] )
@rossengeorgiev
Copy link
Contributor

  1. Just call send multiple times, it queues the message until you yield to the event loop
  2. You have to convert it to float, as they store it as integer
>>> struct.unpack('<f', struct.pack('<I', 1049016027))[0]
0.2631138265132904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants