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. Hi again What is the best approach to determine if an Item belonging to Steam Inventory 753 - contextid 6 (steam community) - is a Card, Booster, etc... I was looking at the "offer" object for an incoming offer and found out that Booster Packs and Gems are actually called like that under "type" but for cards, bgs and emotes it's a little different - some examples: 1) type: '"Glow Ball" - The billiard puzzle game Trading Card', 2) type: 'DISTRAINT: Deluxe Edition Uncommon Emoticon', 3) type: 'Unexpected Day Profile Background', So, should I use the type value and match for e.g. "Emoticon" or is there a better way to identify those items' type? Thanks
  2. 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?
  3. I've been researching for the past 2-3 hours about generating in-game screenshots/images of CSGO items. (The type where you inspect them) The *only* thing I've found is a little paragraph under the title 'Console Commands' here: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Economy_Items I'm looking to add an in-game screenshot feature to my website coming out soon. Services that offer this screenshotting feature that is generated in the website: - metjm.net - csgro.com - csgo.gallery - cs.money (They also offer a pretty sweet 3D option as well as shown here: https://3d.cs.money/?t=5&link=4pzIYq3) - opskins.com (Used to when they were still around) It seems very hush-hush online. I cannot find anything - no libraries - nothing about this sort of thing. Does doctormckay's library offer the ability to do this? Can I be pointed in the right direction to build my own? Thanks for taking the time to consider my question
  4. community.acceptConfirmationForObject(identitySecret, offer.id, function(err) { if(err){ console.log(chalk.red("Confirmation Failed for " + offer.id + ": " + err)); } else { console.log(chalk.green("Offer " + offer.id + ": Confirmed!")); } }); How can I delay this ^ for a couple seconds, avoiding it being fired earlier than offer.accept (which is right before)? I know this is more a coding issue rather than module's issue but I'm beginning to code in js and this async stuff hurts Thanks
  5. I got a output from: client.getPublishedFileDetails(1607555098, (err, results) =>{ console.log(results);});So my Question is, can you like artworks with this module or do i have to write a request function?Thanks for your help
  6. Hello good day, I am new to coding. mainClient.on('webSession', function(sessionID, cookies) { mainManager.setCookies(cookies, function(err) { if (err) { // Handle Error. console.log(err); process.exit(1); // Exit, if we cannot connect, since we can't do anything. return; } mainManager.getInventoryContents(753, 6, true, function(err, inv) { // Load Inventory if (err) { // Handle Error. console.log('Error, in loading our inventory.') return; } if (inv.length == 0){ console.log('Inventory is empty, add some items(cheap ones, like trading cards or gems)') } var firstOffer = mainManager.createOffer(config.accounts.account2.tradelink); // Intialize Trade Offer var itemname = inv[0].market_hash_name.toLowerCase(); console.log('The item in which we are using is a/an ' + itemname) firstOffer.addMyItem(inv[0]); firstOffer.setMessage(SECURITY_CODE.toString()); // Set a message, so no one can slip in a trade, and try to steal your items. firstOffer.send((err, status) => { // Send offer. if (status == 'pending') { // Check if it needs to be confirmed. mainCommunity.acceptConfirmationForObject(config.accounts.account1.identity_secret, firstOffer.id, function(err) { // Try to accept Trade if (err) { // Handle, any accepting errors. console.log('Error accepting Trade.'); return; } else { // It worked fine, Now the farm begins. console.log('Trade offered. Counter is at : ' + counter); } }); } }); }); }); // Set Cookies. mainCommunity.setCookies(cookies); }); If one of the err fails, It cannot return to first. I mean is it stock like example " Error accepting Trade" . Like that. I just want to return until it goes to console.log('Trade offered. Counter is at : ' + counter);. Thank you for the help.
  7. Hello My bot is not running. I send an offer to it and then start it. Trade offer gets accepted but I get the error message "This trade offer is no longer valid." It's happening when retrieving UserDetails: if (offer.itemsToGive.length === 0) { offer.getUserDetails((err, me, them) => { if (typeof (them) !== 'undefined') { donator = them.personaName; console.log(`donator is: ${donator}`); } else { console.log(err); } }); because I'm not getting donator's name. This is my console.log: Error: This trade offer is no longer valid. at SteamCommunity._checkTradeError (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:144:13) at Request._callback (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:52:80) at Request.self.callback (D:\Portable\Birba\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1161:10) at Request.emit (events.js:182:13) at Gunzip.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:273:13) at Gunzip.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1094:12)Donation accepted. Status: accepted. Problem is, I'm posting a comment on bot's profile upon successful incoming donation and if there are offers BEFORE I run the bot, comments are not posted, since there's a check on "donator" and it doesn't return. BUT: If I keep the bot running and then send one more offer, it gets accepted and all is working fine without errors. donator is: roughnecks Donation accepted. Status: accepted. Comment Posted
  8. 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?
  9. How to accept request who sent with script offline and acc have pending request . This dont work. steam.on('friendRelationship', (steamid, relationship) => { if(relationship == 2){ steam.addFriend(steamid); steam.chatMessage(steamid, "Hi"); } });
  10. Hello i need for my project the Ticketcrc and the h_steampipe, i looked into the documentation, i thought i can do it with AuthTicketstatus but that does not seem to work at all. I get a ticket and thats it. I cant get any information about the encryptionKeyeither. For the next question, does anyone know where i get more informations to h_steam_pipe? Cause i cant find any. Thanks for your help guys. Have a great day!
  11. Hello, sorry for stupid post but I have question why after use this code second time console.log print the same information twice? 3 turns on 3 times when I use in other place 'loggedOn' I see again console.log(this.informations) in other function. Someone can tell me why and what I can to do with that? Sorry for my rip English and code. { let p = new Promise((resolve,reject)=>{ this.steam.logOn(this.account_details); this.steam.on('loggedOn', () => { this.steam.setPersona(SteamUser.Steam.EPersonaState.Online); this.informations.steamID=this.steam.client.steamID; this.informations.accountid=this.steam.steamID.accountid; console.log(this.informations); this.steam.logOff(); setTimeout(()=>{ resolve(true); },1000); }); }); return p.then((resolve)=>{ console.log(`...`); }); } Console:
  12. Hi, im sorry to bother you but i need a litte bit of help. I need to find, how to get my sended offers and to be honest, I dont even know where to start, what function use and even if its possible or if i will need o save every trade i send. Thank you
  13. I'm running a bot and the majority of trade offers are not going through. The bot logs in and handles expired sessions like this: let client = new SteamUser(); let community = new SteamCommunity(); let manager = new TradeOfferManager({ community: community, steam: client, domain: "example.com", language: "en", pollInterval: 2000 }); let logOnOptions = { "accountName": data.username, "password": data.password, "twoFactorCode": SteamTotp.getAuthCode(data.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); client.setPersona(SteamUser.EPersonaState.Online); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies); community.setCookies(cookies); console.log("weblogon") }); community.on("sessionExpired", function(err) { console.log("## Session Expired"); client.webLogOn(); }); The bot gets new offers with manager.on('newOffer', function(offer) { , makes a simple request using https://www.npmjs.com/package/request and calls offer.getUserDetails. An offer is accepted like this: offer.accept(accept(offer, 1)); These are the two functions that handle accepting and confirming trades: function confirm(offer, count) { return function(err) { if (err) { if (count < 20) { console.log(err); setTimeout(community.acceptConfirmationForObject, 10000, data.identity_secret, offer.id, confirm(offer, count + 1)); } else { console.error("CONFIRM FUNCTION: "); console.error(err); } } } } function accept(offer, count) { return function(err, status) { if (err) { if (count < 20) { console.log(err); setTimeout(offer.accept, 10000, accept(offer, count + 1)); } else { console.error("ACCEPT FUNCTION: "); console.error(err); } } else { if (status === "pending") { community.acceptConfirmationForObject(data.identity_secret, offer.id, confirm(offer, 1)); } } } } Whenever I run the code it works for a few hours accepting offers and confirming them. Then offer comes in and the sessionExpired and webSession events are emitted twice. Error: Cannot accept an unsent offer happens every time it tries to accept the offer. This from stdout (it also logs the timestamp): 16:31:23 Error: Not Logged In at SteamCommunity._checkCommunityError (/home/user/bot/node_modules/steamcommunity/components/http.js:128:9) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:51:88) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Gunzip.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 ## Session Expired 16:31:23 ## Session Expired 16:31:23 Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:483:25) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 weblogon 16:31:24 weblogon 16:31:33 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) 16:31:43 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) ... etc What am I doing wrong?
  14. community.getUserInventoryContents(partner, 753, 6, true, (error, items) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } let count = 0; for(let i = 0; i < items.length; i++) { let item = items[i]; if(item.type.toLowerCase() != "Trading Card") continue; count += item.amount; if(count > price) { item.amount -= (count - price); count -= (count - price); } offer.addTheirItem(item); if(count == price) break; } if(count < price) { users.removeReservation(partner, true, removeFunc); return callback("You do not have enough gems to purchase random games."); } if(count > price) { users.removeReservation(partner, true, removeFunc); return callback("An unexpected error occurred, please try again."); } offer.send((error, status) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } if(status == "pending") { community.acceptConfirmationForObject(files.getConfig().identity, offer.id, error => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); } else if(status == "sent") callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); }); break; default: users.removeReservation(partner, true, (error) => { if(error) return callback(error); return callback("Invalid payment method"); }); } }); }); } Where is my fault?
  15. Hello. I'm new to all this stuff, so just a generic question before I dig further in. Can I create a bot which only accepts donations (i.e. no item loss from bot side) if the associated steam account doesn't use Mobile 2FA but is not a limited account (using email auth)? I'm asking because trying this code... client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, 'my_identity_secret'); }); ...I'm not sure how to avoid that "identity_secret" argument. Thanks
  16. var api = require('steam-price-api'); var colors = require('colors'); //"Exalted Manifold Paradox" var iname ="Inscribed Blades of Voth Domosh"; item_price =function(item_name){ var result; api.getprice(570,item_name,function(err, data){ var price = data.body.lowest_price; var valid = price.replace(" ","").replace("TL","").replace(",","."); var last= parseFloat(valid.split(" ")[0]); console.log(last); //return last; },17) } console.log(item_price(iname));
  17. But steam-user inviteToGroup works fine. Though earlier inviteUserToGroup worked as it should.Can you tell me why ?
  18. Hello there, I am very new to node.js and learning step by step, I had a look at many topics in this forum to learn some basics of trading codes, I need little help here, I want to connect to database, retrieve steam trading card names from database (like Alpaca Mage, Mysterious Card 4 etc.) and send a trade offer containing only those trading cards. I also want my bot to check my database like every 10 seconds and if a value i want is found, it will create a trade offer. Is something like this possible ? Thanks in advance
  19. http://prntscr.com/lv0q6u my developer is busy for few days. can anyone give me any idea why this happens so i could fix it? it happens after 24 hrs etc when bot is working
  20. Is there any way to learn if an offer between 2 different steam accounts (that are not mine) got accepted or declined ? I would like to create a website in which people advertise their cs go skins and others buy it, the skins are traded via their own steam accounts but i need to learn if the skin gets to buyer or not ? Is there any way to do that ? Thanks in advance
  21. Hy, i'm new in node js, my english is not that good. First, i wanna make a script which is load the player's inventory, accept all keys expect low price keys (like hydra case key or CSGO capsulekey),t hen select ? keys (depends on what command he uses in the chat (!buyadmin->3keys, !buyvip->2keys)). After the select, the bot will send an offer for the keys and he gets his rank (I can make this part). I have a starter script (I tried to learn and code something). Code: const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp');const SteamID = require('steamid');const SteamCommunity = require('steamcommunity');const TradeOfferManager = require('steam-tradeoffer-manager');const config = require('./config.json'); const client = new SteamUser();const community = new SteamCommunity();const manager = new TradeOfferManager({ steam: client, community: community, language: 'en'}); const logOnOptions = { accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)}; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('[Vortex] Sikeres bejelentkezés a steam-be!'); client.setPersona(SteamUser.Steam.EPersonaState.Online); client.gamesPlayed(730);}); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, config.identitySecret);}); manager.on('newOffer', offer => { if (offer.partner.getSteamID64() === 'config.owenerID') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`[Vortex] Owner csereajánlat elfogadva. Státusz: ${status}.`); } }); } }); client.on("friendMessage", function(steamID, message) { if (message == "!help") { client.chatMessage(steamID, "[Vortex] Parancsok: !weboldal, !szerverek, !rangok, !adminok, !buyadmin, !buyvip+, !buyvip, !buypskin");console.log(steamID.getSteam2RenderedID()); } if (message == "!weboldal") { client.chatMessage(steamID, "[Vortex] Weboldalunk: ");console.log(steamID.getSteam2RenderedID()); } if (message == "!szerverek") { client.chatMessage(steamID, "[Vortex] Szervereink: ");console.log(steamID.getSteam2RenderedID()); } if (message == "!rangok") { client.chatMessage(steamID, "[Vortex] Rangok: ");console.log(steamID.getSteam2RenderedID()); } if (message == "!adminok") { client.chatMessage(steamID, "[Vortex] Adminok: ");console.log(steamID.getSteam2RenderedID()); } if (message == "!buyadmin") { client.chatMessage(steamID, "[Vortex]");const steam2id = (steamID.getSteam2RenderedID());const steamid = (steamID.getSteamID64());const offer = manager.createOffer(steamid); community.getUserInventory(steamid, 730, 2, false, function(err, inventory) {console.log(inventory[0].amount);}); } if (message == "!buyvip+") { client.chatMessage(steamID, "[Vortex]"); } if (message == "!buyvip") { client.chatMessage(steamID, "[Vortex]");console.log(steamID.getSteam2RenderedID()); } if (message == "!buypskin") { client.chatMessage(steamID, "[Vortex]");console.log(steamID.getSteam2RenderedID()); } if (message != "!help" && message != "!weboldal" && message != "!rangok" && message != "!adminok" && message != "!buyadmin" && message != "!buyvip+" && message != "!buyvip" && message != "!buypskin"){client.chatMessage(steamID, "[Vortex] Nincs ilyen parancs, segítségért írd be: !help");}}); manager.on('newOffer', offer => { if (offer.itemsToGive.length === 0) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log('[Vortex] Támogatás elfogadva. Státusz: ${status}.'); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('[Vortex] Támogatás elutasítva. (Tárgyat akart kérni a bot-tól!)'); } }); }}); (steamID.getSteam2RenderedID()); -> I need this for sourcemod admin setup.
  22. I am working on a site and want to get steam items with nodejsand express i understand how to get item inventory and i am using the get-steam-inventory npmmodule and not sure on why the backpack is not being generated in the express below is the price.js file i have for price.pug and in the pug file i call each item in items and cannot get the value of length any help would be appreciated var express = require('express'); var router = express.Router(); //var pages = require('../pages/Pages.json'); //var quality = require('../public/730/quality.json') var fs = require('fs'); var data; var steamid; var backpack; var appid = 440; const steaminventory = require('get-steam-inventory'); /* GET users listing. */ router.get('/', function(req, res, next) { // render template steamid = req.user.steamid var path = './public/json/'+steamid+'.json'; checkFile(path); res.render('price', {user: req.user, items: req.backpack}); console.log(backpack) }); function checkFile(path) { try { if (fs.statSync(path)) { fs.readFile(path,"utf8", (err, backpack) => { if (err) throw err; backpack = backpack }); } } catch(err) { steaminventory.getinventory(appid, steamid, function(err, items){ if(err) { return console.log("Error, while getting user items. Please check settings or user inventory is hidden."); } else { if (items){ fs.writeFile(path, JSON.stringify(items.raw, null, 4), { flag: 'w' }, function (err) { if (err) throw err; console.log('\x1b[32m','The file has been saved!','\x1b[0m'); }); } checkFile(path) } }) } } module.exports = router;
  23. Hello everyone ! So I spent the last few weeks trying to create a bot that basically trades random steam cards for Steam Game Keys (with a lot of help from Vanilla ;p ) I am now pretty much done with all the trading stuff, and the last thing that I need is to get the Steam Key from my file. Basically, my goal is to - Count how many keys in total are in my .txt or .csv or .anything file and get that to a variable so I can add a line earlier in the code which checks if i have enough keys left before accepting the cards - Get the key(s) from the file (in order to send them in chat) -move the used keys to another file or modify their line to mark them as 'inactive' or something. Here is the part where I stopped : else { totalKeyWeGive = cardCount / cardToKey; console.log("We will give "+totalKeyWeGive+ " SteamKey"); offer.accept(); console.log("OFFER ACCEPTED"); //loop on how much we give the key for (i = 0; i < totalKeyWeGive; i++) { //get steamkey from file here ---------------------------------------------------------------------------- } var textMsg = "Hello ! You bought "+totalKeyWeGive+ " Game keys. Your keys are: "; } client.chatMessage(offer.partner.getSteamID64(), textMsg); } I already have most of the variables setup, and processed earlier in the code : cardToKey - How many cards are needed for one key cardCount - How many cards are there in the offer totalKeyWeGive - If everything is okay in the trade, how many keys should we give Any advices on how I should handle this ?
  24. Hello, I'd like to ask if there is something like getGameBadgeLevel, but for another user.
  25. Hello, I'm currently stuck with something that I assume is very simple, but I can't find any tutorial or help about it anywhere on the internet... I'm currently trying to create a bot that trades random Steam game codes for random steam cards, but my problem right now is that I don't know how to check if all items that the bot will receive are trading cards. I'm aware that this probably is a really easy thing, but I really have no idea where to find my answers :/ Thanks a lot for reading this, hopefully you can me with that This is what I have done so far : //This is where the pain begins. function processOffer(offer) { if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); } else if (offer.isGlitched() || offer.state === 11) { console.log("Offer was glitched, declining."); declineOffer(offer); } else { var theirItems = offer.itemsToReceive var ourItems = offer.itemsToGive }} manager.on('newOffer', (offer) => { console.log("Offer received, processing"); processOffer(offer); })}
×
×
  • Create New...