Skip to content

I can not get "cs.wait_event('item_data_block', 1)" #24

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

Closed
vindiesel10 opened this issue Mar 6, 2020 · 4 comments
Closed

I can not get "cs.wait_event('item_data_block', 1)" #24

vindiesel10 opened this issue Mar 6, 2020 · 4 comments
Labels

Comments

@vindiesel10
Copy link

I tried many ways to get "cs.wait_event('item_data_block', 1)" but I don't know.

My code:
client = SteamClient()
client.cli_login('', '')

cs = CSGOClient(client)
cs.launch()

cs.request_preview_data_block(s=76561198390812765, a=11899154096, d=14908795644343063777, m=0)
response = cs.wait_event('item_data_block', 1)
print(response)

Answer:
C:\Users\Vanya\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gevent\monkey.py:776: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See gevent/gevent#1016. Modules that had direct imports (NOT patched): ['urllib3.contrib.pyopenssl (C:\Users\Vanya\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\contrib\pyopenssl.py)'].
_queue_warning(

None

Help me pls.

@vindiesel10
Copy link
Author

?

@rossengeorgiev
Copy link
Member

rossengeorgiev commented Mar 21, 2020

Hi, you've set the timeout on your wait_event to only 1 second, which may not be enough. You also do not wait for the csgo ready event before making the request. For the warning see ValvePython/steam#97

@vindiesel10
Copy link
Author

Thank you, I get answer.

How can I get a skin float?

My answer:

itemid: 18130728867
defindex: 3
paintindex: 44
rarity: 4
quality: 4
paintwear: 1032788165
paintseed: 820
inventory: 3221225482
origin: 8

I see only paintwear, but it isn't float.

@rossengeorgiev
Copy link
Member

painwear is the float, just needs to be converted.

import struct
painfloat = struct.unpack('<f', struct.pack('<I', painwear))

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