Jump to content
McKay Development

jensej

Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by jensej

  1. bot.community.startConfirmationChecker(30 * 1000, bot.identitySecret); // Check confirmations about every ~30 sec
  2. Is there any option to speed up receiving information about the offer? Because now is around 5-25 seconds.
  3. Is any possible that steam is bloking IP address form OVH? Because every few min display this error. Moreover I have 3 different VPS and few steam account, and all of this have this error. Any Idea how I can solve this?
  4. HI. This error below is a steam error or in my script? Thanks
  5. Hello. How many times I can cancel offer? Is any limit? Steam doesn't ban my account? Thanks
  6. it's weird because I have sth like this before: setInterval(function(){ steam.loggedIn(function(err, loggedIn, familyView) { if(loggedIn == false) { process.exit(1); } });}, 300000); CRON checks the bot DOES work, if not he run script. And an error exists. (with this code too)
  7. Thanks for Your answer. Could You tell me, how I should repair COOKIE, when cookies expires. Using steamcommunity?
  8. How do this in this event? manager.on('sentOfferChanged', function(offer, oldState) { offer.getReceivedItems(function(err, items) { }); });
  9. Hello. What I Sholud do when I have this error : Couldn't get received items: Error: ETIMEDOUT I have big problem with this error because I can't ADD recived items to database. Error happens sometimes, not every time. Could someone have any ideas.
  10. manager.on('sentOfferChanged', function(offer, oldState) { console.log("Offer #" + offer.id); if(offer.state == TradeOfferManager.ETradeOfferState.Accepted) { connection.query('SELECT `id`,`steamid` FROM `offers` WHERE `offerid` = \''+offer.id+'\' and status = 2').then(function(w) { console.log("#2"); offer.getReceivedItems(function(err, items) { if(err) { console.log("Couldn't get received items: " + err); } else { console.log("#3"); var l = 0; var suma = 0; items.some(function(item) { console.log(item); tab_prices.some(function(ob) { if(item.market_hash_name == ob.name) { //console.log("#5"); if(ob.price >= 0.3) { //console.log("#6"); var a = { name: item.market_hash_name, img: item.icon_url, asset_id: item.id, price:ob.price, offerid: offer.id}; connection.query('INSERT INTO items SET ?', a, function(err,res){ if(err) throw err; suma = suma + parseFloat(ob.price); if(items.length == l) { connection.query('UPDATE `offers` SET `status`= 3 WHERE `offerid`=\''+offer.id+'\' and status = 2').then(function(o){ if(o.changedRows == 1){ var tax = suma*0.1; var pkt = suma - tax; var employee = { earned: tax, typ_wpln: 1, offers_id: offer.id}; connection.query('INSERT INTO money SET ?', employee, function(err,res){ console.log(err); connection.query('UPDATE `users` SET `points` = `points`+ \''+pkt+'\' WHERE `steamid`=\''+w[0].steamid+'\'').then(function({ if(b.changedRows > 0) console.log('#OfferID:' + offer.id + ' #Pkt: ' + pkt + ' #SteamID: ' + w[0].steamid + ' Tax: ' + tax); }); }); } }); } }); } else { connection.query('UPDATE `offers` SET `status`= \''+offer.state+'\' WHERE `offerid`=\''+offer.id+'\' and status = 2').then(function(o){ console.log('#OfferID: ' + offer.id + ' #Status '+ offer.state); }); } l++; } }); }); } }); }); } else { connection.query('UPDATE `offers` SET `status`= \''+offer.state+'\' WHERE `offerid`=\''+offer.id+'\' and status = 2').then(function(o){ console.log('#OfferID: ' + offer.id + ' #Status '+ offer.state); }); } }); setInterval(function(){ manager.loadInventory(730, 2, true, function(err, inventory, currencies) { if (err) console.log(err); else { connection.query('SELECT `items`.`asset_id`,`items`.`id` as `itemid`,`items`.`steamid`,`users`.`tradelink` as `tradelnk` FROM `items` JOIN `users` ON `users`.`id` = `items`.`buyer_id` WHERE `items`.`status`= 1').then(function(row) { console.log(row); row.forEach(function(item) { console.log(item.tradelnk); var offer = manager.createOffer(item.tradelnk); inventory.forEach(function(gun) { console.log(gun.id, item.asset_id); if(gun.assetid == item.asset_id) { offer.addMyItem(gun); var uniqcode = Math.random().toString(36); offer.send("Uniqcode:" + uniqcode, item.tradeaccess, function(err, csgo) { if (err) { connection.query('UPDATE `items` SET `status`= 12 WHERE `id`=\''+item.itemid+'\'').then(function(o){ var d = new Date(); console.log("[Data]: "+ d +" [OfferID]: " + offer.id + " [UniqCode]: " + uniqcode + " [ItemID]: " + item.itemid + " [Error]: " + err); }); } else { connection.query('UPDATE `items` SET `link`= \''+offer.id+'\', `status`= 2,`uniqcode`=\''+uniqcode+'\' WHERE `id`=\''+item.itemid+'\'').then(function(o){ var d = new Date(); console.log("[Data]: "+ d +" [OfferID]: " + offer.id + " [UniqCode]: " + uniqcode + " [ItemID]: " + item.itemid ); }); } }); } }); }); }); } });}, 30000);
  11. Hello. Why I get two diffrent assetid from getReceivedItems and LoadInventory? here is my code sample: manager.on('sentOfferChanged', function(offer, oldState) { if(offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getReceivedItems(function(err, items) { items.some(function(item) { //here save item.assetid to database. } } } }); Next I do: manager.loadInventory(730, 2, true, function(err, inventory, currencies) { //here I get saved asseid from database and loadInventory //item.asset_id is row from database inventory.forEach(function(gun) { gun.id, item.asset_id // all elements in inventory are always different but should be this same. if(gun.assetid == item.asset_id) }); Could someone tell me any tip?
  12. var request = require("request"); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamcommunity = require("steamcommunity"); var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port; var proxifiedRequest = request.defaults({'proxy': proxyUrl}); var community = new steamcommunity({request: proxifiedRequest}); var manager = new TradeOfferManager({community: community}); This code will be have change ip in every new loadUserInventory or every login to steam?
  13. createNewOffer(data.tab_skins, data.tradelink, data.token, function(offer, tk) { offer.send('New Offer', 'RafVO0qA', function(error, csgo) { if (error) { console.log(error); } else { console.log(csgo); } }); }); callback(error); ^ TypeError: callback is not a function offer return object with all data. But I can't send an offer.
  14. Hello. I want to do two steam account (at the beginning) working on 1 database. Better to do it in two separate processes? What kind of problems to pay attention?
  15. Hello. Is any option to get the list steamid of friends. Thanks.
  16. Hello. Is any possible to first login on steam account with this node-steamcommunity module, and next login on other website (sth like jackpot). Someone Could tell me what I should do?
×
×
  • Create New...