Greasy Fork镜像 支持简体中文。

MooMoo.io gold bots

creates bots moving to you

  1. // ==UserScript==
  2. // @name MooMoo.io gold bots
  3. // @version 1.2.3
  4. // @description creates bots moving to you
  5. // @author Nuro
  6. // @match *://*.moomoo.io/*
  7. // @require https://gf.qytechs.cn/scripts/456235-moomoo-js/code/MooMoojs.js?version=1159501
  8. // @run-at document-end
  9. // @grant none
  10. // @namespace https://gf.qytechs.cn/users/761829
  11. // ==/UserScript==
  12. /*
  13. Support us on social media (follow and leave a star)
  14.  
  15. GitHub: https://moomooforge.github.io/MooMoo.js/
  16. Author: https://github.com/NuroC
  17. YouTube: https://www.youtube.com/@literallynuro
  18. Discord: https://discord.gg/NMS3YR9Q5R
  19.  
  20. */
  21. // https://moomooforge.github.io/MooMoo.js/
  22. const MooMoo = (function () {})[69];
  23.  
  24. // New variables
  25. const BOT_NAME = "Nuro";
  26. const BOT_SKIN = 1;
  27. const BOT_MOOFOLL = true;
  28. const BOT_CONNECT_EVENT = "connected";
  29. const BOT_PACKET_EVENT = "packet";
  30. const BOT_JOIN_REGION_INDEX = "join";
  31. const BOT_POSITION_UPDATE_INTERVAL = 100;
  32. const BOT_POSITION_UPDATE_PACKET = "33";
  33. const COMMAND_PREFIX = "/";
  34. const COMMAND_NAME_SEND = "send";
  35. const COMMAND_NAME_DISCONECT = "disconnect";
  36. const COMMAND_RESPONSE_SEND = "sending 4 more bots...";
  37. const COMMAND_RESPONSE_DISCONNECT = "disconnecting bots...";
  38. const BOT_COUNT_TO_ADD = 4;
  39. const IP_LIMIT = 4;
  40. const BOT_COUNT = IP_LIMIT - 1;
  41.  
  42.  
  43. const botManager = MooMoo.BotManager;
  44. let CommandManager = MooMoo.CommandManager;
  45.  
  46. CommandManager.setPrefix(COMMAND_PREFIX);
  47.  
  48. class Bot {
  49. static generateBot(botManager) {
  50. const bot = new botManager.Bot(true, {
  51. name: BOT_NAME,
  52. skin: BOT_SKIN,
  53. moofoll: BOT_MOOFOLL
  54. });
  55. bot.addEventListener(BOT_CONNECT_EVENT, server => {
  56. bot.spawn();
  57. });
  58. bot.addEventListener(BOT_PACKET_EVENT, packetData => {
  59. if (packetData.packet === "11") bot.spawn();
  60. });
  61. const { region, index } = MooMoo.ServerManager.extractRegionAndIndex();
  62. bot[BOT_JOIN_REGION_INDEX]([region, index]);
  63. botManager.addBot(bot);
  64. setInterval(() => {
  65. if (!bot.x || !bot.y) return;
  66. const playerAngle = Math.atan2(MooMoo.myPlayer.y - bot.y, MooMoo.myPlayer.x - bot.x);
  67. bot.sendPacket(BOT_POSITION_UPDATE_PACKET, playerAngle);
  68. }, BOT_POSITION_UPDATE_INTERVAL);
  69. }
  70. }
  71.  
  72. MooMoo.addEventListener(BOT_PACKET_EVENT, () => {
  73. if (MooMoo.myPlayer) {
  74. if (botManager._bots.size < BOT_COUNT) {
  75. Bot.generateBot(botManager);
  76. }
  77. }
  78. });
  79.  
  80. CommandManager.registerCommand(COMMAND_NAME_SEND, (Command, args) => {
  81. Command.reply(COMMAND_RESPONSE_SEND);
  82. for (let i = 1; i <= BOT_COUNT_TO_ADD; i++) {
  83. Bot.generateBot(botManager)
  84. }
  85. });
  86.  
  87. CommandManager.registerCommand(COMMAND_NAME_DISCONECT, (Command, args) => {
  88. Command.reply(COMMAND_RESPONSE_DISCONNECT);
  89. botManager._bots.forEach(bot => {
  90. bot.ws.close();
  91. });
  92. });

QingJ © 2025

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