0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

雀魂 部屋別の接続人数を取得する

0
Last updated at Posted at 2022-08-25

スクリプトの利用は、自己責任でお願いします。

雀魂の部屋別の接続人数を取得するスクリプトです。開発者ツールで実行できます。

window.fetchPlayerCount = (...modes) => {
    const ids = {
        : [2, 3, 17, 18],
        : [5, 6, 19, 20],
        : [8, 9, 21, 22],
        : [11, 12, 23, 24],
        : [15, 16, 25, 26],
        : [29, 30, 31, 32],
    };
    const req = {
        mode_list: modes.map(mode => ids[mode] || mode).flat()
    };
    app.NetAgent.sendReq2Lobby("Lobby", "fetchCurrentMatchInfo", req, (err, res) => {
        if (err || res.error) return;
        for (const match of res.matches) {
            const id = match.mode_id;
            const count = match.playing_count;
            const room = cfg.desktop.matchmode.map_[id]?.room_name_jp || "";
            const rule = cfg.game_live.select_filters.map_[200 + id]?.name2_jp || "";
            console.log(`${room} ${rule} : ${count}`);
        }
    });
};

// 玉の間(四人南)と王座の間
fetchPlayerCount(12, "");

mode_id については、こちらのページをご覧ください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?