Greasy Fork is available in English.
creates 3 bots moving towards you
当前为
// ==UserScript==
// @name MooMoo.io gold bots
// @version 1
// @description creates 3 bots moving towards you
// @author Nuro
// @match *://*.moomoo.io/*
// @require http://greasyfork.icu/scripts/456235-moomoo-js/code/MooMoojs.js?version=1141350
// @run-at document-end
// @grant none
// @namespace http://greasyfork.icu/users/761829
// ==/UserScript==
// access the MooMoo.js API
const MooMoo = (function () {})[69]
const IP_LIMIT = 4;
const BOT_COUNT = IP_LIMIT - 1;
const botManager = MooMoo.BotManager;
const spawnBot = botManager => {
if (botManager._bots.size < BOT_COUNT) {
console.log(`Spawning bot ${botManager._bots.size + 1} of ${BOT_COUNT}`);
const bot = new botManager.Bot(true, {
name: "Nuro",
skin: 1,
moofoll: true
});
bot.addEventListener("connected", server => {
bot.spawn();
});
bot.addEventListener("packet", packetData => {
if (packetData.packet === "11") bot.spawn();
});
const { region, index } = MooMoo.ServerManager.extractRegionAndIndex();
bot.join([region, index]);
botManager.addBot(bot);
setInterval(() => {
if (!bot.x || !bot.y) return;
const playerAngle = Math.atan2(MooMoo.myPlayer.y - bot.y, MooMoo.myPlayer.x - bot.x);
bot.sendPacket("33", playerAngle);
}, 100);
}
};
MooMoo.addEventListener("packet", () => {
if (MooMoo.myPlayer) spawnBot(botManager);
});