スクリプトの利用は、自己責任でお願いします。
雀魂の部屋別の接続人数を取得するスクリプトです。開発者ツールで実行できます。
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 については、こちらのページをご覧ください。