Coder Social home page Coder Social logo

dota2lobbybot's Introduction

Dota2LobbyBot

Dota2 game bot for creating lobbies with invitation users and match starting.

Bot use mysql watcher plugin (based on ZongJi) and node-dota2 plugin for Dota 2, and use mysql database.
Third-party application inserts rows in database table, node application listen database and create lobby with invitation users. The application can run several bot accounts (settings from the database) and create bot after account settings insertion to database.

Mysql watcher enable

  • Enable MySQL binlog in my.cnf, restart MySQL server after making the changes.

    From MySQL 5.6, binlog checksum is enabled by default. Zongji can work with it, but it doesn't really verify it.

    # Must be unique integer from 1-2^32
    server-id = 1
    # Row format required for ZongJi
    binlog_format = row
    # Directory must exist. This path works for Linux. Other OS may require
    # different path.
    log_bin = /var/log/mysql/mysql-bin.log
    
    binlog_do_db     = dota2botdb  # Optional, limit which databases to log
    expire_logs_days = 10          # Optional, purge old logs
    max_binlog_size  = 100M        # Optional, limit log size
    
  • Create an account with replication privileges, e.g. given privileges to account root (or any account that you use to read binary logs)

    GRANT REPLICATION SLAVE, REPLICATION CLIENT, SELECT ON *.* TO 'root'@'localhost'

Installation

  • Requires Node.js v4.4.5+
  $ npm install
  $ npm run bot

dota2lobbybot's People

Contributors

sushkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dota2lobbybot's Issues

ER_NO_SUCH_TABLE

Hi,

I am encountering the error "ER_NO_SUCH_TABLE", I have already configured zongji and mysql seems to be running perfectly, it doesn't seem to be inserting the tables into the database, is there a way to fix that.

node version is 6.14.2
mysql version is 5.7.22

after leaving lobby issues

Hi , bot does not working after leaving the lobby

// Lobby timeout
if(global.config.lobby_timeout !== 'none') {
setTimeout(function () {

             // Save lobby status 'timeout lobby'
              mysql.query('update lobby set status = 3 ' +
                        'where id = ' + lobbyId, function(err, res){
                if(err) throw err;

             // Leave lobby
             bot.Dota2.leavePracticeLobby(function (err, body) {
                 console.log('leavePracticeLobby body');
                 bot.free = true;
                 bot.currentLobby.id = null;
                 console.log(body);
                 bot.Dota2.destroyLobby();
                 bot.Dota2.abandonCurrentGame();
                 util.log('[Bot #' + bot.id + '] ' + 'Bot leave lobby by timeout');
          });
    });
   }, global.config.lobby_timeout * 1000);

}

bots not ready for create other lobby . mean all bots ...

Unable to execute steamClient.connect()

Hi, thank you for your great work mate!

I can install and run the project but it seems that the bot (inserted in database) never fire the 'connected' event. If I hard code one bot and make connect() everything works.

Do you know what could be wrong?

P.S.
All the watchers are working and this is the output from console:
31 Jan 18:10:20 - START
31 Jan 18:10:20 - Found 1 bots accounts
31 Jan 18:10:25 - Init database watcher
And stuck there..

Steam IDs

I am trying to figure out do you use steamID64 for DB of users to be invited?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.