Greasy Fork is available in English.

绯月ScarletMoon-自动争夺奖励

通过定时器,触发点击事件,如果被打败停止点击

// ==UserScript==
// @name         绯月ScarletMoon-自动争夺奖励
// @description 通过定时器,触发点击事件,如果被打败停止点击
// @author       waecy
// @version      1.0.2
// @namespace    waecy
// @icon         https://gitee.com/miaolapd/KF_Online_Assistant/raw/master/icon.png
// @match        *://bbs.ikfol.com/kf_fw_ig_index.php
// @match        *://bbs.9moe.com/kf_fw_ig_index.php
// @match        *://bbs.kfgal.com/kf_fw_ig_index.php
// @match        *://www.kfol.vip/kf_fw_ig_index.php
// @grant        none
// @run-at       document-end
// ==/UserScript==
    // 添加自增变量
  /*  var index = 0;
    var timer = setInterval(function() {
        // 判断是否执行过一次
        if (index == 20) {
            //关闭当前开启的timer定时器
            clearInterval(timer);
        }
        index++;
        $('.ind01').click();
        console.log('第' + index + '次');
    }, 1500);*/

    var index = 0;
    var timer = setInterval(function() {
        // 判断是否执行过一次
        if (index == 1) {
            //关闭当前开启的timer定时器
            clearInterval(timer);
        }
        index++;
        $('.ind01').eq(1).click();
        console.log('第' + index + '次');
    }, 1500);