Git游戏

您现在的位置是:首页 > 攻略大全 > 辅助脚本

辅助脚本

超级乌龟放置2自动点击敌人、礼物和小丑龟

2025-03-06 辅助脚本3094
自己写了个自动点击脚本,但是有点小问题,可能点太快了,一秒点三次然后一个小丑龟会出两个buff,笑,觉得是bug的话可以手动把最后的300改高一点// ==UserScript==// @nam...

自己写了个自动点击脚本,但是有点小问题,可能点太快了,一秒点三次然后一个小丑龟会出两个buff,笑,觉得是bug的话可以手动把最后的300改高一点


// ==UserScript==

// @name         超级乌龟放置2自动点击敌人、礼物和小丑龟

// @namespace    http://tampermonkey.net/

// @version      2025-03-06

// @description  try to take over the world!

// @author       EtherL

// @match        https://linlei0102.github.io/Super-Turtle-Idle-Beta/

// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.io

// @grant        none

// ==/UserScript==


(function() {

    setInterval(() => {

        // 点击小丑龟

        const jester1 = document.getElementById('jesterTurtle1');

        const jester2 = document.getElementById('jesterTurtle2');

        const jester3 = document.getElementById('jesterTurtle3');

        if (jester1) {

            jesterTurtle1.click();

        };

        if (jester2) {

            jesterTurtle2.click();

        };

        if (jester3) {

            jesterTurtle3.click();

        };

        // 点击礼物

        const bPresent = document.getElementById('balloonPresent');

        if (bPresent) {

            balloonPresent.click();

            setTimeout(() => { // 延迟一秒等待礼物小游戏加载

                // 定义要点击的元素选择器

                const selector = '.mysteryPresent'; // 替换为实际的类名或选择器

                // 获取所有匹配的元素

                const elements = document.querySelectorAll(selector);

                // 遍历并点击每个元素

                elements.forEach(element => {

                    element.click();

                });

            }, 1000);

            //console.log(`已点击 ${elements.length} 个元素`);

        };

        // 点击敌人

        clickTarget("Enemy");

    }, 300);

})();


文章评论

共有0条评论来说两句吧...