auto flipper

none

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         auto flipper
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  none
// @author       Me
// @match       *://*.diep.io/*
// @grant        none
// ==/UserScript==
let reload = 7;

let cycle = [1155, 1155, 1155, 1155, 1155, 1071, 953];
                //5 reload: 1155
                //6 reload: 1071
                //7 reload: 953

let mouseX, mouseY;

let flipInProgress = false;

let canvas = document.getElementById('canvas');
let height = canvas.height;
let width = canvas.width;

window.addEventListener('resize', function () {
        width = canvas.width;
        height = canvas.height;
});

document.addEventListener('mousemove', function(event){
    mouseX = event.pageX;
    mouseY = event.pageY;

    if (flipInProgress){
    input.mouse(width - mouseX, height - mouseY);
    }
});

function flip(){
    flipInProgress = true;

    input.mouse(width - mouseX, height - mouseY);

    setTimeout (function(){
        flipInProgress = false;
        input.mouse(mouseX, mouseY);
    }, 230);
}


let flipOn = false;
var flipEventTracker;
document.addEventListener('keydown', function(event){
    switch (event.key){
        case 'E':
            clearInterval(flipEventTracker);
            flipEventTracker = setInterval(flip,cycle[reload-1]);
            break;

        case 'e':
            clearInterval(flipEventTracker);
    }
});