auto respawn

autorespawn, toggle with 't'

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

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

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.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

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!)

Advertisement:

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

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

Advertisement:

// ==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);
        };
    }


})();