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. does not connect the bot to the servers ScreenShot: https://ibb.co/nwbF1y how to fix where to get a new IP-server?
  2. Hello I can't find, is possible to buy game as gift for friend?
  3. Hello, Can I return how many hours I played in CS:GO? I want to know how many hours I have in game via script.
  4. I need add steam-api to my reacr prjct.First I'm running my project with npm start and then I launch steam-user with node steam-api.And when i import steam-user to my react prjct I receive this error https://imgur.com/4xqZZlb My files: Package.json: {"name": "steamx-app","author": "webif","description": "empty","main": "electron/main.js","version": "0.1.0","private": true,"homepage": "./","scripts": {"start": "nf start","steam-api": "node src/steam-api.js","react-start": "react-scripts start","electron-start": "node electron-wait-react","build": "react-scripts build","test": "react-scripts test --env=jsdom","eject": "react-scripts eject","electron": "electron .","ebuild": "yarn build && node_modules/.bin/build"},"build": {"productName": "steamX","appId": "com.steamx.app","extends": null,"electronVersion": "2.0.4","files": ["build/**/*","electron/*"]},"dependencies": {"electron-titlebar": "0.0.3","react": "^16.4.1","react-dom": "^16.4.1","react-router-dom": "^4.3.1","react-scripts": "1.1.4","readline": "^1.3.0","steam-user": "^3.27.1"},"devDependencies": {"electron": "^2.0.4","electron-builder": "^20.19.2","foreman": "^3.0.1"}}steam-api.js: const SteamUser = require('steam-user')var client = new SteamUser()reactjs file: import React, { Component } from 'react'import LoginForm from './LoginForm'import SteamGuardForm from './SteamGuardForm'import '../../steam-api.js' export default class Login extends Component {state = {accountName: "",password: "",steamGuardCode: ""} inputChangeHandler = (event) => {this.setState({[event.target.id]: event.target.value})} loginHandler = () => {// sessionStorage.setItem("promptSteamGuard", true)} render() {return(<div className="welcome-container"><LoginFormaccountName={this.state.accountName}password={this.state.password}inputChange={this.inputChangeHandler}tryLogin={this.loginHandler}/><SteamGuardFormsteamGuardCode={this.state.steamGuardCode}/></div>)}}
  5. I just wanted to ask if there is any way to buy a game with my steam wallet money?
  6. Hi!When I try to use any steam-user methods I'm receiving this error https://imgur.com/4xqZZlb Code: function logout() { const remote = require('electron').remote; const SteamUser = require('steam-user'); const client = new SteamUser(); localStorage.setItem("userID", ""); client.logOff(); var window = remote.getCurrentWindow(); window.close(); } func set onclick event Methods are working but only from the second clickevent on first im getting that error.
  7. This is my first project so I hope this isn't something incredibly nooby. Not familiar with node or Javascript at all. When pulling a users Rich Presence information via: let sID = STEAMIDHERE let rPresence = sClient.users[sID].rich_presence Rich Presence seems to be an object of arrays? It is structured as follows: [ { key: 'status', value: 'Playing CS:GO' }, { key: 'version', value: '13638' }, { key: 'time', value: '18.234842' }, { key: 'steam_display', value: '#display_Menu' } ] I suppose my question is how I could parse this information into a single object so I could access information like: console.log(rPresence.status); 'Playing CS:GO' Thanks in advance! Sorry in advance if I this is very trivial.
  8. How im working now with node-steam-user and i would like to know how can i find out what user need to enter authCode or twoFactorCode when he is trying to log in with my app with logOn();
  9. https://github.com/DoctorMcKay/node-steam-user#getownedapps First of all, it might be worth mentioning in the documentation that this is a synchronous function and doens't have a callback like most other functions have. Aside from that, it came to my attention that GetOwnedApps returned more apps than I own myself. Now, I have a suspicion that these extra unowned apps are in fact apps that are family shared to me. Is this true?
  10. The first time you log in to your account for some reason turns on Steam-Guard. Why is this happening and can it be avoided ?I'd like to keep my account unprotected.
  11. How can i make my bot join a tf2 community server?
  12. Is it possible to family share in this library?
  13. I've been working on TF2 trade bot over the past days and as I got close to a solution for a buy/sell command, I ran into an issue. How can I calculate the amount of metal to add to a trade offer? I had a function that found the refined, reclaimed and scrap metal in a users inventory. The same way I find the keys in the bot's inventory. I had the bot calculate the key price in metal and split it up so it new what to add. However, the bot would only add specific items to do a successful trade. Meaning that if the key price was 32.22, it would add 32 ref and 2 scrap to the trade offer. But if the user dosen't have the exact amount of refined/scrap. Example, lets say they have 31 refined, 3 reclaimed and 2 scrap, (32.22 ref in total) it would cancel (return true). This function is not in the code below since I scrapped it. So I'm looking for a way that the bot can find the users metal from their inventory with getUserInventoryContents and then add the right amount of metal to the trade offer, regardless of a specific item count. As long as the users total metal count meets the key buy price in metal. If anyone can help me or come with suggetions on what I could do, I would be thankful! Below is my buy command with the matching function: //Command for buying keys client.on('friendMessage', function(steamID, message) { //If the message meets the requirements. var buyKeysCmd; if(buyKeysCmd = message.match(/^!buy (\d+)/i)) { var keysToBuy = buyKeysCmd[1]; if(keysToBuy > 0) { buyKeys(steamID, keysToBuy); client.chatMessage(steamID, 'Processing your request.'); } else { client.chatMessage(steamID, 'You can\'t buy 0 keys.'); } } }); //Function used to buy keys with metal function buyKeys(steamID, keysToBuy) { //No specific amount of keys to buy, cancel if(!keysToBuy) { return true; } //How many keys we've in our TF2 inventory var ourKeys = []; //How much the amount of keys will cost in metal. var priceInMetal = config.trading.buyKey * keysToBuy; //Display the request. console.log('User: ' + steamID + ' has requested to buy ' + keysToBuy + ' key(s) for ' + priceInMetal + ' metal.'); //Load our TF2 inventory manager.getInventoryContents(config.bot.gameID, 2, true, function(err, inventory) { if(err) { console.log('Error getting our inventory: ' + err); client.chatMessage(steamID, 'I encountered an error getting my inventory, please try again later.'); } else { //Go trough our inventory and search for accepted keys for(var n = 0; n < inventory.length; n++) { if(ourKeys.length < keysToBuy && config.acceptedKeys.indexOf(inventory[n].market_hash_name) >= 0) { ourKeys.push(inventory[n]); } } //We don't have any keys if(ourKeys.length === 0) { client.chatMessage(steamID, 'I don\'t have any keys. Please ask an admin to re-stock or wait for me to sell some keys.'); return true; //The user has requested to buy more keys than our current stock. } else if(keysToBuy > ourKeys.length) { console.log('I don\'t have ' + keysToBuy + ' key(s).'); client.chatMessage(steamID, 'I don\'t have ' + keysToBuy + ' key(s).'); return true; } //If we've the requested amount of keys console.log('Adding ' + ourKeys.length + ' key(s) to the trade offer.'); //Load their inventory manager.getUserInventoryContents(steamID, config.bot.gameID, 2, true, function(err, inventory) { if(err) { console.log('Error getting their inventory: ' + err); client.chatMessage(steamID, "An error occurred while loading your inventory. Please again try later."); } else { //This is where the users inventory is loaded //The bot should look trough the users tf2 inventory //Find the users refined metal, reclaimed metal and scrap metal //Add it all together and log it //If the user has enough metal to purchase the requested amount of keys, continue //The bot can now add the metal to the trade offer below. var offer = manager.createOffer(steamID); //Setup the trade details. offer.addMyItems(ourKeys); //offer.addTheirItems(their metal for buying x amount of keys); offer.setMessage('You\'re buying ' + ourKeys.length + ' key(s) for ' + priceInMetal); offer.send(function(err, status) { if(err) { console.log('Error sending the trade offer: ' + err); client.chatMessage(steamID, 'Something went wrong. There was an error sending you the trade offer, please contact support if this continues.'); } else if(status == 'pending') { console.log(`Trade offer #${offer.id} is validated, but awaiting confirmation.`); client.chatMessage(steamID, 'The trade offer is validated, but awaiting confirmation.'); community.acceptConfirmationForObject(config.account.identitySecret, offer.id, function(err) { if(err) { console.log('Error confirming trade offer: ' + offer.id); client.chatMessage(steamID, 'Error confirming trade offer, declining.'); offer.decline(); } else { console.log(`Trade offer #${offer.id} confirmed.`); client.chatMessage(steamID, 'The trade offer was sent successfully. You can accept it here: http://steamcommunity.com/tradeoffer/' + offer.id); } }); } }); } }); } }); }
  14. manager.loadUserInventory(steamID,753,2,true,(err,inventory,currencies) => {}) I get "Malformed response" error everytime i try to get the steam inventory and im %100 sure im logged in. I tried same code and getting tf2 and csgo inventories there is no error and i can get inventory successfully but when i try to get steam inventory i always get "Malformed response" error Any Idea how can i fix this ?
  15. Hi, I'm trying to get a user's nickname. I know I'm supposed to use getUserDetails and then getPersonas, but what's the nickname property called?
  16. I've making my bot and I need to check item market hash name within trade offer, but in offer.itemsToGive and offer.itemsToReceive contains only following information: EconItem { appid: 730, contextid: '2', assetid: '13984115215', classid: '310777179', instanceid: '302028390', amount: 1, missing: false, est_usd: '1', id: '13984115215', fraudwarnings: [], descriptions: [], owner_descriptions: [], actions: [], owner_actions: [], market_actions: [], tags: [], tradable: false, marketable: false, commodity: false, market_tradable_restriction: 0, market_marketable_restriction: 0 } So my question is: How to get market_hash_name?
  17. Are there any typescript definitions for this, or is anybody working on it?
  18. let offer = manager.createOffer(steamID); offer.addTheirItems(itemArray); offer.setMessage("Beni kullandığınız için teşekkürler / Thanks for using me") offer.send((err,status) => { }) How can i get a message when the offer successfully accepted?
  19. Hi, My bot has been working just fine up until yesterday - When it started going offline a few minutes after launch. I checked the console, and it's not an error on my part, but it says on the console "Killed" My guess is, the connection is either Killed by Valve (maybe because I send too many requests to their API?) or someone is ddosing/attacking my bot Here's a screenshot https://gyazo.com/9a73153c59359b6befddd9ce9d3a63e8 It takes more than a minute for it to shut down. Important Notes: I'm hosting my bot on DigitalOcean, and using an SSH connection using putty.
  20. Hi! Can you explain few of friend relationship statuses in details?https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EFriendRelationship.js I can`t understand what are: "Blocked", "IgnoredFriend", "SuggestedFriend" and "Max"
  21. I've cookies array like this: [ 'sessionid=7030e64a53d6f7860bc69038', 'steamLogin=76561198447561491%7c%7c3B5AF02B12EC2F367974917BC090EB7F0E6B3B91', 'steamLoginSecure=76561198447561491%7c%7c1CC92BDD67243C7E761681E40E3B8419416AA858' ]I get an error "not logged in" when I try to log in trade offer manager through cookies using setCookies method. I take cookies a minute before using setCookies method Can someone explain why i get an error?
  22. Hi, I'd like to get the lowest price of a Background/Emoteicon on the market. I already figured out how to do that, but for some reason this will ONLY work for anything but Steam items.. Code https://pastebin.com/ujkfYLLa Also, what's the optimal frequency to use this function? Just so I don't spam it too hard.
  23. Hello, What is `version` in `json_tradeoffer` from form of tradeoffer? `node-steam-tradeoffer-manager` have set on 4 (https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/lib/classes/TradeOffer.js#L297). I checked it while sending offers on steam. If I sent item for friend, `version` is equeal 2, but If I sent offer "item for item" and "nothing for their item", `version` is equeal 3. Any ideas?
  24. Hi, I'm trying to add Full Card Sets in a trade offer. Say, the command to request card sets is !set 10, the bot will send 10 Full Card Sets. I'm not sure how to tell the bot how many Cards make a Full Set. Would I need to use an API or some sort of a database with all the existing sets? I would appreciate any help, thank you!
  25. My script is an adaptation of examples but stopped randomly once with no input. How do I stop this?
×
×
  • Create New...