
DevDuck
-
Posts
28 -
Joined
-
Last visited
Posts posted by DevDuck
-
-
Hi,
I want to know if an API/github repo/anything provides a list of all items available for a game.
Example: all CSGO items with their weapon, type, rarity, icon url, etc..
I would like the complete list to be able to query it.
Eg: Find all covert. Find all mil-spec AK47. Find all Rifle covert, etc.
For dota2 it's doable with the API method "GetSchemaURL" and then following the link provided : https://steamcdn-a.akamaihd.net/apps/570/scripts/items/items_game.802aed5ea680938e2c54fd4964713f9b07e48e4b.txt
The same file for CSGO is pretty messy and don't contain items name.
Any suggestions?
Thanks
The items_game file from Dota2 does not provided icon_url, how do you get the image of each Dota2 item?
-
Steam is so weird. Well, thank you
-
Can I get the data from the game files? I found a list of all possible items, but can't figure out how to know the skin name and a link to his picture?
Or is it all a bad idea and I need to parse thousands of inventories of different users?
-
How to distinguish one item from another? For example ★ Gut Knife | Doppler have different phase. Use market_hash_name + icon_url for the uniqueness of an item or something else?
-
Is it possible to get a list of all CS:GO or PUBG items?
-
Socks proxies are currently not supported. You'll need to use an HTTP proxy. I don't believe I've pushed support for HTTPS proxies (HTTP is just as secure for this case).
Example:
const Steam = require('steam-client'); const SteamUser = require('steam-user'); let client = new Steam.CMClient(); let user = new SteamUser(client); client.setHttpProxy("http://user:[email protected]:12345"); user.logOn(/* options go here */);
What about IPv6 proxies?
-
I'm trying to get schema.
First I go to: https://api.steampowered.com/IEconItems_730/GetSchemaURL/v2/?key=API_KEY&format=json
I come next to the link (items_game_url) and get 404 error.
Before this link was returning a schema, now 404 error. Have any ideas? Is it possible than it is to replace?
I know what I can take this file from the folder game CS:GO, but it's impossible to automate.
-
Does it appear as online/in-game on its direct profile?
Can you help?
-
-
You probably never called setPersona on the node-steam-user to set it online.
No, I use setPersona the event loggedOn:
this.client.on('loggedOn', () => { this.client.setPersona(SteamUser.Steam.EPersonaState.Online); this.client.gamesPlayed([730]); });
I told you that immediately after login everything is perfect. But after an hour or two, the bot disappears from the network (in the group), but it network to ellisite in his personal profile.
Or setPesona need to use is some loop? Like that:
this.manager.on('pollSuccess', () => { this.client.setPersona(SteamUser.Steam.EPersonaState.Online); this.client.gamesPlayed([730]); });
How do you maintain state?
Update:
I did setPersona in loop:
setInterval(() => { this.client.setPersona(SteamUser.Steam.EPersonaState.Online); this.client.gamesPlayed([730]); }, 3600000);
in the end, it didn't help...
I think maybe I break the session? Please help me
-
Interesting...
I ran this code in parallel with working the bot:
const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const community = new SteamCommunity(); community.login(getLogOnOptions(), (err) => { if (!err) community.chatLogon(); });
My bot was offline in the group. After running this code to enter in the chat, bot is online!
Why is this happening? Maybe I need to periodically log in to the chat to keep the bot as online in the GROUP? Or why?
-
If I check my bot he is online and in game... but If I enter the group, there shows no one online. If I restart the bot in the console or pass authorization on Steam via the username and password then the bot back online (in the group) in a short time.
-
Thank you. I found the cause. I create an instance of the class:
this.csgo = new GlobalOffensive(this.client); this.manager = new TradeOfferManager({ 'steam' : this.client, 'community' : this.community, 'domain' : 'localhost', 'language' : 'en' });
1. In general, in the process, variables this.client and this.community class instance has already been created, there this variable is not changed. What's the right way? To change this property or to re-create the object dynamically?
...So, because of this my bot tries to relogin too often and invoked "Steam Guard App Code"...
2. And I noticed that the event "disconnected" is not always invoked for some reason
3. Hmm... In the opskins group all bots are online and in game... Why my bot is online and in game but in group I have this:
My bot:
And in the group:
if I restart my bot he gets online for a while and then again offline.
Interestingly if I go from the account of the bot and will go to the link https://steamcommunity.com/chat the group will have:
1 IN-GAME and 1 ONLINE ... like some session is updated.. I don't know..
Why is this happening?
-
This is my code:
manager.on('pollSuccess', () => { if (!client.steamID) { client.logOn(getLogOnOptions()); } });
But today some bots did not restart. In the logs I found the following:
Steam Guard App Code
Is it possible to catch this event? Or how to avoid errors when restart?
-
Okey. Thank you.
-
It won't automatically relogin if you explicitly log off.
I know. Please tell me, if client.steamID is null (https://github.com/DoctorMcKay/node-steam-user/blob/master/README.md#steamid) what I need to do? client.relog() or client.logOn?
-
After today's maintenance, my bot stopped to be online. I can't restore my bot. I tried to reproduce the disconnection with Steam.
I determine that my bot is offline
manager.on('pollSuccess', () => { if (!client.steamID || !csgo.haveGCSession) { // My bot is offline. Maybe there's another way? } });
If I do
client.logOff()
then I try to relog
client.relog()
I'am getting nothing.
Ok. I changed my code to:
if (client.steamID) { client.relog(); } else { client.logOn(getLogOnOptions()); }
But after client.logOff(), client.steamID - is set and relog is not working.
Why after client.logOff() my condition is not working? Maybe I need something to add to the condition?
Update
And after client.logOff() invoked event disconnected but autoRelogin not invoked.
-
Pass the community instance in to the constructor of TradeOfferManager, as per the docs.
Thank you! And one more question: this event (sessionExpired) will be emitted when be done some error? Or this event is the interval?
-
Do this instead:
community.setCookies(["steamLogin=1||invalid", "steamLoginSecure=1||invalid"]);
Thanks!
-
A pretty easy way to invalidate your session:
community.setCookies(["steamLogin=invalid", "steamLoginSecure=invalid"]);
Then I set it, I get this error:
/node_modules/steamcommunity/index.js:241 self.steamID = new SteamID(cookie.match(/=(\d+)/)[1]); ^ TypeError: Cannot read property '1' of null at /node_modules/steamcommunity/index.js:241:53 at Array.forEach (native) at SteamCommunity.setCookies (/node_modules/steamcommunity/index.js:238:10) at manager.setCookies (/index.js:120:28) at checkDone (/node_modules/steam-tradeoffer-manager/lib/index.js:98:4) at _community.getWebApiKey (/node_modules/steam-tradeoffer-manager/lib/index.js:149:3) at SteamCommunity.<anonymous> (/node_modules/steamcommunity/components/webapi.js:21:4) at Request._callback (/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/node_modules/request/request.js:1091:12) at Gunzip.g (events.js:291:16)
What am I doing wrong?
-
this.community.on('sessionExpired', (err) => { console.log('sessionExpired. ', + err); this.client.webLogOn(); });
But in the logs I don't see errors (sessionExpired. + err)... based on this the event is not triggered.
Update.
I tried this:
setTimeout(() => { this.community.setCookies(['steamLogin=invalid', 'steamLoginSecure=invalid']); }, 30000);
but the event sessionExpired anyway is not triggered
-
Yes,
client.webLogOn
is the correct way to do it. I suspect that you're getting a new web session successfully (add some logging to thewebSession
event to make sure), and you're just doing something else wrong.sessionExpired event is not a module node-steamcommunity?
client.on('sessionExpired') or community.on('sessionExpired')?
I have similar code:
community.on('sessionExpired', (err) => { });
But I get a error after a couple days of work of the bot:
Error: Not Logged In
But the event community.on('sessionExpired') is not triggered. Maybe need to catch event client.on('sessionExpired')?
-
Will there be any updates of node-steam-tradeoffer-manager?
Or should use node-globaloffensive?
-
That's all:
"WebApiErrorMessage": "Method permanently disabled, see https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Economy_Items"
Now the only way to get wear through the client, I think. Is that so?
It turns out that every bot should have bought the game CS:GO?
Can I get sticker image url?
in General
Posted
Via https://github.com/DoctorMcKay/node-globaloffensive I can get stickerId which is on the weapon. Through the game files I can get a description of this sticker. But is there any way to get an image url of this sticker? I thought maybe could somehow get a link to an image through "sticker_material"?