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. 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.
  2. 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?
  3. 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 . . .
  4. 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?
  5. 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" ?
  6. 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
  7. Hi, I'm getting a duplicate response error (EResult: 29), when I call the following code. manager.getInventoryContents(730, 2, true, (err, inventory) => { if (err) { console.log(err); }else{ //other code here, never reached } }); This is run multiple times, but I need to be able to run it multiple times as the inventory is changing. How do I resolve this error ? Do I need a delay between requests ?
  8. For a project of mine, it is very useful to be able to load the app_data of items in inventories to characterize the items. Because it is not particularly important right now, I have been relying on the deprecated loadInventory method to get the data. One of my ideas was to just send dummy tradeoffers to an alt and read it as a tradeoffer, but this seems excessive. Do you have any suggestions for getting the app_data of inventories?
  9. Hi guys, and Meredith I have question. Why automatic cancel is so inaccurate? When i have 1 minute it cancels offer in 1-2 minutes and when i have 5 minutes it cancels offer in even bigger interval.
  10. Is it possible to get if the fraudwarning includes "This item has been renamed"? I tried item.fraud.includes, item.fraudwarning.includes, item.warning.includes, item.info.includes, but none of them worked. Is it possible to do it?
  11. So, we have: https...partner=12345&token=abcde Here is no problem to check "partner" part of url. But how to test "token"? I wanna notice user about not valid link on link edit stage, far before offer sent.
  12. So i used the bot i created on a limited steam account and guess what ? nothing happened when a newoffer was received. manager.on('newOffer', (offer) => { console.log('We received 1 new trade offer, will start checking the traded items') })
  13. Is there a way to get assetid or instance/class id , when traded is done ? like when bot received an item that moment is there a way to get assetid or instance/class id ?
  14. Is there any way to get actions for items when receiving a trade? Offer.itemsToReceive and offer.itemsToGive seem to be missing the actions of items by default. For example, after accepting an offer when we do getReceivedItems() it has the getActions option. Loading inventories and finding the correct ids works, but I was hoping there might be a better way to do this.
  15. Hi Doc, For this API: http://steamcommunity.com/inventory/76561198291430376/730/2 - do you have any idea how much is the call limit per IP? And I think I've read that if you send cookies - that you can bypass this limit? Is there a library you would recommend? And is this function getInventoryContents Does that use the API link described above? Thanks.
  16. I've been trying to figure this out for a while. How do I see the offers that the bot received while it was offline?
  17. Hello, I'm using this to get "getExchangeDetails" but it always give me undefined:1 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] ^ This is the code, thank you! offer.getExchangeDetails(function(err, status, tradeInitTime, receivedItems, sentItems) { if(!err){ console.log("Trade status is " + status + ", init time " + tradeInitTime + ", and we received " + receivedItems.length + " items and sent " + sentItems.length + " items."); }else{ err; } });
  18. Hi, Would just like to ask if there is a method to cancel the trade? I noticed there is a method `getOffers` to get all active trades (1) , but I don't see where I can manually cancel the trade? Is there a way to do that? Thanks.
  19. Sometimes when i use getUserDetails(), i receive the error: has declined your trade request. why i'm getting this error, and how may i avoid this?
  20. Hey I was wondering why my bot doesn't work at a 100% rate. I was interested if it is possible to farm the number on my profile of "Trades Made". So I tried coding me a bot that would send a TF2 item from one account to my second account and sends another TF2 item back after the first trade has finished. When he sends it back to the first account, the first account will accept it and send another item back to the second account, and so on ... I started putting code together with slight success. After running the bot 5 times, finally one successful trade. Now after 30 more tries, no success. I tried adding a *sleep* module for steam to handle me receiving the trade and accepting it. No success. var colors = require("colors"); var sleep = require('system-sleep'); const SteamUser1 = require("steam-user"); const SteamTotp1 = require("steam-totp"); const SteamCommunity1 = require("steamcommunity"); const TradeOfferManager1 = require("steam-tradeoffer-manager"); const client1 = new SteamUser1(); const community1 = new SteamCommunity1(); const manager1 = new TradeOfferManager1({ steam: client1, community: community1, language: "en" }); const SteamUser2 = require("steam-user"); const SteamTotp2 = require("steam-totp"); const SteamCommunity2 = require("steamcommunity"); const TradeOfferManager2 = require("steam-tradeoffer-manager"); const client2 = new SteamUser2(); const community2 = new SteamCommunity2(); const manager2 = new TradeOfferManager2({ steam: client2, community: community2, language: "en" }); const logOnOptions1 = { accountName: "", password: "", twoFactorCode: SteamTotp1.generateAuthCode("=") }; const logOnOptions2 = { accountName: "", password: "", twoFactorCode: SteamTotp2.generateAuthCode("=") }; client1.logOn(logOnOptions1); client1.on("loggedOn", () => { console.log("Logged into Steam as 11th".yellow); client1.setPersona(SteamUser1.Steam.EPersonaState.Offline); }); client2.logOn(logOnOptions2); client2.on("loggedOn", () => { console.log("Logged into Steam as ruben".blue); client2.setPersona(SteamUser2.Steam.EPersonaState.Offline); }); client1.on("webSession", (sessionid, cookies1) => { manager1.setCookies(cookies1); community1.setCookies(cookies1); community1.startConfirmationChecker(10000, "="); sendRandomItem1(); }); client2.on("webSession", (sessionid, cookies2) => { manager2.setCookies(cookies2); community2.setCookies(cookies2); community2.startConfirmationChecker(10000, "="); }); client1.on("friendMessage", function(steamid, message) { console.log("11th: ".yellow + "Friend message from " + steamid.getSteam3RenderedID() + ": " + message); }); client2.on("friendMessage", function(steamid, message) { console.log("ruben: ".blue + "Friend message from " + steamid.getSteam3RenderedID() + ": " + message); }); function sendRandomItem1() { manager1.loadInventory(440, 2, true, (err, inventory1) => { if (err) { console.log(err); } else { const offer1 = manager1.createOffer(""); const item1 = inventory1[Math.floor(Math.random() * inventory1.length - 1)]; offer1.addMyItem(item1); offer1.setMessage("There ya go!".yellow); offer1.send((err, status) => { if (err) { console.log(err); } else { console.log("Sent offer.".yellow); // sleep(5000); } }); } }); } function sendRandomItem2() { manager2.loadInventory(440, 2, true, (err, inventory2) => { if (err) { console.log(err); } else { const offer2 = manager2.createOffer(""); const item2 = inventory2[Math.floor(Math.random() * inventory2.length - 1)]; offer2.addMyItem(item2); offer2.setMessage("There ya go!".blue); offer2.send((err, status2) => { if (err) { console.log(err); } else { console.log("Sent offer.".blue); // sleep(5000); } }); } }); } manager1.on("newOffer", (offer1) => { if (offer1.partner.getSteamID64() === "id64 of account2") { offer1.accept((err, status1) => { if (err) { console.log(err); } else { console.log("Accepted offer.".yellow); console.log("Making a new offer.".yellow); sendRandomItem1(); } }); } }); manager2.on("newOffer", (offer2) => { if (offer2.partner.getSteamID64() === "id64 of account1") { offer2.accept((err, status2) => { if (err) { console.log(err); } else { console.log("Accepted offer.".blue); console.log("Making a new offer.".blue); sendRandomItem2(); } }); } }); Console (no error) Logged into Steam as ruben Logged into Steam as 11th Sent offer.
  21. I'm have some problem with method getOffers(). I need to know market_hash_name each skin. Perhaps there is a method that returns active offers including market_hash_name or you can somehow learn it separately. Thank you in advance.
  22. Hey, I know this is an old topic, so I did quite a bit of research. - I am not using a confirmation key twice (I guess?), since I am only calling direct confirmations for offers that just got accepted - also not accepting multiple offers at once in one bot. - I am not being rate-limited (Yes, I have two bots running parallel in separated scripts, but both start up delayed and both confirmationcheckers are disabled (just like polling for offers)). - I am defenitly logged in. - I have seen "The tag for accepting needs to be allow, not accept." on another post, same error. This doesn't apply to me right? Here is how I am handling offers: manager.on('newOffer', function(offer) { if(acceptArray.indexOf(offer.id) >= 0){ //Check if the offer ID is listed in an array console.log("Offer ID is listed! Accepting!") offer.accept(function(err) { if (err) { console.log("Accepting failed:" + err); } else { console.log("Accepted! (" + offer.id + ")") setTimeout(function(){ // Small delay between accepting and confirming. Does this make sense? community.acceptConfirmationForObject(config.identitysecret, offer.id, function(err){ if(err){ console.log("Confirming failed: " + err); } else { console.log("Confirmed! (" + offer.id + ")"); } }); }, 250); } }); } else { console.log("Offer ID unknown. Ignoring this trade!") } });It doesn't fail for every offer, but sometimes! Is there anything else I could do to fix this? - Thanks! Edit: Just came to my mind. My bot is running on a RaspberryPi: Raspberries dont have a battery, so they can't keep up with the system time when they are fully turned off. Sometimes after starting it, it has problems to update the system time automatically. Sadly I dont know if this problem occured together with the problem I described above. Just generally: Could a wrong system time cause a "could not act on confirmation" error in some way? Edit2: Okay, also happens on my windows PC where the system time is 100% right. Any more ideas?
  23. how would i send a trade offer based on instance id and classid to fetch a specific item from my bot's inventory and ofc i'll be using item id too but it'll be hard to distinguish between item of same kind but different details
  24. When i using function getOfferrs i received Error: socket hang up . Please help , Thanks ! getOffers(1, function(err, sent, received){ // I received Error: socket hang up })
  25. Hello, I use offer.addMyItems(temp); It gives me the following error: { Error: There was an error sending your trade offer. Please try again later. (26) The thing is that I can send this items manually but with the addMyItems no. This is the array, maybe there's an error? Thanks. [ { assetid: 'Foo', market_hash_name: 'Glove Case', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'MAC-10 | Silver (Factory New)', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'Nova | Sand Dune (Field-Tested)', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'Nova | Sand Dune (Field-Tested)', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'P90 | Sand Spray (Field-Tested)', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'USP-S | Night Ops (Minimal Wear)', price: 0, appid: 730, contextid: '2' }, { assetid: 'Foo', market_hash_name: 'Glove Case', price: 0, appid: 730, contextid: '2' } ]
×
×
  • Create New...