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. 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 ?
  2. 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?
  3. 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?
  4. 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.
  5. 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') })
  6. 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.
  7. 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 ?
  8. 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.
  9. 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.
  10. 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?
  11. 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.
  12. 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?
  13. 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; } });
  14. 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.
  15. 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.
  16. 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
  17. 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?
  18. 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
  19. 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 })
  20. 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' } ]
  21. I have a problem restoring cookies after a Bot looses its webSession. I call SteamUser.webLogOn but don't get an webSession callback at all. Currently I have 3 Bots running parallel on the same host. After about 1-2 days (sometimes even 7 days!) one of the three won't get a webSession ever again. The other 2 still run great and webSession fires normally for them. I setup a cronJob which refreshes the Login and calls webLogOn every hour and I also call it on sessionExpired. I logged the client error output but it won't throw any error. Code: https://pastebin.com/jYaDE45x Log: 26-07-2017 21:23:05: STEAMBOT Steam session expired: xx - Error: Not Logged In 26-07-2017 21:23:05: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 1385.8219997882843s ago 26-07-2017 21:23:05: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 00:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 9414.178000211716s ago 27-07-2017 00:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 03:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 10799.992999792099s ago 27-07-2017 03:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false 27-07-2017 06:00:00: STEAMBOT Refreshing Bot Login - xxxx - xx last try: 10800.00100016594s ago 27-07-2017 06:00:00: STEAMBOT calling webLogOn - xxxx - xx isLoggedIn=false
  22. hello everyone! I am new in node-trade-offer-manager and i wanna ask you how to add a description or message for trade. i've watched github wiki and it's said that you have to use offer.send() and the first argument is description. Boot soon i've seen that function isn't support this argument. So, how do i add a message or description of trade?
  23. I use trade link to send offer to a user not in my friend list. I add their items to the offer using the item id, it successfully adds and sends the offer. But when I see the trade offer it contains only 1 item even if I have sent more than 1. Have a look at the code below (here itemsArray contains the id of items), it was working fine when I used steamid to create tradeOffer instead of tradeUrl, but that was limited to my friend list only: const offer = manager.createOffer(tradeUrl); manager.loadInventory(appid, contextid, true, (err, myInv) => { if (err) { console.log(err); } else { manager.loadUserInventory(partnerid, appid, contextid, true, (err, theirInv) => { if (err) { console.log(err); } else { for(i=0; i<itemsArray.length; i++){ const item = theirInv.find((item) => item.assetid ==''+itemsArray[i]); console.log("got item number" + i); offer.addTheirItem(item); } offer.setMessage(`somerandom message`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } });
  24. Getting different keys in tags sometimes on tradeOffer.itemsToReceive. I'm trying to parse items after a trade to store the attributes in my database but I've noticed that I get different keys in "tags" sometimes. The functions I use are "tradeOfferManager.getOffer()" and "tradeOfferManager.on('sentOfferChanged', function (offer, oldState)". The problem is that when for example try to get type Heres the EconItem I usally get: I do tags[0].name, but in the second example the type "Key" can be found on key " localized_tag_name". Is there more too it with other keys in the "tags" array, Im not sure how to debug it since I get this rarely. EconItem { appid: 730, contextid: '2', assetid: '11196760158', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', icon_drag_url: '', name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', market_name: 'Spectrum Case Key', name_color: 'D2D2D2', background_color: '', type: 'Base Grade Key', tradable: true, marketable: true, commodity: true, market_tradable_restriction: 7, fraudwarnings: [], descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases', app_data: '' }, { type: 'html', value: ' ', app_data: '' }, { type: 'html', value: '', color: '00a000', app_data: { limited: '1' } } ], owner_descriptions: [], tags: [ { internal_name: 'CSGO_Tool_WeaponCase_KeyTag', name: 'Key', category: 'Type', category_name: 'Type' }, { internal_name: 'normal', name: 'Normal', category: 'Quality', category_name: 'Category' }, { internal_name: 'Rarity_Common', name: 'Base Grade', category: 'Rarity', color: 'b0c3d9', category_name: 'Quality' } ], id: '11196760158', actions: [], owner_actions: [], market_marketable_restriction: 0 } and heres the one I get at random times with different key(localized_tag_name): EconItem { appid: 730, contextid: '2', assetid: '11195150025', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, currency: false, background_color: '', icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases' }, { type: 'html', value: ' ' }, { type: 'html', value: '', color: '00a000' } ], tradable: false, name: 'Spectrum Case Key', name_color: 'D2D2D2', type: 'Base Grade Key', market_name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', commodity: false, market_tradable_restriction: 7, marketable: false, tags: [ { category: 'Type', internal_name: 'CSGO_Tool_WeaponCase_KeyTag', localized_category_name: 'Type', localized_tag_name: 'Key' }, { category: 'Quality', internal_name: 'normal', localized_category_name: 'Category', localized_tag_name: 'Normal' }, { category: 'Rarity', internal_name: 'Rarity_Common', localized_category_name: 'Quality', localized_tag_name: 'Base Grade', color: 'b0c3d9' } ], id: '11195181042', fraudwarnings: [], owner_descriptions: [], actions: [], owner_actions: [], market_marketable_restriction: 0} Thanks
  25. Hello, how did I counter an incoming trade offer? I know that I need to use "offer.counter()", but I don't know how to use it. I got this following code to counter an offer, but it will show an error "Cannot add item to an already-sent offer". manager.on('newOffer', function(offer) { if (offer.partner.getSteamID64() == admin){ //Counter an offer by adding new item offer.counter(); offer.addMyItem({"appid": 753, "contextid": 6, "assetid": "5222324266"}); //error here offer.send(function(err, status){ if (err){ console.log("Error: "+err); } console.log("Status: "+status) }); } } Can anyone show the correct code please? I would really appreciate it. Thanks
×
×
  • Create New...