normal tanks!

tiny tanks v2

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         normal tanks!
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  tiny tanks v2
// @author       el bismüt
// @match        *diep.io*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==
function face(X, Y, width) {
    let red = parseInt(ctx.fillStyle.slice(1,3), 16).toString();
    let green = parseInt(ctx.fillStyle.slice(3,5), 16).toString();
    let blue = parseInt(ctx.fillStyle.slice(5,7), 16).toString();
    if (red < blue || (green > 150 && blue > 200)) {
        ctx.fillStyle = '#030303';
        ctx.beginPath();
        ctx.ellipse(X - width / 2, Y - width / 8,width / 3, width / 3, 0, 0, Math.PI * 2);
        ctx.fill();
        ctx.beginPath();
        ctx.ellipse(X + width / 2, Y - width / 8, width / 3, width / 3, 0, 0, Math.PI * 2);
        ctx.fill();
        ctx.fillStyle = '#FBFBFB';
        ctx.beginPath();
        ctx.ellipse(X - width / 2 - width / 3 * Math.cos(7*Math.PI/6), Y - width / 8 + width / 2.7 * Math.sin(7*Math.PI/6), width / 9, width / 24, 0, 0, 2*Math.PI);
        ctx.fill();
        ctx.beginPath();
        ctx.ellipse(X + width / 2 - width / 3 * Math.cos(7*Math.PI/6), Y - width / 8 + width / 2.7 * Math.sin(7*Math.PI/6), width / 9, width / 24, 0, 0, 2*Math.PI);
        ctx.fill();
    }
    else {
        ctx.fillStyle = '#030303';
        ctx.beginPath();
        ctx.ellipse(X - width / 2, Y - width / 8, width / 3, width / 3, 0, 0, 5 * Math.PI / 4);
        ctx.fill();
        ctx.beginPath();
        ctx.ellipse(X + width / 2, Y - width / 8, width / 3, width / 3, 0, 7 * Math.PI / 4, Math.PI);
        ctx.fill();
        ctx.fillStyle = '#FBFBFB';
        ctx.beginPath();
        ctx.ellipse(X - width / 2 - width / 3 * Math.cos(6*Math.PI/6), Y - width / 8 + width / 2.7 * Math.sin(6*Math.PI/6), width / 9, width / 24, 0, 0, 2*Math.PI);
        ctx.fill();
        ctx.beginPath();
        ctx.ellipse(X + width / 2 - width / 3 * Math.cos(6*Math.PI/6), Y - width / 8 + width / 2.7 * Math.sin(6*Math.PI/6), width / 9, width / 24, 0, 0, 2*Math.PI);
        ctx.fill();
    }
    ctx.strokeStyle = '#030303';
    ctx.lineWidth = width / 20;
    ctx.beginPath();
    ctx.moveTo(X - width / 12, Y + width / 4);
    ctx.lineTo(X + width / 12, Y + width / 4);
    ctx.stroke();
    ctx.beginPath();
    ctx.ellipse(X, Y, width, width, 0, 0, 2*Math.PI);
}
var ctx = document.getElementById("canvas").getContext("2d");
ctx.arc = function(x, y, r) {face(x, y, r)}