Detect Low Player Servers

A userscript that detects servers with a low amount of players in them, but also not 0 players.

  1. // ==UserScript==
  2. // @name Detect Low Player Servers
  3. // @description A userscript that detects servers with a low amount of players in them, but also not 0 players.
  4. // @author TheThreeBowlingBulbs
  5. // @match *://arras.io/*
  6. // @version 1.0.1
  7. // @namespace https://gf.qytechs.cn/users/812261
  8. // ==/UserScript==
  9.  
  10. // Modify setBar for client limit
  11. let setBar = 5;
  12.  
  13. async function detector() {
  14. let fetchN = await fetch('https://ak7oqfc2u4qqcu6i.uvwx.xyz:2222/status');
  15. let fetchC = await fetch('https://ak7oqfc2u4qqcu6i.uvwx.xyz:2222/clientCount');
  16. let server = await fetchN.json();
  17. let client = await fetchC.json();
  18. let clientCount = client.clients;
  19. let sum = 0;
  20. let servers = server.status;
  21. console.log(servers);
  22.  
  23. for (let c in servers) {
  24. if (servers[c].clients > setBar) {
  25. sum = sum + servers[c].clients;
  26. }
  27. if (servers[c].clients > 0 && servers[c].clients < setBar) {
  28. console.table(servers[c]);
  29. }
  30.  
  31. }
  32. console.log(clientCount - sum);
  33. }
  34. detector();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址