Search the Community
Showing results for tags 'bot'.
-
Hey, could someone tell me, how should I communicate with steam bot through laravel/vue.js ? Also where should I store the bots folder ? (I guess it should be somewhere outside the laravel project for better security and dont know how would I turn on the bot, but not sure, correct me if I am wrong) For instance when a user clicks some button, I want to create trade-offer (where my bot gives to the user some item) - bots folder is probably outside the laravel (not in laravel project, but somewhere in the server) - i can call some function or ajax request from the click, but dont know what exactly should I do, how to commuicate with the bot
-
So, I have two clients setup and running on my file. I want to be able to get the contents of a trade on the first bot, and pass those items along to the second bot so that it can make a trade accordingly.
-
Error: Access Denied when trying to set cookies for two different bots
Guest posted a topic in node-steamcommunity
I am trying to set cookies for two different bots running in the same file, and when I get to the second bot, the script errors: Error: Access Denied at SteamCommunity.<anonymous> (C:\Users\easto\node_modules\steamcommunity\components\webapi.js:15:20) at Request._callback (C:\Users\easto\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Users\easto\node_modules\request\request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (C:\Users\easto\node_modules\request\request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Gunzip.<anonymous> (C:\Users\easto\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:313:30) The second bot successfully logins, it only errors when setting the cookies for the second bot. -
I've tried sending all my friends a message. so i made a function for that: function messageAllCommand() { var messageAll = readlineSync.question('Enter message: '); for (var friend in client.myFriends) { console.log(friend); client.chatMessage(friend, messageAll); } }but somewhy, it seems really random who gets the message tho it prints everyone's id it but still don't send everyone the message. here are the ID's: https://pastebin.com/5NGqV340 E.G: it printed the user id: 76561198278317090 but didn't sent the message. and it printed the user id: 76561198173748582 this time it sent the message. I checked and friendsList was emitted before BTW this forum is real good and i get answers.
-
I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
-
Hello, I want to connect all my bots via proxy servers to give them separate IP's to connect them to steam for trading and getting users inventory. Yesterday I tried around many hours and could not find any workings solution. I end up with this code: (free proxy's to test only) const steam = require('steam-client'); const request = require('request'); require('request-debug')(request); const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const TradeOfferManager = require('steam-tradeoffer-manager'); let proxyUrl = 'https://119.28.152.208:80'; let proxifiedRequest = request.defaults({'proxy': proxyUrl}); let community = new SteamCommunity({request: proxifiedRequest}); // // let community = new SteamCommunity(); let steamclient = new steam.CMClient(); steamclient.setHttpProxy('https://119.28.152.208:80'); let client = new SteamUser(steamclient); let manager = new TradeOfferManager({ "community": community, "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "localhost", // Our domain is example.com "language": "en" // We want English item descriptions }); steamclient.on('error', (...data) => console.log('client-error', ...data)); steamclient.on('debug', (...data) => console.log('client-debug', ...data)); // user.on('debug', (...data) => console.log('user-debug', ...data)); // user.on('error', (...data) => console.log('user-error', ...data)); // Steam logon options let logOnOptions = { "accountName": config.steamAccountName, "password": config.steamAccountPassword, "twoFactorCode": SteamTotp.generateAuthCode(config.sharedSecret) }; client.logOn(logOnOptions); let botOnline = false; client.on('loggedOn', function() { botOnline = true; console.log("Logged into Steam"); }); setTimeout(function () { if (!botOnline) { console.log("BOT TIMEOUT - RESTART"); process.exit(); } }, 90 * 1000); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log("Fatal error since we couldn't get our API key"); console.log(err); setTimeout(() => { process.exit(1); }, 60000); return; } console.log("Got API key: " + manager.apiKey); [........] but if I run this script, I instantly get an error back: error: uncaughtException: Protocol "https:" not supported. Expected "http:" Error: Protocol "https:" not supported. Expected "http:" at new ClientRequest (_http_client.js:55:11) at Object.exports.request (http.js:31:10) at TCPConnection.connect (C:\xampp\htdocs\...\node_modules\steam-client\lib\tcp_connection.js:56:34) at _getServer (C:\xampp\htdocs\...\node_modules\steam-client\lib\cm_client.js:119:20) at CMClient._getServer (C:\xampp\htdocs\...\node_modules\steam-client\lib\cm_client.js:442:3) at CMClient.connect (C:\xampp\htdocs\...\node_modules\steam-client\lib\cm_client.js:97:7) at gotCMList (C:\xampp\htdocs\...\node_modules\steam-user\components\logon.js:171:17) at readFileCallback (C:\xampp\htdocs\...\node_modules\steam-user\components\logon.js:117:4) at C:\xampp\htdocs\...\node_modules\file-manager\node_modules\async\lib\async.js:52:16 the code above uses a https proxy to connect. If I use a http proxy, my console logs looks like Starting services... client-debug connecting to 155.133.230.34:27019 client-debug proxy timed out client-debug socket closed client-debug connecting to 162.254.193.7:27019 or like client-error { Error: HTTP CONNECT 400 Bad Request at ClientRequest.<anonymous> (C:\xampp\htdocs\...\node_modules\steam-client\lib\tcp_connection.js:70:14) at emitThree (events.js:116:13) at ClientRequest.emit (events.js:194:7) at Socket.socketOnData (_http_client.js:395:11) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:548:20) eresult: 35 } Does anyone have a working example to connect bots via proxy server? Whats wrong with my code and does it have something to do with steam's change to https in the past? (oAuth login for example which returns https now) Thanks <3
-
How remake :/ if write test and u profile have level 5+ bot write u have level.... Thanks for help client.on("friendMessage", (steamid, message) => { if (message === "test") { client.getSteamLevels(steamid, function(results) { if (results[client.getSteamID64()] > 5) { client.chatMessage(steamid, "u have +5 lvl."); console.log("done"); } }); } });
-
If I want to connect my website and node.js server I would need to put the ip of the server in my source code but isn't this unsafe because everyone is able to see this if you use javascript, and people could like attack it or something? Also is using socket.io generally the 'best' way to connect a bot and a website or would using socket.io be called 'non-proffesional' and what other options exist? I also haven't seen a big site using socket.io so that makes me wondering, or do they hide it somehow?
- 4 replies
-
- Socket.io
- JavaScript
-
(and 2 more)
Tagged with:
-
First of all, I am Tomas from Argentina. 23 years old. I have 3 bots online on my pc thanks to these modules made by God McKay . I have to say that I am not an expert programming all what I know is thanks to test and error. Never took a course of JavaScript, just a few readings and videos. I am saying this because my questions could be noobs, After three month running these bots, I want to improve them. I have a few things in mind that I want to get better: Handle many incoming offers correctly. My bot isnt 24/7, when I start bot and I have like seven trade offers received when he was offline. The program recognizes seven but just handle the last one. Should I turn off event listener when an offer is managing? Prevent comment many times on same profile. I have +rep service active. When the bot complete a trade, he comment on his profile. I have read that account could get banned if leave a message many times on same profile. So, I want to prevent that. Any Ideas? Accept friend invites received when bots is offline. OverStock script. Now, when I receive a new offer: I am getting my inventory, copy names of each items and pushing into an array and then write on a file. When I am accepting the trade offer, program check if the name of the item appears more than Max Stock set, if not, takes value of that item, otherwise ignore it. Actually, this is working OK. But it does not convince me. Any other Idea? Price List. I am using a simple JSON file to save data as pricelist. But is really annoying when I have to change prices, checking one by one to prevent "scam". Anyone knows a better method to save data? or maybe a JSON manager? Yes, I also using bp.tf API to get community prices. But we know how unstable TF2's economy is. I think is ok for now. I tried my best to express what I want to ask. My english is not excellent. Thanks in advance. Here are bot's profile links: Wall-e Trading CardsWall-e TF2 BOTWall-e ZETA EXCHANGE My steam Profile:http://steamcommunity.com/profiles/76561198050753995/
-
I have this code here mostly from the example in the steam trade offer manager. It accepts all trade offers fine (without any exceptions). I added some code where the bot would skip the trade offer if the bot didn't receive any items (a gift offer). I'm struggling to create the part of code where I can filter items and create the prices for them for buy orders and sell orders. Could anyone tell me the syntax for that? CODE SO FAR //TF2 TRADE BOTvar SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); require('consoleplusplus') var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "example.com", "language": "en" }) var community = new SteamCommunity(); // Steam logon var logOnOptions = { "accountName": "username", "password": "password", "twoFactorCode": SteamTotp.getAuthCode("sharedSecret") }; if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } client.logOn(logOnOptions); client.on('loggedOn', function() { var logonmessage = "#magenta{LOGGED INTO STEAM SUCCESSFULLY}" console.info(logonmessage); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.error(err); process.exit(1); return; } console.info("Got API key: " + manager.apiKey); console.log("________________________________________________________________________________") }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); }); manager.on('newOffer', function(offer) { console.info("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.accept(function(err) { if (err) { console.error("Unable to accept offer: " + err.message); } else { if(offer.itemsToReceive.length === 0) { // Gift offer console.info(offer.partner.getSteam3RenderedID() + " Offer #" + offer.id + " is a gift offer, skipping"); return; }else{ community.checkConfirmations(); console.log("Offer accepted"); } } }); }); manager.on('receivedOfferChanged', function(offer, oldState) { console.info(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getReceivedItems(function(err, items) { if (err) { console.error("Couldn't get received items: " + err); } else { var names = items.map(function(item) { return item.name; }); console.log("Received: " + names.join(', ')); console.log("________________________________________________________________________________") } }); } }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData)); });
-
- node.js
- javascript
-
(and 4 more)
Tagged with: