Jump to content
McKay Development

QWER

Member
  • Posts

    6
  • Joined

Recent Profile Visitors

492 profile views

QWER's Achievements

  1. I create new test file with bot. It show same errors and yes - you're right, it doesn't crash app. Is here any way to disable that long error? Thanks (Im sure in 2017 ~March it show only oneline warning like "{ Error: There was an error accepting this trade offer. Please try again later. (11) }") Test file var SteamUser = require('steam-user'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamCommunity = require('steamcommunity'); var login = "******"; var password = "******"; var shared = "******"; var identity = "******"; var client = new SteamUser(); var community = new SteamCommunity(); var managerConfig = { steam : client, community : community, domain : "localhost", language : "en", // pollInterval : 3000, // cancelTime : 600000, // pendingCancelTime : 30000 }; client.on('loggedOn', function(){ console.log("[bot] Logged into steam as " + client.steamID.getSteam3RenderedID()); }); var manager = new TradeOfferManager(managerConfig); var code = SteamTotp.generateAuthCode(shared); var logOnOptions = { accountName: login, password: password, twoFactorCode: code, }; client.logOn(logOnOptions); client.on('webSession', function(sessionID, cookies){ manager.setCookies(cookies, function(err){ }); community.setCookies(cookies); community.startConfirmationChecker(10000, identity); community.on('confKeyNeeded', (tag, callback) => { const time = Math.floor(Date.now() / 1000) console.log("Conf Key Needed" + JSON.stringify(tag)); callback(null, time, SteamTotp.generateAuthCode(identity, time, tag)) }); }); manager.on('newOffer', function(offer) { console.log("newOffer"); setTimeout(acceptOffer, 500, offer); }); function acceptOffer(offer){ console.log("acceptOffer"); offer.accept(function(error, status) { if(error){ console.log("acceptOffer error"); console.log(error); return; } }); } Log newOffer acceptOffer acceptOffer error { Error: There was an error accepting this trade offer. Please try again later. (11) at Object.exports.makeAnError (/root/test/node_modules/steam-tradeoffer-manager/lib/helpers.js:10:12) at SteamCommunity.manager._community.httpRequestPost (/root/test/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:643:13) at Request._callback (/root/test/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/root/test/node_modules/steamcommunity/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/root/test/node_modules/steamcommunity/node_modules/request/request.js:1081:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/root/test/node_modules/steamcommunity/node_modules/request/request.js:1001:12) eresult: 11 } Cheers
  2. Hi I have little problem with errors (28 actually) (I know - 28 means already redeem). It always shutdown script Code console.log("acceptOffer"); if(again == 0) return; offer.accept(function(error, status) { if(error){ console.log("acceptOffer error"); console.log(error); return; } }); Console acceptOffer acceptOffer error { Error: There was an error accepting this trade offer. Please try again later. (28) at Object.exports.makeAnError (/root/app/node_modules/steam-tradeoffer-manager/lib/helpers.js:10:12) at SteamCommunity.manager._community.httpRequestPost (/root/app/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:643:13) at Request._callback (/root/app/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/root/app/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/root/app/node_modules/request/request.js:1081:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/root/app/node_modules/request/request.js:1001:12) eresult: 28 } And manager.on('receivedOfferChanged', function(offer, oldState) { console.log("receivedOfferChanged"); }); isn't called What I should do? Cheers
  3. Hi. I have little problem with my code. It says "DeprecationWarning: Calling an asynchronous function without callback is deprecated." function SteamBot(name, autodecline) { var self = this; // all data this.accountData = data; console.log(data.steamid); this.steamid = data.steamid; this.login = data.name; this.password = data.password; this.shared = data.shared_secret; this.identity = data.identity_secret; this.autodecline = (typeof autodecline == 'undefined' ? true : autodecline); console.log(this.autodecline); this.cachedir = "private/bot/"; this.pollPath = this.cachedir + 'polldata.json'; this.loggedIn = false; this.gotApiKey = false; this.error = false; this.inventory = []; this.client = new SteamUser(); this.community = new SteamCommunity(); this.client.setOption('promptSteamGuardCode', false); var managerConfig = { steam : this.client, community : this.community, domain : "localhost", language : "en", // pollInterval : 3000, // cancelTime : 600000, // pendingCancelTime : 30000 }; this.client.on('loggedOn', () => { this.loggedIn = true; this.client.setPersona(SteamUser.EPersonaState.Online) }) this.manager = new TradeOfferManager(managerConfig); if (fs.existsSync(this.cachedir + 'polldata.json')) { this.manager.pollData = JSON.parse(fs.readFileSync(this.cachedir + 'polldata.json')); } this.manager.on('pollData', function(pollData) { console.log("pollData > " + self.cachedir); fs.writeFile(self.cachedir + 'polldata.json', JSON.stringify(pollData)); }); this.manager.on('newOffer', function(offer) { console.log("newOffer"); offer.decline(function(err) { if (err) { console.log("[SteamBotsHandler] BOT " + self.name + " unable to decline offer: " + err.message); } }); }); } Here is log... newOffer newOffer pollData > private/bots_cache/csgocloudbot2/ (node:24579) DeprecationWarning: Calling an asynchronous function without callback is deprecated. pollData > private/bots_cache/csgocloudbot2/ (node:24579) DeprecationWarning: Calling an asynchronous function without callback is deprecated. I have latest version of tradeoffer manager. What to do? Cheers
  4. Hi, thanks for sharing. I have problem with this - always get status code 400. var options = { url: 'https://steamcommunity.com/market/sellitem/', headers: { 'Origin': 'http://steamcommunity.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Referer': 'http://steamcommunity.com/my/inventory/', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4' }, form: { sessionid: session, appid: items[index]["appid"], contextid: items[index]["contextid"], assetid: items[index]["assetid"], amount: 1, price: 3 // price is $0.03 } }; request(options, function (error, response, body) { if(!error && response.statusCode == 200){ console.log("Item added on market ($" + price + ") > " + items[index]["market_hash_name"]); }else{ console.log("Error item > " + items[index]["market_hash_name"]); console.log(error); console.log(body); console.log(response); console.log(response.statusCode); } }); Where is the problem?Thanks for everything
×
×
  • Create New...