ttrs

Times Tables Rockstars bot.

Per 19-05-2023. Zie de nieuwste versie.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

// ==UserScript==
// @name         ttrs
// @namespace    https://github.com/jibstack64/ttrockstars-bot
// @version      0.1
// @description  Times Tables Rockstars bot.
// @author       OD
// @match        https://play.ttrockstars.com/*
// @icon         https://ttrockstars.com/images/logos/ttrs-header-logo.svg
// @grant        GM_log
// @require
// ==/UserScript==

(function() {
    'use strict';

    GM_log("on.");
    GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");

     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
     GM_log("122115635235757");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("465278798080778");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");
    GM_log("122115635235757");

    console.log("3")
    console.log("2")
    console.log("1")
    console.log("Initialisation complete!")




    if(typeof(String.prototype.trim) === "undefined") {
        String.prototype.trim = function() {
            return String(this).replace(/^\s+|\s+$/g, '');
        };
    }

    /*const keyMap = new Map();
    const numbers = "0123456789"
    for (var i = 0; i < 10; i++) {
        keyMap.set(numbers[i], 48+i)
    }*/

    var running = false;
    setInterval(() => {
        var equation = document.getElementsByClassName("notranslate height-100 noselect current")[0];
        var input = document.getElementsByClassName("input-holder width-100")[0];
        var enter = document.getElementsByClassName("key-ent ng-star-inserted")[0];
        var top = document.getElementsByClassName("next-game-question padding-5")[0];
        var keypad = document.getElementsByClassName("keyboard mat-white-color bg-2")[0];

        if (equation != undefined) {
            if (running) {
                return;
            }
            // start running
            running = true;
            // add "hacks enabled" message
            let el = document.createElement("a");
            el.setAttribute("href", "https://www.youtube.com/@olliedidathing1313/featured");
            el.setAttribute("target", "_blank");
            for (var i = 0; i < top.children.length; i++) {
                top.children[i].remove()
            }
            el.innerHTML = "by oliver Dawsone";
            top.appendChild(el);

            var id = setInterval(() => {
                if (running) {
                    let raw = equation.innerHTML.replace("×", "*").replace("÷", "/");
                    while (raw.includes("<!---->")) {
                        raw = raw.replace("<!---->", "");
                    }
                    raw = raw.trim();
                    let answer = String(eval(raw));

                      GM_log("bots answer: " + answer);
                      GM_log("by oliver Dawson");
                    // example: 30 <!---->÷<!----><!----> 5 <!----><!----><!----><!---->
                    /*let el = "<span class=\"notranslate ng-star-inserted\">"+String(answer)+"</span>";
                    if (!input.innerHTML.includes(el)) {
                        input.innerHTML = "<span class=\"notranslate ng-star-inserted\">"+String(answer)+"</span>" + input.innerHTML
                    }*/

                    [...answer].forEach(char => {
                        for (var row = 0; row < keypad.children.length; row++) {
                            for (var key = 0; key < keypad.children[row].children.length; key++) {
                                let elem = keypad.children[row].children[key]
                                if (elem.innerHTML.trim() == char) {
                                    elem.click();
                                    return;
                                }
                            }
                        }
                    });
                    enter.click();
                } else {
                    clearInterval(id);
                }
            }, 230);
        } else {
            running = false;
            play = document.getElementsByClassName("mat-focus-indicator margin-5 play-button stamp mat-raised-button mat-button-base mat-accent ng-star-inserted")[0];
            if (play != undefined) {
                play.click();
            }
            var gameOver = document.getElementsByClassName("stamp center mat-white-color")[0];
            if (gameOver != undefined) {
                gameOver.innerHTML = open("href", "https://play.ttrockstars.com/game/play/garage");
            }
        }

    }, 1);

})





          (1);