Jump to content
McKay Development

mistathiccums

Member
  • Posts

    7
  • Joined

  • Last visited

mistathiccums's Achievements

  1. What is poll data? I've heard of it in your wiki, I've tried researching it, but I don't know what it is. Can you please briefly summarize it for me?
  2. So I have this function called "sendKeysBuy" that works perfectly fine, but the second function "sendKeysSell", it give me this error " ReferenceError: offer is not defined at sendKeysSell (C:\Users\Eberh\Desktop\programs\bots\EnvyMarket Trade Bot\BACKUP 3.12.22.15.42\trade_accepter_bot.js:212:3) at Timeout._onTimeout (C:\Users\Eberh\Desktop\programs\bots\EnvyMarket Trade Bot\BACKUP 3.12.22.15.42\trade_accepter_bot.js:118:6) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) " function sendKeysBuy(link, amt) { try { manager.loadInventory(440, 2, true, (err, inventory) => { if (err) { console.log(err); return; } let offer = manager.createOffer(link); let keys = inventory.filter(item => item.market_name == 'Mann Co. Supply Crate Key'); let keyAmt = keys.slice(0, amt); offer.addMyItems(keyAmt); offer.send((err, status) => { if(err) { //console.log(err); } else{ //console.log(status) } }); }); } catch (err) { } } function sendKeysSell(link, amt) { try { offer.loadPartnerInventory(440, 2, true, (err, inventory) => { if (err) { console.log(err); return; } var offer = manager.createOffer(link); let keys = inventory.filter(item => item.market_name == 'Mann Co. Supply Crate Key'); let keyAmt = keys.slice(0, amt); offer.addTheirItems(keyAmt); offer.send((err, status) => { if(err) { console.log(err); } else{ //console.log(status) } }); }); } catch (err) { console.log(err); } }
  3. do i also have to load my inventory? even if I don't want to add any of my items function sendKeysSell(link, amt) { try { offerSell.loadPartnerInventory(440, 2, true, (err, inventory) => { if (err) { console.log(err); return; } let offerSell = manager.createOffer(link); let keys = inventory.filter(item => item.market_name == 'Mann Co. Supply Crate Key'); let keyAmt = keys.slice(0, amt); offerSell.addTheirItems(keyAmt); offerSell.send((err, status) => { if(err) { console.log(err); } else{ console.log(status) } }); }); } catch (err) { } } // This still isn't working, I'm not sure what else to do. The only thing i can think of is that there are untradeable items in that inventory, and that the bot is selecting the untradeable items resulting in an error, how to fix?
  4. How do I add someone else's items to a trade offer? I know how to add my items, but how do I add my items? I've tried changing offer.addTheirItems, but it doesn't seem to work. All it does is give me an error ``` function sendKeysSell(link, amt) { try { manager.loadPartnerInventory(440, 2, true, (err, inventory) => { if (err) { console.log(err); return; } let offer = manager.createOffer(link); let keys = inventory.filter(item => item.market_name == 'Mann Co. Supply Crate Key'); let keyAmt = keys.slice(0, amt); offer.addTheirItems(keyAmt); offer.send((err, status) => { if(err) { console.log(err); } else{ console.log(status) } }); }); } catch (err) { } } function clearFile() { fs2.truncate('data.txt', 0, function(){ console.log('\nDATA.TXT FILE CLEARED\n') }); } ```
  5. It worked! Thank you so much. I know that this isn't really where I'm supposed to ask this question, but you were the only person that I thought might know. Have a good rest of your evening!
  6. I have the code in this pastebin, (https://pastebin.com/Zzv4Jifv) -> and this adds all the items in my inventory to a trade offer, how could i manipulate this code into adding a certain amount of items? say 5 tf2 keys instead of the entire inventory? I'm new to javascript and don't much knowledge of it.
×
×
  • Create New...