Greasy Fork

Greasy Fork is available in English.

로사 설맞이 자동뽑기(모든채널링)

자동뽑기 네임스페이스랑 매치 링크 수정해서 쓰셈

当前为 2025-02-02 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         로사 설맞이 자동뽑기(모든채널링)
// @author       Cactus
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  자동뽑기 네임스페이스랑 매치 링크 수정해서 쓰셈
// @match        https://lostsaga-ko.valofe.com/losaevent/2025/250122_newyear/250122_newyear.asp
// @match        http://lostsaga.mgame.com/losaevent/2025/250122_newyear/250122_newyear.asp
// @match        https://lostsaga.game.daum.net/losaevent/2025/250122_newyear/250122_newyear.asp
// @match        https://lostsaga.game.naver.com/losaevent/2025/250122_newyear/250122_newyear.asp
// @match        http://lostsaga.hangame.com/losaevent/2025/250122_newyear/250122_newyear.asp
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener('load', () => {
        setTimeout(() => {
            clickAllItems();
        }, 2000);
    });

    function clickAllItems() {
        let currentIndex = 1;
        const maxIndex = 45;

        function clickNext() {
            if (currentIndex > maxIndex) {
                console.log("모든 뽑기를 완료했습니다. 뽑기판을 초기화합니다.");
                resetBoard(); 
                return;
            }

            const topEl = document.querySelector(`#quizy-mg-item-top${currentIndex}`);
            if (topEl && topEl.offsetParent !== null) {
                // 클릭하여 뽑기 진행
                topEl.click();

                setTimeout(() => {
                    const confirmBtn = document.querySelector('#btnConfirm');
                    if (confirmBtn && confirmBtn.offsetParent !== null) {
                        confirmBtn.click();
                    }

                    setTimeout(() => {
                        const okBtn = document.querySelector('#btnOk');
                        if (okBtn && okBtn.offsetParent !== null) {
                            okBtn.click();
                        }
                        currentIndex++;
                        setTimeout(clickNext, 200);
                    }, 200);
                }, 200);
            } else {
                currentIndex++;
                setTimeout(clickNext, 200);
            }
        }

        clickNext();
    }

    function resetBoard() {
        fnBbobgiReset();

        setTimeout(() => {
            const confirmBtn = document.querySelector('#btnConfirm');
            if (confirmBtn && confirmBtn.offsetParent !== null) {
                confirmBtn.click();
            }

            setTimeout(() => {
                const okBtn = document.querySelector('#btnOk');
                if (okBtn && okBtn.offsetParent !== null) {
                    okBtn.click();
                }

                setTimeout(() => {
                    clickAllItems();
                }, 700);
            }, 700);
        }, 700);
    }
})();