BITSLER ROLLHUNT BOUNTY

1

23.11.2021 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name BITSLER ROLLHUNT BOUNTY
// @name:en BITSLER ROLLHUNT BOUNTY
// @version 14.88-Release
// @description 1
// @description:en 2
// @copyright 2019, ADMINBITSLERAHUESOS
// @author ADMINBITSLERAHUESOS
// @match https://www.bitsler.app/*/dice
// @match https://www.bitsler.com/*/dice
// @grant none
// @license MIT
// @namespace 1
// @require http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==



(function ()
{
    'use strict';
    window.addEventListener('load', function()
    {
            for (let i = 0; i < 10; i++)
            {
                var input = document.createElement("input");
                input.type = "text";
                input.id  = "roll"+i;
                input.size = 5;
                document.querySelector("#game-controls-box").appendChild(input);
            }
        var checkbox = document.createElement('input');
            checkbox.type = "checkbox";
            checkbox.id  = "work";
            document.querySelector("#game-controls-box").appendChild(checkbox);
        demo();
    }, false);
    function sleep(ms) {
        return new Promise(resolve => setTimeout(resolve, ms));
    }
async function demo()
{
    while(true)
    {
        await sleep(1500);
            var rolls = [];
            for (let i = 0; i < 10; i++)
            {
                var roll = parseFloat(document.querySelector('#roll'+i).value);
                if(!isNaN(roll))
                {
                    rolls.push(roll);
                }
            }
            if(rolls.length>0)
            {
                var matches = document.querySelectorAll('div.di-bg > div > div.game-top > div.di-top-wrapper.clearfix > div > ul > li');
                matches.forEach(function(item, i, matches)
                {
                    var roll_id = parseFloat(item.getElementsByTagName('a')[0].href.replace(/\D/g,""));
                    var roll_number = parseFloat(item.getElementsByTagName('span')[0].innerText);
                    rolls.forEach(function(itm, j, rolls)
                    {
                        if(Math.abs(itm-roll_number)<=0.05)
                        {
                            if(document.querySelector('#work').checked)
                            {
                                if(Math.abs(itm-roll_number)==0)
                                {
                                                            for (let y = 0; y < 10; y++)
                                                            {
                                                                var roll = parseFloat(document.querySelector('#roll'+y).value);
                                                                if(!isNaN(roll))
                                                                {
                                                                    if(Math.abs(roll-roll_number)<=0.05)
                                                                    {
                                                                        document.querySelectorAll('iframe')[0].contentWindow.document.querySelector('#msg-input').value='#'+roll_id+' '+roll_number;
                                                                        console.log('#'+roll_id+' '+roll_number);
                                                                    }
                                                                }
                                                            }
                                }
                            }
                            else
                            {
                                                                                            for (let y = 0; y < 10; y++)
                                                            {
                                                                var roll = parseFloat(document.querySelector('#roll'+y).value);
                                                                if(!isNaN(roll))
                                                                {
                                                                    if(Math.abs(roll-roll_number)<=0.05)
                                                                    {
                                                                        document.querySelectorAll('iframe')[0].contentWindow.document.querySelector('#msg-input').value='#'+roll_id+' '+roll_number;
                                                                        console.log('#'+roll_id+' '+roll_number);
                                                                    }
                                                                }
                                                            }
                            }

                        }
                    });
                });
            }
    }
}
})();