Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-tradeoffer-manager'.

  • 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, I am wondering if anyone has encountered an issue with trades confirmations when using a lot of bots? Currently we have 13 bots on same server and the issue is that when trades get sent, sometimes there comes a moment when a lot of trades just can't become confirmed. The offer just becomes declined after 5 minutes, but never becomes confirmed. I suspect this problem probably will be associated with some kind of limitations of confirmations API. So im just wondering: Does anyone know what are the limits of confirmations? Are there any safe guidelines of how many bots should be used per one IP address? If anyone thinks the issue is somewhere else please share your opinion!
  2. Hello i'm having some issues and i'm hoping somebody could help me out i'm trying to send a trade offer using the a tradetoken. t = manager.createOffer(new TradeOfferManager.SteamID(SENDER.getSteamID64(), token)) t.getUserDetails((ERR, ME, THEM) => ^Throwsis not on your Steam friends list. I'm guessing manager.getUserInventoryContents(client.steamID.getSteamID64(), keyfromgame, 2, true, (ERR, INV, CURR) => {will also throw inventory private or not in steam friends list? is there any samples about sending offers with tokens ? not entirely sure how i would go about getting there trade hold and / or getting there inventory when we ain't friends?
  3. Is there any way to get just parts of the items name? For example the market_hash_name is StatTrakâ„¢ Tec-9 | Isaac (Field-Tested). How can I get/extract just the weapon name (Tec-9) or the skin name (Isaac)? I'm sorry if this question has already been asked, I couldn't find any info about it. Thanks
  4. i have been trying to get my steam bot to do automatic buy and selling meaning that it has a stock management system and i almost got one that i created from messing around in nodejs i got it it runs the only thing i am having trouble with is an error a friend told me it might be a bug i was wandering if anyone knows what the error means Error: { Error: EBADF: bad file descriptor, write errno: -4083, code: 'EBADF', syscall: 'write' } does not stop the code it keeps going and accepts ust it has that as if it was part of the console.log command also i used jsonfile npm and colors npm modules Here is the full part of it function processOffer(offer) { if (offer.isGlitched() || offer.state === 11) { console.log("[".green+h+":".cyan+m+":".cyan+s+"] ".green+"Offer was glitched, declining."); declineOffer(offer); } else if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); } else { var ourItems = offer.itemsToGive; var theirItems = offer.itemsToReceive; var ourValue = 0; var theirValue = 0; var currentstock = 0; var StockLimit = 0; for (var i in ourItems) { var item = ourItems[i].market_name; if (stock[item]){ currentstock = stock[item].instock; StockLimit = stock[item].stocklimit; if (fs.readFileSync('.//settings/Stock/stock.json')){ console.log(timestamp+"Our " +item+" - stock number: " +currentstock+ " / " +StockLimit+ ".") if (currentstock < StockLimit){ if(Prices[item]) { ourValue += Prices[item].sell; } else if (MetalPrices[item]){ ourValue += MetalPrices[item].sell; } else { console.log(timestamp+"Invalid Value."); ourValue += 99999; } } else if (currentstock >= StockLimit){ console.log(timestamp+item +" Stock Limit Reached") manager.on('receivedOfferChanged', (offer)=>{ if (adminConfig.disableAdminComments == "Enable") { community.postUserComment(offer.partner.toString(), item+ " - Stock Limit Reached", (err)=>{ if(err) throw err.message }); } }) } }; } } for(var i in theirItems) { var item= theirItems[i].market_name; if (stock[item]){ currentstock = stock[item].instock; StockLimit = stock[item].stocklimit; fs.readFileSync('.//settings/Stock/stock.json') console.log(timestamp+"The " +item+" - stock number: " +currentstock+ " / " +StockLimit+ ".") if (currentstock < StockLimit){ if(Prices[item]) { theirValue += Prices[item].buy; } else if (MetalPrices[item]){ theirValue += MetalPrices[item].buy; } else { console.log(timestamp+"Invalid Value."); theirValue += 99999; } } else if (currentstock >= StockLimit){ console.log(timestamp+item +" Stock Limit Reached") manager.on('receivedOfferChanged', (offer)=>{ community.postUserComment(offer.partner.toString(), item+ " Stock Limit Reached", (err)=>{ if(err) throw err.message }) }) } } } console.log(timestamp+"Our value: "+ourValue); console.log(timestamp+"Their value: "+theirValue); if (ourValue <= theirValue) { if (config.DevCode == "True"){ if (DevCodeCFG.Enable_Dev_Stock_Manager== "True"){ for (var i in ourItems) { var item = ourItems[i].market_name; if (stock[item]){ var file = (stock[item].instock); var obj = math.subtract(currentstock, 1) jsonfile.writeFile(file, function (err) { console.error(err) }) console.log(timestamp+' The file has been saved!'); } } for (var i in theirItems) { var item = theirItems[i].market_name; if (stock[item]){ var file = (stock[item].instock); var obj = math.add(currentstock, 1) jsonfile.writeFile(file, obj, function (err) { console.error(err) }) console.log(timestamp+' The file has been saved!'); } } } } acceptOffer(offer); } else if (ourValue > theirValue){ console.log(timestamp+"Their value was different.") declineOffer(offer); } } } If you want to try out my steam bot i got so far it is at github at github.com/LonsterMonster/Steam-Trade-Node-Bot you have to enable the developer options becasue i didnt want anyone to use the stock management that didnt know what they were doing since it is incomplete
  5. Hello, I wanted to create a bot of trades, I already have everything ready, just missing the essential, the exchanges. I already researched everything but I can not create a bot of exchanges .. the maximum where I arrived was this: manager.on('newOffer', (offer) => { if (offer.partner.getSteamID64() === 'trust steamid64') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer. Status: ${status}.`); } }); } else { offer.decline((err) => { if (err) { console.log(err); } else { console.log('Canceled offer from scammer.'); } }); } }); I wanted my bot to trade and I made a profit, but I do not really know how to do it and I do not understand a lot of code, can someone please help me? PLEASE <3
  6. Hello, How can I fix the Error: "Not Logged In" error after some hours. I know I need to login the bot again but I did some code for bot to login again. Maybe I didn't do correct. So, someone can explain me how to login again bot when the session expires? Thanks!
  7. Hi all, i need your help. i can't get the token when i want to send others a offer. which method i need to use. thanks a lot. var offer = manager.createOffer(offSteamID); var accountid = offer.partner.accountid; console.log(accountid);
  8. Currently, I'm using examples/storehouse-steam.js from the github repo, but I've tried various other attempts using this node module to no avail. I can log in perfectly fine using steam-totp to generate an auth code from my shared_secret. However, whenever I send a trade to the bot it doesn't trigger the 'newOffer' handler, even though startConfirmationChecker is called. I thought at first my identity_secret was wrong, but I checked multiple times and it's perfectly right. I've noticed a few other people have had this issue, so is there any solution or anything I should be looking out for? Thanks.
  9. did someone Encountered the case. when i login the steam. it prompt Error: Access Denied at SteamCommunity.<anonymous> (/Users/ltmacmini/Desktop/SteamBot/node-steam-tradeoffer-manager-master/node_modules/steamcommunity/components/webapi.js:15:20) Does someone can help me? thanks a lot.
  10. <--- Last few GCs ---> [9212:00000230BE791410] 222793 ms: Mark-sweep 1416.0 (1509.0) -> 1416.0 (1493.0) MB, 908.0 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 908 ms) last resort [9212:00000230BE791410] 223709 ms: Mark-sweep 1416.0 (1493.0) -> 1416.0 (1493.0) MB, 915.3 / 0.0 ms last resort <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 000002048E91CEA9 <JSObject> 1: new constructor(aka EconItem) [C:\Users\*****\Documents\*********\*********\node_modules\steam-tradeoffer-manager\lib\classes\EconItem.js:~5] [pc=0000033EC5C265F2](this=000001FA21AD43E1 <EconItem map = 000001340AAE4441>,item=000003D861277141 <Object map = 00000127A0FEE2B9>) 4: /* anonymous */(aka /* anonymous */) [C:\Users\*********\Documents\*********\*********\node_modules\steam-tradeof... FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memoryI have no idea why this is happening. Started about two-three days ago.
  11. Hello, can you tell me, how to make conditions for: Is it possible to make a condition that immediately rejects a bid on any mistake by Steam? I tried to list (offer.state) in (console.log) and always I get = 2 (to this error message - You have logged....). function processOffer(offer) { if (offer.isGlitched() || offer.state === 11) { //console.log("Offer was glitched, declining."); declineOffer(offer); } else if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); var item = ourItems[i].market_name; } else { //my_code } function acceptOffer(offer) { offer.accept((err) => { community.checkConfirmations(); //console.log("We Accepted an offer"); if (err); //console.log("There was an error accepting the offer."); }); } function declineOffer(offer) { offer.decline((err) => { //console.log("We Declined an offer"); if (err); //console.log("There was an error declining the offer."); }); } Thanks for help and answer.
  12. what i'm trying to do is , whenever bot receives an item it should log it's new item/asset id which can be done by getexchangedetails but what if a trade offer is sent and it's accept like a hour later then how would getexchangedetail would be able to return item's item/asset id ? and is there anyway i could execute received items whenever i've received an item and log it's info ?
  13. Hello, I'm trying to figure out the best way to assign different ip's to each bot. I've tried assigning a secondary IP however, I get 401 Unauthorized error when I receive trade offers. I believe the best way to go on about this is to have a dedicated VM with it's own unique IP per bot. Can anyone shed some light on this subject? Much appreciated.
  14. Hi, Is there a way to get the Steam ID of my partner after the trade is `Accepted`? I usually see this when I log the `offer` variable: partner: SteamID { universe: 1, type: 1, instance: 1, accountid: 347915927 } But his account ID is `76561198308181655` and not `347915927`. Am I missing something? Thanks.
  15. HI. This error below is a steam error or in my script? Thanks
  16. Hey Guys, I'm currently having issues with my Bot. I send out trades and if the User declines it, I want to have feedback on that. The only problem I'm currently facing is the fact, that for some reason, the "receivedOfferCahnged" does not get triggered if the User declines the offer. Here is my code, thanks in advance! manager.on('receivedOfferChanged', function(offer, oldState) { console.log(`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.log("Couldn't get received items: " + err); } else { var names = items.map(function(item) { return item.name; }); console.log("Received: " + names.join(', ')); connection.query("UPDATE tradeoffer SET status='accepted' WHERE offerid='" + offer.id + "'", function(err, rows, fields) { if (err) console.log(err); postReq("accepted", offer.id); }); } }); } if (offer.state == TradeOfferManager.ETradeOfferState.Countered) { offer.decline(); connection.query("UPDATE tradeoffer SET status='countered' WHERE offerid='" + offer.id + "'", function(err, rows, fields) { if (err) console.log(err); postReq("countered", offer.id); }); } if (offer.state == TradeOfferManager.ETradeOfferState.Declined) { connection.query("UPDATE tradeoffer SET status='declined' WHERE offerid='" + offer.id + "'", function(err, rows, fields) { if (err) console.log(err); postReq("declined", offer.id); }); } if (offer.state == TradeOfferManager.ETradeOfferState.InEscrow) { offer.decline(); connection.query("UPDATE tradeoffer SET status='escrow' WHERE offerid='" + offer.id + "'", function(err, rows, fields) { if (err) console.log(err); postReq("escrow", offer.id); }); } if (offer.state == TradeOfferManager.ETradeOfferState.InvalidItems) { connection.query("UPDATE tradeoffer SET status='invalid' WHERE offerid='" + offer.id + "'", function(err, rows, fields) { if (err) console.log(err); postReq("invalid", offer.id); }); } });
  17. I've been running my bot very well from a time but something unexpected happened last night. I check my bot before i sleep and when i woke up. I see that the bot has got 0 items. And when i checked the trades i see that a guy took away all the items from my bot. How come is it possible ?
  18. Hello, I have this error since 3 days and I didn't change anything on the scripts, I just restarted the node. Can someone help me, pls?
  19. If a SteamUser object from node-steam-user is passed into the constructor of manager, is the pollInterval overridden/disabled? I'm asking because I am having some issues with steam not giving notifications consistently on tradeoffers, so having pollInterval as a fallback would be useful.
  20. My goal is to add a specified amount of case keys to a trade offer and then send it. I'm stuck on identifying how many keys a user has and sending them a trade offer for the amount of keys called using the "amount" parameter in the function. I'd appreciate some help as I am VERY new to programming. My work: https://pastebin.com/9AwThrc0 Regards, Andrew
  21. var offer = manager.createOffer(steamID) offer.addMyItem(6081859871, 440, 2, 1) offer.setMessage("Free Scrap !") offer.send(function(err, status) { if (err) throw err console.log(status) }) This is my code, and below is the error i got, i dont get how its not working :V C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:255 throw new Error("Missing appid, contextid, or assetid parameter"); ^ Error: Missing appid, contextid, or assetid parameter at addItem (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:255:9) at TradeOffer.addMyItem (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:167:9) at SteamUser.<anonymous> (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\start.js:32:8) at emitTwo (events.js:106:13) at SteamUser.emit (events.js:191:7) at SteamUser._emitIdEvent (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-user\components\utility.js:29:12) at SteamUser._handlers.(anonymous function) (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-user\components\chat.js:281:9) at SteamUser._handleMessage (C:\Users\JingYong-PC\Desktop\Custom bots or in development\steam\node_modules\steam-user\components\messages.js:216:29) at emitThree (events.js:116:13) at CMClient.emit (events.js:194:7) Press any key to continue . . .
  22. I'm trying to send an offer to an ID with an item the bot got from another offer whenever it accepts, the code looks something like this (this is the accept function I use whenever I want to accept an offer): function acceptOffer(offer) { var newOffer = manager.createOffer(SOMEID); newOffer.addMyItem(offer.itemsToReceive[0]); offer.accept((err) => { community.checkConfirmations(); if (err) console.log("There was an error accepting the offer."); }); newOffer.send(function(err, status) {console.log('error: '+err+'status: '+status)}); console.log(newOffer.state);}; When I run this, the state logs as 1, which means invalid, so Im not entirely sure on how to do this. Any ideas?
  23. manager.on('receivedOfferChanged', (offer) => { community.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5]))}); Is the code the only thing i cannot figure out is how to make it comment only when it accepts an trade offer I tried putting it like this if (ourValue <= theirValue) { acceptOffer(offer); manager.on('receivedOfferChanged', (offer) => { community.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5]))}); } else { declineOffer(offer); }; but it didnt even comment like that And also tried function acceptOffer(offer) { offer.accept((err) => { manager.on('receivedOfferChanged', (offer) => { community.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5]))}); community.checkConfirmations(); console.log("We Accepted an offer"); if (err) console.log("There was an error accepting the offer."); }); }; and nothing am i doing something wrong?
  24. I know NodeJs works in a single thread , but the modules work with request that use sessions , then i have the doubt . I need to handle only one offer per account at a time ? Or can I make all the calls to .createOffer I need ? I tested calling the method many times and works, but is it "secure" ?
  25. hi, how i can get a message from trade offer that i send for someone? set a message: t.setMessage("Thanks for buying"); t.send((ERR, STATUS) => { if (ERR) { console.log("[Trade sending error] " + ERR); } else { console.log("[Sent]"); } }); i tried to get a message like this: manager.on("sentOfferChanged", (OFFER, OLDSTATE) => { if (OFFER.state == 2) { console.log("Trade " + OFFER.id +" was confirmed."); console.log("MY MESSAGE IN TRADERINO: " + OFFER.data("message")); } }); but OFFER.data("message") returns undefined value
×
×
  • Create New...