auto flipper

none

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

Advertisement:

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Advertisement:

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