Jump to content
McKay Development

mrkafr

Member
  • Posts

    6
  • Joined

  • Last visited

mrkafr's Achievements

  1. I dont know, if it answer your question, but in my inventory i have this, so all my items are tradable In partner inventory the item looks like this { "success": true, "rgInventory": { "4439006249": { "id": "4439006249", "classid": "514396540", "instanceid": "11040929", "amount": "1", "pos": 197 }, "rgCurrency": [], "rgDescriptions": { "514396540_11040929": { "appid": "440", "classid": "514396540", "instanceid": "11040929", "icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEfbRIfSSTwqCt8hMn0CvfCDrFQyYs25MED3TU5xVl_NrqwaGM_I1zBBPZdDaxorA61WyJgvpAwAJmm-bw3VeMd8A", "icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEfbRIfSSTwqCt8hMn0CvfCDrFQyYs25MED3TU5xVl_NrqwaGM_I1zBBPZdDaxorA61WyJgvpAwAJmm-bw3VeMd8A", "icon_drag_url": "", "name": "Taunt: Rock, Paper, Scissors", "market_hash_name": "Taunt: Rock, Paper, Scissors", "market_name": "Taunt: Rock, Paper, Scissors", "name_color": "7D6D00", "background_color": "3C352E", "type": "Speci\u00e1ln\u00ed taunt (\u00farove\u0148 28)", "tradable": 1, "marketable": 0, "commodity": 0, "market_tradable_restriction": "7", "market_marketable_restriction": "0", "descriptions": [ { "value": "Toto je taunt pro dva hr\u00e1\u010de. Spust\u00ed\u0161 jej kl\u00e1vesou pro taunt.\nPokud se proti sob\u011b postav\u00ed hr\u00e1\u010di z r\u016fzn\u00fdch t\u00fdm\u016f, hraje se na smrt." } ], "actions": [ { "name": "Wiki str\u00e1nka p\u0159edm\u011btu...", "link": "http:\/\/wiki.teamfortress.com\/scripts\/itemredirect.php?id=1110&lang=cs_CZ" }, { "name": "Prohl\u00e9dnout ve h\u0159e...", "link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20S%owner_steamid%A%assetid%D7658557182543768860" } ], "market_actions": [ { "name": "Prohl\u00e9dnout ve h\u0159e...", "link": "steam:\/\/rungame\/440\/76561202255233023\/+tf_econ_item_preview%20M%listingid%A%assetid%D7658557182543768860" } ], "tags": [ { "internal_name": "Unique", "name": "Unique", "category": "Quality", "color": "7D6D00", "category_name": "Kvalita" }, { "internal_name": "taunt", "name": "Taunt 1", "category": "Type", "category_name": "Typ" }, { "internal_name": "Scout", "name": "Scout", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Sniper", "name": "Sniper", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Soldier", "name": "Soldier", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Demoman", "name": "Demoman", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Medic", "name": "Medic", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Heavy", "name": "Heavy", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Pyro", "name": "Pyro", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Spy", "name": "Spy", "category": "Class", "category_name": "T\u0159\u00edda" }, { "internal_name": "Engineer", "name": "Engineer", "category": "Class", "category_name": "T\u0159\u00edda" } ], "app_data": { "def_index": "1110", "quality": "6" } }, "more": false, "more_start": false } } } I actually edited a code so i dont send a offer to same guy if it fail first time. So, Im still curious why i cant send the offer, but it doesnt have a big priority anymore EDIT: Is there any element in the JSON whtich indicate if the item was crafted in-game? Or any other element which indicate that there can be a problem with trading an item?
  2. Hello, im getting the "There was an error sending your trade offer. Please try again later. (26)" in some of mine trades even when i know, that the item exists. Im using something like this let theirInv = await promisify(manager, 'loadUserInventory', json[key].trader, appid, contextid, true); for (var i = 0; i < theirInv.length - 1; i++) { if (theirInv[i].app_data.def_index == key) { console.log("Debug: " + json[key].name + " added") offer.addTheirItem(theirInv[i]) } } The offer looks like this (before offer.send, because thats where i get error) TradeOffer { partner: SteamID { universe: 1, type: 1, instance: 1, accountid: 315218580 }, id: null, message: null, state: 1, itemsToGive: [ { id: '7722044888', assetid: '7722044888', appid: 440, contextid: '2', amount: 1 }, { id: '7722045038', assetid: '7722045038', appid: 440, contextid: '2', amount: 1 }, { id: '7722045095', assetid: '7722045095', appid: 440, contextid: '2', amount: 1 }, { id: '7722045165', assetid: '7722045165', appid: 440, contextid: '2', amount: 1 }, { id: '7722055059', assetid: '7722055059', appid: 440, contextid: '2', amount: 1 }, { id: '7722058221', assetid: '7722058221', appid: 440, contextid: '2', amount: 1 }, { id: '7722058247', assetid: '7722058247', appid: 440, contextid: '2', amount: 1 }, { id: '7722058269', assetid: '7722058269', appid: 440, contextid: '2', amount: 1 }, { id: '7722058299', assetid: '7722058299', appid: 440, contextid: '2', amount: 1 }, { id: '7722058320', assetid: '7722058320', appid: 440, contextid: '2', amount: 1 }, { id: '7722058338', assetid: '7722058338', appid: 440, contextid: '2', amount: 1 }, { id: '7722058357', assetid: '7722058357', appid: 440, contextid: '2', amount: 1 }, { id: '7722058379', assetid: '7722058379', appid: 440, contextid: '2', amount: 1 }, { id: '7722058395', assetid: '7722058395', appid: 440, contextid: '2', amount: 1 }, { id: '7722058419', assetid: '7722058419', appid: 440, contextid: '2', amount: 1 }, { id: '7722058438', assetid: '7722058438', appid: 440, contextid: '2', amount: 1 }, { id: '7722058459', assetid: '7722058459', appid: 440, contextid: '2', amount: 1 }, { id: '7722058472', assetid: '7722058472', appid: 440, contextid: '2', amount: 1 }, { id: '7722058489', assetid: '7722058489', appid: 440, contextid: '2', amount: 1 }, { id: '7722058502', assetid: '7722058502', appid: 440, contextid: '2', amount: 1 }, { id: '7722058515', assetid: '7722058515', appid: 440, contextid: '2', amount: 1 }, { id: '7722058535', assetid: '7722058535', appid: 440, contextid: '2', amount: 1 }, { id: '7722058552', assetid: '7722058552', appid: 440, contextid: '2', amount: 1 }, { id: '7722058572', assetid: '7722058572', appid: 440, contextid: '2', amount: 1 }, { id: '7722103419', assetid: '7722103419', appid: 440, contextid: '2', amount: 1 }, { id: '7707303984', assetid: '7707303984', appid: 440, contextid: '2', amount: 1 } ], itemsToReceive: [ { id: '4439006249', assetid: '4439006249', appid: 440, contextid: '2', amount: 1 } ], isOurOffer: true, created: null, updated: null, expires: null, tradeID: null, fromRealTimeTrade: false, confirmationMethod: null, escrowEnds: null, rawJson: '' }All items have ID so they "exists" (at least i think about it this way). Manual trade offer with this items works fine. I could send a txt with inventory json if needed.
  3. community.on('sessionExpired', (err) => { console.log("Relogging."); client.webLogOn((err) => { if (err) { throw err; } }); });So something like this should work, right? But this dont cover up if steam goes down, right? Then it should emit something like error >400 but how to cover it up in the code? Sorry, im new in Node. EDIT: Okay, i still getting Not Logged In, i think im doing my callback wrong. const logOnOptions = { accountName: XXX, password: XXX, }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies, (err) => { if (err) { throw err; } }); community.setCookies(cookies, (err) => { if (err) { throw err; } }); }); community.on('sessionExpired', (err) => { console.log("Relogging."); client.webLogOn((err) => { if (err) { throw err; } }); }); manager.on('newOffer', offer => { console.log("You get a trade offer") if (offer.itemsToGive.length === 0) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Donation accepted`); } }); } else if (isVerified(offer.partner.getSteamID64())) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer.`); } }); } if (pendingCaseOffer == false) { SellCheap() } })
  4. Thank you very much... I have one more question.. Sometimes I get error "Not Logged In", I know I should call logOn when that happen, but is it possible even when i dont have my secrets implemented yet? Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (C:\Works\SteamBot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:483:25) at Request._callback (C:\Works\SteamBot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Works\SteamBot\node_modules\request\request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (C:\Works\SteamBot\node_modules\request\request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (C:\Works\SteamBot\ScrapBot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:313:30) I need to input my 2 factor everytime I logOn, so I dont know if calling logOn could work if I dont type my 2 factory to console...I found function autoRelogin in Documentation which should be true on defaut, so why I do i even get logout?
  5. 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
×
×
  • Create New...