kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
346 stars 332 forks source link

ProjectDiablo2 Join Lobby - Read GameServer and Difficulty #3159

Open croboy opened 2 years ago

croboy commented 2 years ago

Hello

Can you please add support for PD2 Join List.

When you refresh games, I want to able to join a game based on the GameServer or the Difficulty.

But in the current gamelist for Vanilla D2, it doesn't get those values.

getGameList: function () {
    var i, text, gameList;

    text = this.getText(4, 432, 393, 160, 173);
    //D2Bot.printToConsole(text);
    print(text);

    if (text) {
        gameList = [];

        for (i = 0; i < text.length; i += 1) {
            gameList.push({
                gameName: text[i][0],   // This puts Game name in
                players: text[i][1],          // This gets Total Players in the game
                                                                         // NEED TO ADD GAMESERVER HERE (gs)
                                                                         // NEED TO ADD GAME DIFFICULTY HERE (norm, nm, hell)
            });

        }

        //JSON.parse(JSON.stringify(gameList));
        //print(JSON.stringify(gameList));
        //D2Bot.printToConsole(JSON.stringify(gameList));

        return gameList;

    }

    return false;
}

Any help would be greatly appreciated!