david818 Posted February 15, 2023 Report Posted February 15, 2023 (edited) Hello. I got some problems with the discord bot maybe you guys can help me to get data from game. So basically I'll show you here how I did but for some reason when match is over in game-mode it's not sending XP trough the bot. I don't get any message at all and I'm so confused what's going on. Anyone have experience with this? nvm the way I was doing it was wrong... Edited February 22, 2023 by david818 Quote
Arty Posted February 19, 2023 Report Posted February 19, 2023 I'm not really sure what you're trying to achieve here, maybe I'm just not getting your point, but here is what I think you're doing wrong. If you want to track your XP in CS:GO, you will have to drastically change your approach. The .requestPlayersProfile method does not track a profile, it only requests it's current state, once. Also as I can see, you're tracking your account by actually logging into it, which I would advise against, since Valve does not actually support this kind of behavior. If I understood your issue correctly, then here's what I would do; 1. Create a separate bot, add your accounts to it's friends 2. Setup a script that would track status of your friends 3. (This I'm not sure actually works this way) It could be possible that friend accounts do update, if not, then just request it's data some while after a match is finished (like 1 second or something like that) I hope this was helpful. Quote
david818 Posted February 19, 2023 Author Report Posted February 19, 2023 (edited) 2 hours ago, Arty said: I'm not really sure what you're trying to achieve here, maybe I'm just not getting your point, but here is what I think you're doing wrong. If you want to track your XP in CS:GO, you will have to drastically change your approach. The .requestPlayersProfile method does not track a profile, it only requests it's current state, once. Also as I can see, you're tracking your account by actually logging into it, which I would advise against, since Valve does not actually support this kind of behavior. If I understood your issue correctly, then here's what I would do; 1. Create a separate bot, add your accounts to it's friends 2. Setup a script that would track status of your friends 3. (This I'm not sure actually works this way) It could be possible that friend accounts do update, if not, then just request it's data some while after a match is finished (like 1 second or something like that) I hope this was helpful. It's so obvious what I'm trying achieve here. Well no. You don't have to be friends to track their XP's. There is a bots like this people actually selling it so all you do you just add the steam profile and it will track it. It is actually working I just did something wrong can't find what is wrong like I get every 10 minutes it being sent through discord webhook. Match details: XP Gained This Match: NaN Current XP: undefined Total Gained XP: NaN Current Level: NaN Games Played: 1 I just get those but it is wrong. Edited February 19, 2023 by david818 Quote
Arty Posted February 19, 2023 Report Posted February 19, 2023 (edited) 52 minutes ago, david818 said: It's so obvious what I'm trying achieve here. Well no. You don't have to be friends to track their XP's. There is a bots like this people actually selling it so all you do you just add the steam profile and it will track it. It is actually working I just did something wrong can't find what is wrong like I get every 10 minutes it being sent through discord webhook. Match details: XP Gained This Match: NaN Current XP: undefined Total Gained XP: NaN Current Level: NaN Games Played: 1 I just get those but it is wrong. Well, just to set things straight in my suggestion, you DO need to have someone in friends in order to keep track of their current status, however if you're just pooling information, then yes, you don't need to. Also what I was referring to is the fact that in your draft, you're requesting a player profile of the currently logged in user, so if you were logged in and playing, it could cause issues, if that was your approach. Looking again at your code, it could well be, because based off the official documentation, there are no such fields you are utilizing present in the callback of `playersProfile` event. Please refer to https://github.com/DoctorMcKay/node-globaloffensive#requestplayersprofilesteamid-callback as `xp`, `competitiveWins` nor `gamesRemaining` are not a thing, not even by the `CMsgGCCStrike15_v2_MatchmakingGC2ClientHello` protobuf which is utilized by `CMsgGCCStrike15_v2_PlayersProfile`, that being what you actually receive. Edit: What you could possibly be looking for are the following fields: profile.player_cur_xp profile.ranking.wins For the variable gamesRemaining I wasn't able to find a substitute, since I don't even know what that could possibly be. Your bonus XP has nothing to do with how many games you played, it's a static amount of xp that you receive in chunks based off your performance in a match, possibly missing out on it if you don't play as far as I'm concerned. Edited February 19, 2023 by Arty Quote
david818 Posted February 19, 2023 Author Report Posted February 19, 2023 yeah I used some other api which they had all this things that's why I transfered to this one I just realize some of the things are not existing yeah. I think all I can do just get current XP and compare with old one. So basically it will show the old level and new one. ALso trying to get gained XP that's the most important one. Like from each match how much you gain. Quote
Recommended Posts
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.