Jump to content
McKay Development

Search the Community

Showing results for tags 'question'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. I do not like to individually copy links of all my replays so I was thinking if it's possible to get the links without even downloading the demo? If it's possible, are you able to show me how?
  2. Hi Mod, how can i validate the userinput is a steam store game url and get the details of the games such as name, price of the game. kindly help sir for example, input : https://store.steampowered.com/app/284790/Nightmares_from_the_Deep_2_The_Sirens_Call/ validate it and get app id and all the details of the app id and also if something which does not belong to steam store - an excecption
  3. Hey, is it possible to retrieve these values using the npm's on this forum? or will I need an API? Does any1 knows of any? thank you!
  4. So just trying to figure out if I'm dumb or if something is up. I'm updating my bot manager and since update doesn't use steam-client anymore I can't use .bind() which was working. See my attached image. Basically client is still returning my own localhost IP. Not the proxy one I'm setting.
  5. how to set proxy for this? const SteamCommunity = require('steamcommunity'); let community = new SteamCommunity(); var details = { "accountName": login, "password": pass, "twoFactorCode": 2fa } await (new Promise((resolve, reject) => { community.login(details,function(err,sessionID,cookies,steamguard,oAuthToken){ console.log(err); console.log(sessionID); console.log(cookies); console.log(steamguard); console.log(oAuthToken); resolve(); }); }));
  6. Hey, I'm trying to retrieve the items im getting in trades, but problem is I can't do that when my language is removed from my client constructor let client = new SteamUser(), manager = new TradeOfferManager({ "steam": client, "pollInterval": "10000", "cancelTime": "1800000" }), Is there a work around? I had to remove language, and adding it back isn't an option
  7. How do you get rich presence data? Through Steam Web Api? Im using GetPlayerSummaries but this endpoint didnt return rich presence data
  8. Hello, I want to join to my CS:GO server using Node JS. Is it possible to do it with a game coordinator or something ? Thanks.
  9. Apps in getproductinfo is returning null but not when I try to access from package. Is something wrong? Is it because I download the dependencies using npm?
  10. Hi. I'm migrating from v3 to v4, and trying to redeem Steam key. I added err argument as described in release notes, and now have the following code: client.redeemKey(key, (err, detail, packages) => { if (err) { console.log('Can not redeem: ' + SteamUser.EPurchaseResultDetail[detail]); return; } console.log('Redeemed!'); }); If key can not be redeemed, in v3 I get detailed reason, for example DoesNotOwnRequiredApp. But in v4 detail argument seems to be undefined. How can I access this info now, after migration to v4? Thanks
  11. Hey, so Im trying to get the market price of an item I receive on a trade. It works, but for some reason the script won't wait for my async function to finish and returns an empty result First I have this function which is triggered when I receive an offer for their items async function ProccessTradeOffer(offer){ let TheirItems = offer.itemsToReceive; const Deposited_Items = await ConvertToKeys2(TheirItems); console.log(Deposited_Items); // this will print null and won't wait for the async to finish } This is the other function im calling async function ConvertToKeys2(Items){ let ValueInKeys = []; // array of objects containing info about the items return new Promise(resolve => { setTimeout(() => { if(Market_Value > -1){ obj = { name: item_name, value: Market_Value } ValueInKeys.push(obj); } }, 2000); }); } } return ValueInKeys; } The problem is that in the main async function it'll not wait for my ConvertToKeys2 function to calculate & add it to array and simply print an empty array. It's an async function so I don't understand why thisis happening.. Thx for your help
  12. I wrote an application that idles all of my games to x amount of minutes. My problem is that after logging in and passing some appIds to gamesPlayed, I am being prompted to enter my Steam Guard code after a while. I have had it run fine for over 30 minutes sometimes before being asked, but it's usually within 5-10 minutes. I'm listening to both sessionExpired and error, but it doesn't seem to be either of them. The goal is to log on just once and have it idle games until the application is closed. I call webLogOn every 15 minutes, but that doesn't seem to be the problem, as I'm usually prompted before that. I've also tried assigning the loginKey to my log in options after first logging in, which supposedly omits the need for a guard code, but that doesn't work either. Why is this happening? Any help would be greatly appreciated. Code: global._mckay_statistics_opt_out = true; const SteamClient = require('steam-user'); const SteamCommunity = require('steamcommunity'); const community = new SteamCommunity(); const client = new SteamClient(); let apiKey = (''); const minutesToIdle = 180; let gamesToIdle = []; let gamesTimePlayed = []; let appNames; let steamID; const logInOptions = { accountName: '', password: '', logonID: Date.now(), rememberPassword: true }; // Initialize (function () { console.log('Loading game names...') community.request('some api', (error, response, data) => { if (!error && response.statusCode == 200) { appNames = JSON.parse(data).data; client.logOn(logInOptions); } else { console.log('Failed to get game names, listing AppIDs instead.') setTimeout(function() { client.logOn(logInOptions); }, 4000); } }) })() client.on("webSession", (sessionID, cookies) => { console.clear(); console.log("Got web session"); community.setCookies(cookies); getGamesInfo(); }); // Get owned games and time information. function getGamesInfo () { gamesToIdle.length = 0; gamesTimePlayed.length = 0; console.log('\x1b[36m%s\x1b[0m', 'Idle all Steam games'); community.request('https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=' + apiKey + '&steamid=' + steamID, (error, response, data) => { if (!error && response.statusCode == 200) { const gamesData = JSON.parse(data); const gamesTotal = gamesData.response.game_count; console.log('\x1b[32m%s\x1b[0m', '\nAmount of games: ' + gamesTotal); // Check playtime for past 2 weeks and forever. for (var i = 0; i < gamesTotal; i++) { if (gamesData.response.games[i].playtime_forever < minutesToIdle) { if (gamesData.response.games[i].playtime_2weeks == null || gamesData.response.games[i].playtime_2weeks < minutesToIdle) { gamesToIdle.push(gamesData.response.games[i].appid); gamesTimePlayed.push(getMostTime(gamesData.response.games[i].playtime_forever, gamesData.response.games[i].playtime_2weeks)); } } } if (gamesToIdle.length > 1 ) { console.log('\x1b[32m%s\x1b[0m', 'Games left to idle: ' + gamesToIdle.length); assignAppNames(); } else { console.log('Done idling.') } } else { console.log('Error loading games, retrying in 1 minute...'); setTimeout(function() { client.webLogOn(); }, 600000); } }) } // Returns most time played between last 2 weeks and forever. function getMostTime (a, { if (a > { return a; } else { return b; } } // Assigns app names to display, or appIDs if none found. function assignAppNames () { let gameNames = []; for (var i = 0; i < 29 && i < gamesToIdle.length; i++) { if (appNames != null && appNames.hasOwnProperty(gamesToIdle[i])) { gameNames.push(appNames[gamesToIdle[i]]); } else { gameNames.push(gamesToIdle[i]); } } idleGames(gameNames); } // Idle the games. function idleGames (gameNames) { let idleNow = []; for (var i = 0; i < 29 && idleNow.length < gamesToIdle.length; i++) { idleNow.push(gamesToIdle[i]); } client.gamesPlayed(idleNow); console.log('\x1b[32m%s\x1b[0m', 'Now idling: ' + idleNow.length + '\n') gameNames.forEach(function(element) { console.log(element + '\x1b[33m%s\x1b[0m', ' [' + (gamesTimePlayed[gameNames.indexOf(element)] / 60).toFixed(2) + ']'); }) console.log('\n' + 'Last update: ' + '\x1b[33m%s\x1b[0m', getDateTime()); setTimeout(function() { client.webLogOn(); }, 900000); } community.on("sessionExpired", error => { console.log("Steam web session expired: " + error.message); if (client.steamID) { client.webLogOn(); } else { client.logInOptions.logonID = Date.now(); client.logOn(logInOptions); } }); client.on("error", error => { console.log("An error has occurred: " + error.message); } ); client.on('loggedOn', (details) => { console.log('Logged on Steam.'); client.setPersona(SteamClient.EPersonaState.Invisible); steamID = details.client_supplied_steamid; }); function getDateTime() { var date = new Date(); var hour = date.getHours(); hour = (hour < 10 ? "0" : "") + hour; var min = date.getMinutes(); min = (min < 10 ? "0" : "") + min; var sec = date.getSeconds(); sec = (sec < 10 ? "0" : "") + sec; var year = date.getFullYear(); var month = date.getMonth() + 1; month = (month < 10 ? "0" : "") + month; var day = date.getDate(); day = (day < 10 ? "0" : "") + day; return hour + ":" + min + ":" + sec; }
  13. Hello My bot is fetching prices for all its Items in Steam Inventory, which is very small at the moment. Is there any recommendation on how many queries (per second) can it do to get all prices?
  14. Hello, i have a question do anyone have idea how to make a diffrent texts after trade is accepted by person who write command i have in mind something line when buyer use !buytf > get offer > accept it > get a message with other bot who sell tf keys etc if he use !buycs he get message with bot who sell csgo keys and thats my question idk who to make it in 100% i know i can make 1 message if (TradeOfferManager.ETradeOfferState[OFFER.state] == 3) { client.chatMessage(OFFER.partner, " Thanks for trading with me!") }
  15. Hello With new steam chat we get a trade notification chat message together with any incoming offer from a friend: https://i.imgur.com/PV4TgEu.jpg My problem is that when I'm using this code: //Chat Messages Check //This will fire when we receive a chat message from ANY friend client.on('friendMessage', function(steamID, message) { client.getPersonas([steamID], function (personas) { console.log('Friend message from ' + personas[steamID]["player_name"] + ': ' + message); }); }); Bot's notifications aren't cleared (there is one for every trade offer); so my question is, there's a way to keep that code and clear trade notifications altogether (maybe something which fires after a trade is received)? Thanks
  16. You know, I've been trying to find out whether or not this is allowed and every time I ask Valve they refuse to answer. They deliberately say they can not answer. There was someone who tried to explain how to use this script to change your name yellow, but I didn't quite understand really. I'm not a coder really and all I was looking for is a way to change my name yellow in a simple safe way. I don't even know what this tool of yours does or how to run it even. But I am hoping you might be able to shed some light on whether or not Steam till ban people for using it to make their names yellow/gold. If it is allowed, is there a simple thing I can just run once to set my state? I have no idea what this thing is or does. Just an average user looking to set their name to gold using the "PersonaStateFlags" #4.
  17. Hi, i have 2 servers and have problem with http and my bot didn't working. So which hosting better for bot and mb have tutorial for setup guide server?
  18. Hey, so I'm trying to get user's personaName in a sent trade offer. I'm pretty sure I'm doing this right, but I can't figure out what's causing the error.. manager.on("sentOfferChanged", (OFFER, OLDSTATE) => { OFFER.getUserDetails((err, me, them) => { theirname = them.personaName; console.log(theirname); }); });
  19. Hello fellas ... I'm trying to add a kind of "counter" to trades sent by my LevelUp BOT. I'm fairly lazy about programming, I do things on the basis of trial and error. The results, of course, are not always satisfactory. with the screenshots it will be easy to understand what I want. I tried use +conf.creator https://prnt.sc/mf6xbj but I realized trade offer not YET created and therefore, I would not get the result I want then I tried use: +offer.id https://prnt.sc/mf74ef and the result was null I don't want the result to necessarily be the token of the trade offer. I want there to have an accountant that changes according to the exchange offers that my bot sends.
  20. How do I get the names of all available games on steam displaying on the website? Here's my code. It just displays a blank page for like 5 seconds and displays an "Already logged on, cannot log on again" error. How do I properly display it? client.on("appOwnershipCached", () => { let gameArr = client.getOwnedApps(); client.getProductInfo( gameArr, [], (err, apps, packages, unknownApps, unknownPackages) => { for (var appid in apps) { res.send(apps[appid].appinfo.common.name); } } ); });
  21. Say I want to create an offer but need to add just Trading Cards to it, how do I select them? I already know about appid, contextid and "item_class_2" but I need a working example after I loaded my Inventory, which has 4 [Object] inside "tags": CEconItem { appid: 753, contextid: '6', assetid: '10305554518', classid: '1496965455', instanceid: '0', amount: 1, pos: 30, id: '10305554518', background_color: '', icon_url: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', icon_url_large: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', descriptions: [ [Object] ], tradable: true, owner_actions: [ [Object], [Object] ], name: 'Santa Claus', type: 'Solitaire Christmas. Match 2 Cards Trading Card', market_name: 'Santa Claus', market_hash_name: '428510-Santa Claus', market_fee_app: 428510, commodity: true, market_tradable_restriction: 7, market_marketable_restriction: 7, marketable: true, tags: [ [Object], [Object], [Object], [Object] ], is_currency: false, fraudwarnings: [] }, CEconItem {
  22. I write the code so when the bot log on the account it gives me the info of the inventory ( I think i did that xd) manager.loadInventory(753, 3, true, (err, inventory) => {console.log(inventory);}) When i open the bot the console says loged onundefined Help ?
×
×
  • Create New...