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. This is driving me crazy, basically when my bot crates a trade that doesn't contain any of the bots items (aka only requesting items from the end user) it fails to trigger sentOfferChanged state #2, but when the trade contains any of the bots items it will trigger state #2. I want state 2 so I can send a quick link to the trade, and it works fine aslong as the trade has any of the bots items within it. Also is it sending the items fine, I see the trade offer if I look on steam for it, but simply do not get the #2 state within the bot. Here is an example: https://i.imgur.com/IRyhbzj.png Whats happening here is: - !takecards is requesting 10 cards from the bot, as you see it gets state 2 (and sends a link to the trade <like so) - I decline - !givecards makes the bot request 10 cards from me, as you see it fails to trigger state 2, but it did send the trade if I look at steam - I decline, and as seen from the oldState is says 2, but bot never trigger the #2 state.. what could I be missing? manager.on("sentOfferChanged", (offer, oldState) => { log("sentOfferChanged - ID: #"+offer.id+", state: "+offer.state+", oldState: "+oldState); if (offer.state == 2) { log("Trade sent.."); sendMessage(offer.partner, msg.TradeOfferSent.replace("{url}", "https://steamcommunity.com/tradeoffer/"+offer.id)); } else if (offer.state == 3) { log("Trade finished.."); sendMessage(offer.partner, msg.TradeOfferThanks); playStatus(); } else if (offer.state == 7) { log("Trade declined.."); } }); For kicks I also tried using the equivalent with confirmationAccepted to see if that triggers state #2 but it results in the same behavior, just doesn't make sense to me that it will only trigger state 2 when and only when bot's items are in the trade. :/ edit; after brainstorming for a bit, I suspect since its not offering items perhaps its immediately state 2 by default thus no sentOfferChanged since nothing "changed"?, perhaps I need some fancy callback within offer.send()?
  2. Hi there, I would like to ask if there's a way to force the bot to correct to nearest integer for the price. Because my bot doesn't seems like calculating the correct amount of scrap metals. For example, I am set the price to 33.88 refined metal and when it times 9, the number goes to 304.92 and i would want to know if there's a way to corr to nearest integer so that it will calculate as 305 scrap metal. Thanks very much
  3. The Error I am Getting is var item = theirItems.market_name ^ Type:Error: Cannot read property 'market_name' of undefined it is the The Trade Offer part of my Code the Code Is Below That is to Process Their Items in the Trade Offer for (var i in theirItems) { var item = theirItems[i].market_name if (stock[item]){ currentstock = stock[item].instock; StockLimit = stock[item].stocklimit;I ahve been Creating My OWn Code and not sure why the Error i got has Occurred
  4. From this: var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=...."); manager.getInventoryContents(753, 6, true, (err, inventory, currencies) => { inventory.forEach(item => { offer.addMyItem(item); }); offer.send(); }); } I'm trying to figure out how to add items from a different inventory sections into the same trade, for example send one single trade that contains both steam(753) and csgo(730) items.. all of the things I have tried so far seems to either send one or the other but never both. edit: got it working, turned out I kept putting offer.send(); inside the bottom of the first getInventoryContents call, and not inside of the nested secondary getInventoryContents call, which was resulting in only getting the items from the first call. silly me <3
  5. Hey Forum, so first off I know you can set the cancleTime in the Constructor to cancle the offer after a specific time, but I wanna know if there is a way out there to manually cancle the offer at any time. Secondly, how do I effectifly increase the API Limits of the getUserInventoryContents ? And for the last question, how do I send a tradeoffer with Items without having to use the Items I get out of the getUserInventoryContents function ? Thank you in advance Chris
  6. 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!
  7. 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?
  8. 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
  9. 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
  10. 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
  11. 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!
  12. 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);
  13. 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.
  14. Hey, guys can u help me? when i add this offer.addMyItem(inventory[0]); that not work /; // Create and send the offer var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?xxxxxxxxxxxxxx"); offer.addMyItems(inventory); offer.addMyItem(inventory[0]); offer.setMessage("Here, have some items!"); offer.send(function(err, status) { if (err) { console.log(err); return; }
  15. Hello, how can I know the assetid of a item received? I use itemsToReceived on sentOfferChanged, but I returns the old assetid, not the new one from the accepted trade. Some solution? Thanks
  16. 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.
  17. 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.
  18. <--- 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.
  19. 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 ?
  20. 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.
  21. 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 ?
  22. 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.
  23. 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); }); } });
  24. 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?
  25. 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
×
×
  • Create New...