Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2. // var BotManager = require('../lib/index');
  3. var BotManager = require('node-steam-bot-manager');
  4. var botsManager = new BotManager();
  5. var dota2 = require('dota2');
  6.  
  7.  
  8.  
  9. function Doat2Bot() {
  10.  
  11. botsManager.on('loggedInNodeSteam', function (botAccount) {
  12. console.log(botAccount.client.client)
  13. let Dota2 = new dota2.Dota2Client(botAccount.client.client, true, true);
  14. Dota2.launch();
  15.  
  16. Dota2.on('ready', function () {
  17. Dota2.requestPlayerStats('76561198031586540', function (err, response) {
  18. console.log(err, response);
  19. })
  20. });
  21.  
  22. });
  23.  
  24. botsManager.on('loadedAccount', function (username, password, account) {
  25. account.initUser(function (err) {
  26. account.Auth.loginAccount(function (err) {
  27. if (err){
  28. setTimeout(function () {
  29. self.loginAccount(account);
  30. }, 1000 * 10);
  31. }
  32. });
  33.  
  34.  
  35. });
  36. });
  37.  
  38.  
  39.  
  40. botsManager.startManager(function (err) {
  41.  
  42. });
  43. }
  44.  
  45. new Doat2Bot();
  46.  
  47. module.exports = Doat2Bot;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement