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. Hello, this is my code var offer = manager.createOffer(row.trade_url); offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": row.assetid}); offer.send(function(err, status) { if (err) { console.log("[ERROR] Sending offer - " + err); } else { console.log("Offer #" + offer.id + " " + status); } console.log(status); }); Everything works, but can I check If he have mobile authentificator on?
  2. Hi! I'm tryng to use changePassword function, but it returns eresult: 8 It doesn't works, or I just use it wrong? Thanks. There is the sample code which I use: client.requestPasswordChangeEmail(password, function(err) { console.log("Req: "+ err); var rl = require('readline').createInterface({ "input": process.stdin, "output": process.stdout }); rl.question('Code: ', function(code) { client.changePassword(password, newpassword, code, function(err) { console.log(err);} ); console.log(code); rl.close(); }); });
  3. Alright so the title says it all, i'm fairly new to Steam bots. I'm trying to make it so it only accepts CSGO keys i know the code below is horrible, but if someone could point me in the right direction it would help a lot. offers.on('newOffer', function (offer) { console.log("New offer #"+ offer.id +" from "+ offer.partner.getSteam3RenderedID()); // Accept any trade offer from Admin. if (offer.partner.getSteamID64() === config.admin && appid === appid.CSGO){ console.log("ADMIN offered a trade. Trying to accept offer."); offer.accept(function (err) { if (err) { console.log("Unable to accept offer "+ offer.id +": " + err.message); } else { console.log("Offer accepted because ADMIN sent the offer"); } }); } else { //Otherwise deny it and message the user console.log("User "+ offer.partner.getSteam3RenderedID() +" offered an invalid trade. Declining offer."); offer.decline(function (err) { if (err) { console.log("Unable to decline offer "+ offer.id +": " + err.message); } else { console.log("Offer declined"); // Message the user client.chatMessage(offer.partner.getSteamID64(), "Invalid offer."); } }); } }); I know it also only accepts if its the admin, that's just for testing.
  4. Hello everyone! Just a really quick question. Let's say I want my bot to run 24/7. How can I make sure it won't stop at all? I don't really mean like: 1. Keep your computer / bot running on your local machine 24/7. 2. Buy a VPS and run the bot on that machine. Because that is quite obvious. I mean like, the session not expiring. Is the following code enough to make sure that my steambot runs 24/7 on a Raspberry Pie for example? client.on("webSession", function(steamID, cookies) { logger.debug("Got web session"); setInterval(function() { client.webLogOn(); }, 1000*60*60); /* And some more stuff which need cookies */ });Thanks for your help!
  5. Getting a error when trying to execute this code: community.httpRequestPost('https://steamcommunity.com/market/sellitem/', { form: { sessionid: community.getSessionID(), appid: item.appid, contextid: item.contextid, assetid: item.assetid, amount: 1, price: 10000 // 10000 == $100 }, headers: headers, json: true }, (err, response, json) => { if(err) { console.log(`Sell item HTTPREQUESTPOST error: ${err.toString()}`); return; } console.log(json); }, "steamcommunity"); My headers are: 'Host': 'steamcommunity.com','Origin': 'https://steamcommunity.com''Referer': 'https://steamcommunity.com/market/''User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36','X-Prototype-Version': '1.7','X-Requested-With': 'XMLHttpRequest', Cookies: (first 4 getting from node-steam-tradeoffer-manager)steamLoginsteamLoginSecuresteamMachineAuthsessionidwebTradeEligibility (from your's reddit post)strInventoryLastContext=730_2Steam_Language=english I've tried to do request from REST Client with client's account cookies, headers, and it works (from client, not from node).
  6. if i want make bot for csgo. do i have to have games on my steam account? or only my inventory? or what are the requirements of my account so that could be a bot?
  7. Hello! Thanks in advance! With node-steam-user can i fetch/take Steam IDs from my BOT`s friend list ? and after make a loop with friends`s Steam IDs to find more Steam IDs from their friend list..
  8. I've created lots of accounts with the bluestacks-android emulator, because I thought that I could just access my files there easily, but it doesn't seem like it. Does anyone know how I can root this emulator, or do it without rooting it? Thanks!
  9. What is the method to make this? By example if I type: !createlisting <itemname> I will create a listing for the item with a random decimal price. Thanks in advance if you just tell me how to create it will be appreciated.
  10. Hello everyone! This might have been answered before, but I tried to find it everywhere, but I'm still not 100% sure. I'd like to use my bot with trade offers, however when I try to set the cookies for the tradeoffer-manager, it fails. I'm pretty sure this has to do with my limited account, since it is unable to fetch an API Key. So I'd like to be 100% sure, before I put some money into Steam: Do I need to get rid of the limited status of my account before I can fully use the trade offers? (and is this because we can't fetch the API Key and therefore we can't set the cookies?) Thanks for your help and I hope that this question will help some other people out as well who were just curious or had the same question.
  11. How do I use the on 'save' and on 'read' functions? When I'm doing it like this: const user = new SteamUser(); user.logOn(); user.storage.on('save', function(filename, contents, callback) { // filename is the name of the file, as a string // contents is a Buffer containing the file's contents // callback is a function which you MUST call on completion or error, with a single error argument // For example: console.log(filename, contents, callback); }); user.storage.on('read', function(filename, callback) { // filename is the name of the file, as a string // callback is a function which you MUST call on completion or error, with an error argument and a Buffer argument // For example: console.log(filename, callback); });I just get the output on start of my electron app: cellid-86[...].txt 91 (err) { if(callback) { callback(err || null); } } servers.json [91, 10, 9…] (err) { if(callback) { callback(err || null); } } So first this 'cellid-...txt' file and then the 'server.json'. But when I start an actual game via steam and close it the 'save' or 'read' event functions aren't called.
  12. hi i wanted to ask if and when yes how i can bind ips in node-steam-user like here https://github.com/DoctorMcKay/node-steam-client#cmclient
  13. http://steamcommunity.com/app/{gameID}/tradingforum/ or http://steamcommunity.com/app/{gameID}/tradingforum/{postID}And i need there to edit a Thread. I can not find such a function. Can you help me ?
  14. Hello, I'm really new to node.js and everything that comes with it and for now I'm really enjoying it! However, I've run into a problem, which has more to do with cosmetics than anything else. friends.on("friendMsg", function(steamID, msg, type) { var steamName = client.getAliases(steamID, function(err, results) { if (err) { console.log(err); } else { console.log(results); } }); if (type == Steam.EChatEntryType.ChatMsg) { console.log("Friend message from " + steamName + ": " + msg); if (msg == "Ping") { friends.sendMessage(steamID, "Pong"); console.log("Send back: Pong"); } else { friends.sendMessage(steamID, config.greetMsg); console.log("Send back the standard reply"); } } }); When someone sends a message to the bot, it returns a standard greeting. Well that works great. Even the fact that when a user types: "Ping" it returns "Pong". The problem is the fact that I want to see this in the console: "Friend message from " + steamName + ": " + msg Right now, I've got it working that the steam name is shown as the steam64 ID (not in this code), but for aesthetics, I'd like to see the current username of the person the bot is chatting with on Steam. It seems like this can be achieved with .getAliases or .getPersona, but I can't seem to get it to work. Could someone help me out with this or is it just not possible? Thanks a lot!
  15. So, I'm currently working on developing a trading bot for my website, instead of letting someone else do it, as there's only one way to gain experience. So far I have managed to do somewhat of a decent job, it works. But I have come to a point where I would need to do so it does not trade with users that are in escrow. This should preferably be checked during the process of making the offer. I have read, and tried what have been given in this thread - https://dev.doctormckay.com/topic/623-decline-trade-hold/ - but have reached the point of where I'm unsure of what to do, and seeking help from someone who have more knowledge than me with this. So I hope there's someone who's able to help, or point me in the right direction. Thanks in advance.
  16. Hey i'm building a scrapbanking but i don't know how to make the bot craft scraps with weapons. Can you help me ?
  17. Hello i want a in-bot convertor by example if I type: 10.11 it will answer 10 REFS and 0 REC and 1 SCRAP. How can I do this please reply me ;(..
  18. How would you go about coding a method in which a steamid is within a config file, and upon a trigger it gets the server that the client is on, if at all, and then henceforth gets the map that the server is on. Planned to implement with twitch as a !map command.
  19. Hi, i've been trying to send trade offers in loop every time it blows. Here is what im doing in theory: im reading some valuables from local text file such as my items assetid, tradelinks and market hash name of item that i want to add trade. then im creating offers in loop and sending them. i tried to sleep in loop and so many things every time it gives error. in code : 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 client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "google.com","language": "en" }); var community = new SteamCommunity(); // Steam logon options var logOnOptions = { "accountName": "***", "password": "****", "twoFactorCode": SteamTotp.getAuthCode("sharedSecret")}; var lineReader = require('readline').createInterface({ input: require('fs').createReadStream('trd.txt')}); var lines=[]; var i,text,q; var itmName,myitmid; i = 0; q=0; // so far so good lineReader.on('line', function (line) {lines[i]=line;console.log(i+". trd :"+lines[i]);i++;}); lineReader2 = require('readline').createInterface({ input: require('fs').createReadStream('nm.txt')}); lineReader2.on('line',function (line2){ itmName =line2; console.log("itmName :"+itmName);}); lineReader3 = require('readline').createInterface({ input: require('fs').createReadStream('myitm.txt')}); lineReader3.on('line',function (line3){ myitmid =line3;console.log("myitmid :"+myitmid);}); //end reading if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json'));} client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam");}); client.on('webSession', function(sessionID, cookies) //right here it begins { for(q = 0; q<lines.length-1;q++)//creating loop { manager.setCookies(cookies, function(err) { console.log("//////////"); console.log("q : "+q); console.log(lines[q]); console.log("\\\\\\\\\\"); //used this because it reads all links but tries to send just lastone if (err){console.log(err);process.exit(1);return;} var linqs = getstID(lines[q]);//getting the userid from tradelink cItmId = getInv(linqs);//getting asset id of item if(cItmId !== false && cItmId !== "undefined")//checking the value before send offer { sndTrade(myitmid,cItmId,lines[q]); } else { console.log("false"); } }); community.setCookies(cookies); } }); manager.on('sentOfferChanged', function(offer, oldState){console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`);}); manager.on('pollData', function(pollData){fs.writeFile('polldata.json', JSON.stringify(pollData));}); function getstID(st)//that function gets the userid from tradelink { var ll = st.substring(st.indexOf("=")+1,st.indexOf("&")); ll = "[U:1:"+ll+"]"; return ll; } function getInv(sTeamID)//that func returns the assetid { manager.loadUserInventory(sTeamID,730,2,false,function(err,inventory) { console.log("envanter yükleniyor"); if(err) { console.log("[WARNING]: Couldn't load inventory of " + sTeamID + "!"); } else { console.log(sTeamID+"envanteri yüklendi"); for (var p = 0;p<inventory.length;p++) { if(inventory[p].market_hash_name == itmName) { console.log("item bulundu"); return inventory[p].assetid; } else { console.log(sTeamID+"Item bulunamadı"); return false; } } } }) } function sndTrade(mnItm,cItm,trdLink)//that creates the offer. { var offer = manager.createOffer(trdLink); offer.addMyItem({"assetid":mnItm,"appid":730,"contextid":2}); offer.addTheirItem({"assetid":cItm,"appid":730,"contextid":2}); offer.send(function(err,status) { if (err) {console.log(err);return;} if (status == "pending"){console.log("offer #${offer.id} sent, but reqires confirmation.");} }); } i've tried without/with functions, tried to log every value to check up.
  20. Hi. I've got some ideas about setting up some quota to some items, so that i won't overstock. Is there something I need to do with backpack or only the offer manager?
  21. Hello McKay, First of all, thanks for your hard work. I'm trying to implement tradeoffer-manager to my bot project but sometimes my bot process just halted, it threw error like this: 2016-10-26 17:19:13 - error: [x] [tradeoffer-manager] { Error: HTTP error 429 at SteamCommunity._checkHttpError (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:108:9) at Request._callback (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:50:61) at Request.self.callback (/xbot/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/xbot/node_modules/request/request.js:1048:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/xbot/node_modules/request/request.js:969:12) at emitNone (events.js:91:20) at Gunzip.emit (events.js:185:7) code: 429 } My main index.js got this to handle these kind of excetion like this: process.on('uncaughtException', function(err) { // handle the error safely console.log(err) }); Please help. Thanks.
  22. manager.loadUserInventory(user, 730, 2, true, function (inventory, err) { if (err) { console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!")); } else { console.log(inventory); } }); Why does it return err? I've done everything correctly and i've checked so the variable $user is equal to a valid steamid.
  23. Hey so I wanted my bot to check a users inventory. This is how my code looks like. var TradeOfferManager = require("steam-tradeoffer-manager"); var manager = new TradeOfferManager({ "steam": client, "language": "en" }); manager.loadUserInventory(user, "730", "1", "true", ???); console.log(???.inventory); https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#loaduserinventorysteamid-appid-contextid-tradableonly-callback So as you see here at the code and the link i provided I haven't defined the callback thing yet indicated with "???". I don't really know what callback means and how I can use it. Please help me understand this variable. Thanks in advance!
  24. Is there a way to use one trade offer manager for two accounts?
  25. Hey, I am still not too good with Node or JS, but working on it! I have a working NodeJS bot to accept item donations. Sometimes, offers are glitched. The bots console log tell me, that it accepted them, which of course doesn't work. If I restart the bot, it finds the offer and accepts it (if it's not glitched anymore). I managed to let the bot find out if an offer is glitched. if(offer.isGlitched() == true) { console.log("Offer is glitched!"); } else { console.log("Offer is not glitched!"); }Now ... since I don't fully understand how the bot gets the new offers, I don't know how to manually refresh them. Lets say, I would use the code above right after a new offers is received and "isGlitched()" equals "true", what would I need to have a few seconds delay and then just refresh all offers until the offer is not glitched anymore? if(offer.isGlitched() == true) { console.log("Offer is glitched!"); setTimeout(function(){ //Reload offers! }, 15000); } else { console.log("Offer is not glitched!"); //Some conditions offer.accept();" } What would I need as "Reload offers!"? This might be some easy-to-solve question, but I tried and didn't succeed. Any help is greatly appreciated!
×
×
  • Create New...