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. How can i get Account id in uint32?
  2. Hi, Thanks for making your node modules open source Doctor Mckay. I'm interested in making a tf2 trade bot. I searched the internet and your api was the only one which allowed the bot to trade ingame. I'm interested in making a bot like this but in python. I looked through the source of tf2 module and I'm having a hard time understanding what some things do. I don't have much experience in javascript or programming bots in general. Could you explain what the Game Controller is and what the protobuf things are doing. I searched online about the TF2 game controller and I didn't find any documentation. Could you link me to some sources to learn more about the game controller and how to control a bot that is ingame? Thanks, Benscar1
  3. I get this error every so often, I don't know where it's coming from so I don't know how to log in once it happens. This isn't part of the sessionExpired event, as I have this in my code: community.on("sessionExpired", function(err) { console.log("## Session Expired, relogging."); client.logOn(logOnOptions); }); help?
  4. Sup guys. I've been getting this error every once in a while when trying to confirm a trade: ``` 14|trade | Error: Could not act on confirmation 14|trade | at /root/tradingbot/node_modules/steamcommunity/components/confirmations.js:145:12 14|trade | at SteamCommunity.<anonymous> (/root/tradingbot/node_modules/steamcommunity/components/confirmations.js:276:3) 14|trade | at Request._callback (/root/tradingbot/node_modules/steamcommunity/components/http.js:67:15) 14|trade | at Request.self.callback (/root/tradingbot/node_modules/request/request.js:186:22) 14|trade | at emitTwo (events.js:125:13) 14|trade | at Request.emit (events.js:213:7) 14|trade | at Request.<anonymous> (/root/tradingbot/node_modules/request/request.js:1163:10) 14|trade | at emitOne (events.js:115:13) 14|trade | at Request.emit (events.js:210:7) 14|trade | at IncomingMessage.<anonymous> (/root/tradingbot/node_modules/request/request.js:1085:12) ``` Here is my code (it's monstrously horrendous. Ive cut too many corners to neaten it): ```js acceptOffer(offer) { return new Promise((resolve, reject) => { offer.accept((err, status) => { if (err) { if (err.message == 'Not Logged In') { this.once('managerCookies', () => { this.acceptOffer(offer) }) return } return reject(err) } this.manager.once('receivedOfferChanged', (offer, oldState) => { if (offer.state == 3) { this.pushBullet.note('Trade Offer Accepted:', `Giving: \n${offer.itemsToGive.map(item => item.market_hash_name).join('\n')} \nReceiving: \n${offer.itemsToReceive.map(item => item.market_hash_name).join('\n')}`) offer.getReceivedItems((err, items) => { this.emit('debug', 'Accepted trade offer') this.emit('debug', 'Updating inventory cache') this.backpack.loadBptfInventory() .then(() => { this.emit('debug', 'Loaded BPTF inventory') for (let item of items) { if (this.prices[item.market_hash_name]) { if (!this.prices[item.market_hash_name].isCurrency) { this.emit('debug', 'Attempting to list the item') this.backpack.createSellListing(item.id, this.backpack.scrapToRef(this.prices[item.market_hash_name].sell)) .then(res => { if (res.listings[item.id].created == 1) { this.emit('debug', 'Created Listing') } else { this.emit('debug', 'Error creating listing') } }) .catch(err => { this.emit('debug', err) }) } } } }) .catch(err => { this.emit('debug', 'Error loading my bptf Inventory...') this.emit('debug', err) }) //should do error handling here. }) return resolve(true) } }) this.community.acceptConfirmationForObject(this.logOnOptions.identitySecret, offer.id, err => { if (err) { return reject(err) } }) }) }) } ```
  5. Hi, is it possible to convert background/emotes into gems with a bot? Basically, I want the bot to scan it's inventory once a trade is completed, find Backgrounds/Emotes worth 20+ Gems and turn them into Gems. Is it possible to do?
  6. Hey, I've created a bot and when I write to him !sell [item], he displays me how much i need to pay and creates a offer - with the item and his payment. The problem is it sometimes sends me the payment and I shouldn't give him anything. I've checked it with itemsToGive ItemsToRecieve and it didn't work. Then I saw the isGlitched() method but everytime the bot sends a trade, it shows that it's glitched although sometimes it isn't..
  7. How to create script for auto remove friend after week :/ Thanks
  8. I need help with receivedOfferChanged. It don't receive offer.id and status. Below is my code and output from console. var botsManager = new BotManager(); botsManager.on('receivedOfferChanged', function(offer, oldState) { console.log('--> STATUS ' + offer.id + ':' + offer.tradeID + ': (OLD:' + oldState + ') TO (NEW:' + offer.state + ')'); }); Output: --> STATUS undefined:undefined: (OLD:[object Object]) TO (NEW:undefined)
  9. So, I don't know if this is the right section for this thread, but it is tied to steamcommunity... Basically, I'm not using node-steamcommunity because I almost completely developed my app (a Chrome extension) before discovering that it existed. Also I didn't use Node.js... I'm here to ask you if you know of any way to check if a user's session has expired without calling, for example, the user's profile page and checking if you get redirected to the login page. This is how I'm doing it right now but Google doesn't like it because it thinks I'm loading scripts from an external resource (since the call returns HTML). All the steamcommunity.com endpoints I found just return error 400 if the session has expired, which isn't reliable enough. I beg for your help >_> thank you. edit: Welp, Google accepted my code... I don't need this anymore...
  10. Hello, I want to log into a OpenID using steam-user. I was able to log into steam but I am stuck at the "Sign into xxxxxxxxx.com using your Steam account - Note that xxxxxxxxx.com is not affiliated with Steam or Valve". Basically how do I "click" the Sign-In button ( https://i.imgur.com/t63Gzo4.png ). I tried using developer tools in chrome to replicate the POST request being sent but the end response is always "{ success: false }".
  11. Installed packages. +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] bot: new SteamUser(), community: new SteamCommunity(), offers: new TradeOfferManager(), function trade(botid, senderid, trd) { bots[botid].offers.getInventoryContents(753, 6, true, function(err, inventory) { if (err) { logger.error(err); return; } if (inventory.length == 0) { logger.warn("Steam inventory is empty"); return; } logger.info("Found " + inventory.length + " Steam items"); var trode = bots[botid].offers.createOffer(new TradeOfferManager.SteamID('' + senderid + ''), '' + trd + ''); trode.addMyItems(inventory); trode.setMessage("items"); trode.send(function(err, status) { if (err) { logger.error(err); return; } if (status == 'pending') { logger.info('Offer sent, but requires confirmation'); bots[botid].community.acceptConfirmationForObject(bots[botid].identity_secret, trode.id, function(err) { if (err) { logger.error(err); } else { logger.info('Offer confirmed'); } }); } }); }); } When I do not specify a token, I get an error. Sorry for my bad english and ty for helping.
  12. Good afternoon, I need my account # 1 to load inventory and send it to my account # 2. Is it possible to implement this? Tell me please. Now I'm doing authorization, it seems to work. var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); var request = require('request'); var async = require('async'); var client = new SteamUser({ "dataDirectory": null // Kasutame oma sentry-t. }); var manager = new TradeOfferManager({ "steam": client, "domain": "skins.ee", "language": "en" }); var community = new SteamCommunity(); var steamID = SteamCommunity.SteamID; if(fs.existsSync('./users/users.json') && fs.existsSync('./users/master_ssfn')) { var users = JSON.parse(fs.readFileSync('./users/users.json')); var sentry = fs.readFileSync('./users/master_ssfn'); } else { console.log("Users file or master ssfn missing. Exiting.."); process.exit(1); } var user = users.thor1; var user2 = users.thor; var logOnOptions = { "accountName": user.accountName, "password": user.password, "twoFactorCode": SteamTotp.getAuthCode(user.twoFactorCode) }; var logOnOptions = { "accountName": user2.accountName, "password": user2.password, "twoFactorCode": SteamTotp.getAuthCode(user2.twoFactorCode) }; if(fs.existsSync('./polls/' + user.accountName + '.json')) { manager.pollData = JSON.parse(fs.readFileSync('./polls/' + user.accountName + '.json')); } if(fs.existsSync('./polls/' + user2.accountName + '.json')) { manager.pollData = JSON.parse(fs.readFileSync('./polls/' + user2.accountName + '.json')); } client.setSentry(sentry); client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam account " + user.accountName); }); client.on('loggedOn', function() { console.log("Logged into Steam account " + user2.accountName); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey + " for user " + user.accountName); }); community.setCookies(cookies); community.startConfirmationChecker(30000, user.identitySecret); // Checks and accepts confirmations every 30 seconds client.setPersona(SteamUser.Steam.EPersonaState.Online, user.personaName); sessionInterval(3600000); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey + " for user " + user2.accountName); }); community.setCookies(cookies); community.startConfirmationChecker(30000, user2.identitySecret); // Checks and accepts confirmations every 30 seconds client.setPersona(SteamUser.Steam.EPersonaState.Online, user2.personaName); sessionInterval(3600000); }); manager.on('newOffer', function(offer) { var steamID64 = offer.partner.getSteamID64(); console.log('Received new offer from ' + steamID64); if(steamID64 == "76561198099243226","7656119826044197","76561198376145647","76561198828998292","76561198828975623","76561198824853703","76561198824809848","76561198824795016") { offer.accept(); } else { offer.decline(); } }); manager.on('pollData', function(pollData) { fs.writeFile('./polls/' + user.accountName + '.json', JSON.stringify(pollData)); }); function sessionInterval(time) { setTimeout(function() { console.log('Getting new cookies.'); client.webLogOn(); }, time); } /** * Express API to access SteamBot features and functions */ var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.get('/', function(req, res) { res.send('"Иди в дом, там мама тебе нальёт томатного." - Энди Картрайт'); }); app.listen(1337, function () { console.log('Express API listening on port 1337'); });
  13. Hello. Maybe someone has encountered such a problem.Here is my code: const SteamCommunity = require('steamcommunity') const SteamTotp = require('steam-totp') const request = require('request') var myProxy = request.defaults({'proxy': 'http://104.***.***.*3:3128' }); const client = new SteamCommunity({ "localAddress": myProxy, "request": myProxy, }); client.login( loginOptions, function(err, sessionID, cookies, steamguard) { if (err) console.log('ERROR', err) }); How can i solve this?
  14. I was trying to send a steam offer using a different language and I ported your code "http://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/lib/classes/TradeOffer.js#L317" while sending my trade offer I receive error 401 and noticed that you intercept such error code and print that your are not logged in if such error occurs, I'd like to ask what is the cause of this error, and how to avoid it (what cookies are necessary, in my code I loaded all the cookies a person can obtain from logging to "http://steamcommunity.com" )
  15. Hey, How can i make/change a steam community market buyorder on an item with commodity? I cant find a solution for this problem in node-steam libraries. And node-steamcommunity class CMarketItem is hardly out of date. Maybe iam wrong in my searchings. Pls help
  16. var Steam = require('steam'); var SteamUser = require('steam-user'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamTotp = require('steam-totp'); var Steamcommunity = require('steamcommunity'); var SteamWebLogOn = require('steam-weblogon'); var fs = require('fs') var util = require('util'); var UInt64 = require('cuint').UINT64; var client = new SteamUser(); var steamClient = new Steam.SteamClient(); var steamUser = new Steam.SteamUser(steamClient); var steamFriends = new Steam.SteamFriends(steamClient); var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser); var community = new Steamcommunity(); var manager = new TradeOfferManager({ "steam": client, "domain": "steamcommunity/id/KatayDesign", "language": "en" }); var config = require('./config'); var code = SteamTotp.generateAuthCode(config.bot.shared_secret); var logOnOptions = { account_name: config.bot.username, password: config.bot.password, two_factor_code: code } function log(message) { console.log(new Date().toString() + ' - ' + message); } function steamIdObjectToSteamId64(steamIdObject) { return new UInt64(steamIdObject.accountid, (steamIdObject.universe << 24) | (steamIdObject.type << 20) | (steamIdObject.instance)).toString(); } function Login(logOnOptions) { steamClient.connect(); steamClient.on('connected', function() { console.log('Connected...'); steamUser.logOn(logOnOptions); }); i got an error after "" console.log('Connected...'); "" its working with shared_secret but giving error without shared_secret
  17. After a somewhat long hiatus from programming bots I decided to come back to it and found that SteamCommunity no longer has a "newConfirmation" event. Can somebody please give an example of how catching and dealing with confirmations is done now? Thanks
  18. Hi, I want to get item trade lock date, to show to my users how many days that item has trade-lock. Any suggestions?
  19. Is it possible to parse the steamguard auth code in a variable?
  20. community.httpRequestPost({ "uri": "https://steamcommunity.com/profiles/" + client.steamID.getSteamID64() + "/ajaxsetshowcaseconfig", "form": { "appid": 730, "item_contextid": 2, "item_assetid": 11692952310, "customization_type": 4, "slot": 0, "sessionid": sessionID }, "json": true }, (err, response, body) => { console.log("err:", err); console.log("body:", body); }, "steamcommunity"); I'm trying to play a little with the profile showcases, the idea is to make a change in the item that are showed in a desired slot, but for some reason it doesn't work, all the data passed in the POST are definetely right, you guys have an idea on how to make it work?
  21. Hello this is my code client.logOn({ accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret) }); and im %100 sure that my sharetSecret is right. I can login using this piece of code in my windows computer but in my ubuntu vds i cant login i checkt the time offsets they are diffrent from each other. 1 week ago i would login in my vds but now i cant. Any ideas ?
  22. I want to get the other language of these items' market_hash_name I have tried to set TradeOfferManager's language property, but it doesnt work. So can you give one way to make it.. I think need to set manager.createOffer("xxxxx&language=schinese") like this? Very appreciate.
  23. Hello, I'd been trying to get the acceptConfirmationForObject working with below code community.acceptConfirmationForObject(checker, extraObj["trade_id"], function (err) { if (err) { console.log('called transferItem here 7.01 acceptConfirmationForObject got error \n'+util.inspect(err, false, null)); } else { console.log('called transferItem here 7.02 acceptConfirmationForObject succesfull '); } }); But it keeps giving me this error: It looks like your Steam Guard Mobile Authenticator is providing incorrect Steam Guard codes. This could be caused by an inaccurate clock or bad timezone settings on your device. If your time settings are correct, it could be that a different device has been set up to provide the Steam Guard codes for your account, which means the authenticator on this device is no longer valid. The steam-community version I've is 0.2.2 and when I check for latest available with this command npm view steam-community versions the highest it gives is 0.2.2 while the least version that's needed is 3.27.0 as written in doc https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#acceptconfirmationforobjectidentitysecret-objectid-callback Not sure even though I've very low version than why is even community object giving me that function and why in version list it shows the available version up to 0.2.2? Do I've to upgrade all other modules to get the latest version? In between rest of the things with trade are working fine and even the shared secret is working for auto login without asking for steam guard code and the time in steam guard device and my server is same so please help me figure out what is the issue. Thanks
×
×
  • Create New...