auto respawn

autorespawn, toggle with 't'

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         auto respawn
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  autorespawn, toggle with 't'
// @author       You
// @match        https://takepoint.io/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener("keydown", toggleRespawn);

    var foot = document.getElementById("footers");
    var respawn = true;
    var overlay = document.getElementsByClassName("featured-game-container")[0];
    overlay.style = "pointer-events: none; position: fixed; top:10px; left:10px; font-family: 'Comic Sans MS', cursive, sans-serif; color: #FFFFFF; font-style: normal; font-variant: normal; z-index: 9999;";
    let stats = [];


    var observer = new MutationObserver(function(mutations){
        mutations.forEach(function(mutation){
            if(mutation.type == "attributes"){
                if(document.getElementById("footers").style.display == "flex"){
                    addScript();
                }
            }
        });
    });
    observer.observe(foot, {
        attributes: true //configure it to listen to attribute changes
    });

    function toggleRespawn(e){
        if(e.keyCode == 84){
            respawn = !respawn;
            console.log(respawn);
            overlay.innerHTML = respawn ? "<h3>respawn: true (press t to change)</h3>" : "<h3>respawn: false (press t to change)</h3>";
        }
    }
    // Your code here...

        function addScript(){
        let width = renderArea.canvasWidth;
        let height = renderArea.canvasHeight;
        let centerX = width/2;
        let centerY = height/2;
        ASM_CONSTS[7315] = function($0, $1, $2, $3) {
            let text = UTF8ToString($1);
            contexts[$0].strokeText(text, $2, $3);
            let positionX = $2 < centerX + 200 && $2 > centerX - 200;
            let positionY = $3 < centerY - 200;
            if($0 == 1 && positionX && positionY && !(stats.includes(text))){
                stats.push(text);
            }
            if(stats.length > 7){
                console.log(stats);
                if(respawn == true){
                    eg(); //play function
                }
                resetScript();
            }

        };
    }
    function resetScript(){
        stats = [];
        ASM_CONSTS[7315] = function($0, $1, $2, $3) {
            contexts[$0].strokeText(UTF8ToString($1), $2, $3);
        };
    }


})();