csgo
csgo copied to clipboard
difficulties with items
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',
] )
- Just call send multiple times, it queues the message until you yield to the event loop
- You have to convert it to float, as they store it as integer
>>> struct.unpack('<f', struct.pack('<I', 1049016027))[0]
0.2631138265132904