Jump to content
McKay Development

Eradicate

Member
  • Posts

    25
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Eradicate reacted to venfiw in i thought offer.accept do not work now   
    thank u my friend, it worked after i replace community.checkConfirmations();   
  2. Like
    Eradicate got a reaction from venfiw in i thought offer.accept do not work now   
    Whenever you get an offer you need to confirm it, or the bot does.
     
    You can do this by setting up a interval that confirms the confirmations every X seconds, but this method is deprecated I believe, you should now be using;
     
    community.acceptConfirmationForObject(data.identity_secret, offer.id, function(err){ if(err){ console.log(err); return; } console.log('Succesfully confirmed the offer.'); }) Replace with your bots identity secret and the offerid of the sent out offer.

    Edit: might of misread it.
  3. Like
    Eradicate got a reaction from Dr. McKay in i thought offer.accept do not work now   
    Whenever you get an offer you need to confirm it, or the bot does.
     
    You can do this by setting up a interval that confirms the confirmations every X seconds, but this method is deprecated I believe, you should now be using;
     
    community.acceptConfirmationForObject(data.identity_secret, offer.id, function(err){ if(err){ console.log(err); return; } console.log('Succesfully confirmed the offer.'); }) Replace with your bots identity secret and the offerid of the sent out offer.

    Edit: might of misread it.
  4. Like
    Eradicate reacted to Dr. McKay in loading someones inventory   
    You could always use node-steamcommunity's getUserInventoryContents, which is what steam-tradeoffer-manager calls anyway.
  5. Like
    Eradicate got a reaction from RamoSterious in Polling on multiple bots?   
    I'm using the following code but the 'newOffer' event is never being called and according to the docs this only works if polling is enabled, which should be.
     
    What am I doing wrong?

     
    var steamuser = require('steam-user'); var steamtotp = require('steam-totp'); var trademanager = require('steam-tradeoffer-manager'); var SteamCommunity = require('steamcommunity'); var data = [ { username:'', password:'', shasec:'/XqviM=', shacon:'++3t4fpJI=' }, { username:'', password:'', shasec:'=', shacon:'+P+kKyvfYk=' } ]; var client = []; var manager = []; var community = []; var initializeClients = function(data) { for (var index in data) { initializeClient(index); }; }; var initializeClient = function(index) { var account = data[index]; community[index] = new SteamCommunity(); client[index] = new steamuser(); manager[index] = new trademanager({ "steam": client[index], "community": community[index], "language": "en" }); console.log('[Account] [', account.username,'] is logging on'); client[index].logOn({ 'accountName': account.username, 'password': account.password, 'twoFactorCode': steamtotp.generateAuthCode(account.shasec) }); client[index].on('loggedOn', function() { console.log('[Account] Success!'); }); client[index].on('webSession', (sessionid, cookies) => { manager[index].setCookies(cookies, function(err){ console.log('API Key retrieved'); }); community[index].setCookies(cookies); community[index].startConfirmationChecker(15000, account.shacon); console.log('webSession ID: ' + sessionid); }); client[index].on('newOffer', function(offer, oldState) { console.log('[Account] [', account.username,'] has a newly received offer!'); }); }; initializeClients(data); Edit: I removed the second setCookies as it was not needed, also added an error check on setCookies but it does not throw any errors.
×
×
  • Create New...