ValvePython / csgo

🔫 Python package for interacting with CS:GO Game Coordinator
http://csgo.readthedocs.io
124 stars 17 forks source link

Doubt is this patched? #30

Closed pyhtonlovertytt closed 4 years ago

pyhtonlovertytt commented 4 years ago

could you give a small implementation because I am able to get the data of the following: cs.request_player_profile(cs.account_id, request_level=32) PlayerProfiledata = cs.wait_event('player_profile') PlayerProfiledata[0].ranking.rank_id ranks_map = {0: 'Unranked', 1: 'Silver I', 2: 'Silver II', 3: 'Silver III', 4: 'Silver IV', 5: 'Silver Elite', 6: 'Silver Elite Master', 7: 'Gold Nova I', 8: 'Gold Nova II', 9: 'Gold Nova III', 10: 'Gold Nova Master', 11: 'Master Guardian I', 12: 'Master Guardian II', 13: 'Master Guardian Elite', 14: 'Distinguished Master Guardian', 15: 'Legendary Eagle', 16: 'Legendary Eagle Master', 17: 'Supreme Master First Class', 18: 'The Global Elite'}

            levels_map = {0: 'Not Recruited', 1: 'Recruit', 2: 'Private', 3: 'Private', 4: 'Private', 5: 'Corporal',
                          6: 'Corporal',
                          7: 'Corporal', 8: 'Corporal', 9: 'Sergeant', 10: 'Sergeant', 11: 'Sergeant',
                          12: 'Sergeant',
                          13: 'Master Sergeant', 14: 'Master Sergeant', 15: 'Master Sergeant',
                          16: 'Master Sergeant',
                          17: 'Sergeant Major', 18: 'Sergeant Major', 19: 'Sergeant Major', 20: 'Sergeant Major',
                          21: 'Lieutenant',
                          22: 'Lieutenant', 23: 'Lieutenant', 24: 'Lieutenant', 25: 'Captain', 26: 'Captain',
                          27: 'Captain',
                          28: 'Captain', 29: 'Major', 30: 'Major', 31: 'Major', 32: 'Major', 33: 'Colonel',
                          34: 'Colonel',
                          35: 'Colonel', 36: 'Brigadier General', 37: 'Major General', 38: 'Lieutenant General',
                          39: 'General',
                          40: 'Global General'}
            ranks_map[PlayerProfiledata[0].ranking.rank_id]

but EXPBonusFlag.BonusBoostConsumed.value or any other flags of class EXPBonuFlag always return their bitshift values.

rossengeorgiev commented 4 years ago

It's unclear what you are asking. XPBonusFlag has all the bit values, just compare them to the account variable using a bitwise AND.

pyhtonlovertytt commented 4 years ago

It's unclear what you are asking. XPBonusFlag has all the bit values, just compare them to the account variable using a bitwise AND.

1.could you give a code example on how to achieve that as i want to use XPBonusFlag to see if my cs.account_id has reached reduce-xp gain or not. 2.cs.request_recent_user_games(cs.account_id) recent_games = cs.wait_event('recent_user_games') this only gives competitive match details of last 8 matches only. How can I get more matches details like last 100 competetive matches.Like do you have a api that can tell us details of last 100 matches like we see on personel game data tab when we view our game profile in browser. Like in this video here [https://youtu.be/AJyemS9hl50?t=51]

rossengeorgiev commented 4 years ago
xpflags = cs.socache[cs.socache.ESOType.CSOEconGameAccountClient].bonus_xp_usedflags

if (xpflags & EXPBonusFlag.OverwatchBonus):
  print("Overwitch XP bonus active")
pyhtonlovertytt commented 4 years ago

hey something changed with csgo because XPBonusFlag , reducexp is always returning true. Irrespective of csgo matches played or not.