13 macro's for Agar.io :)

13 macro's. For feeding, linesplits, tricksplits, etc :)

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

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         13 macro's for Agar.io :)
// @version      0.5
// @description  13 macro's. For feeding, linesplits, tricksplits, etc :)
// @author       Megabyte918
// @match        http://agario.fun/?ip=127.0.0.1:8080
// @match        http://agario.fun/*
// @match        file:///C:/Users/Benutzerkonto/Desktop/wynell/index.html
// @namespace https://greasyfork.org/users/689951
// ==/UserScript==

window.addEventListener('keydown', keydown);
window.addEventListener('keyup', keyup);
document.getElementById("nick").maxLength = "9e9";

// List instructions
var i = document.getElementById("instructions");
i.innerHTML += "<center class='text-muted'>Hold <b>W</b> for macro feed</center>";
i.innerHTML += "<center class='text-muted'>Press <b>Shift</b> or <b>4</b> to split 4x</center>";
i.innerHTML += "<center class='text-muted'>Press <b>A</b> or <b>3</b> to split 3x</center>";
i.innerHTML += "<center class='text-muted'>Press <b>D</b> or <b>2</b> to split 2x</center>";
i.innerHTML += "<center class='text-muted'>Press <b>S</b> or <b>1</b> to split 1x</center>";
i.innerHTML += "<center class='text-muted'>Press <b>H</b> for horizontal linesplit</center>";
i.innerHTML += "<center class='text-muted'>Press <b>V</b> for vertical linesplit</center>";
i.innerHTML += "<center class='text-muted'>Press <b>C</b> for popsplit macro</center>";
i.innerHTML += "<center class='text-muted'>Press <b>F</b> for solo-tricksplit</center>";

// Load macros
var canFeed = false;
function keydown(event) {
    if (event.keyCode == 87) {
        // Feeding Macro (w)
        canFeed = true;
        feed();
    }
    if (event.keyCode == 71) {
        // Solo-tricksplit (g)
        for (var a = 0; a < 4; a++) {
            setTimeout(function() {
                split();
                $("body").trigger($.Event("keydown", { keyCode: 87}));
                $("body").trigger($.Event("keyup", { keyCode: 87}));
            }, a * 50);
        }
    }
    if (event.keyCode == 67) {
        // Popsplit macro (C)
        split();
        setTimeout(split, Math.random() * (350 - 200) + 200);
    }
    if (event.keyCode == 53 || event.keyCode == 83) {
        // Space macro (s or 1)
        split();
    }
    if (event.keyCode == 90) {
        // Tricksplit Macro (Z)
        for (var b = 0; b < 6; b++) setTimeout(split, b * 50);
    }
    if (event.keyCode == 65) {
        // Triplesplit Macro (a or 3)
        for (var c = 0; c < 3; c++) setTimeout(split, c * 50);
    }
    if (event.keyCode == 68) {
        // Doublesplit Macro (d or 2)
        split();
        setTimeout(split, 50);
    }
    if (event.keyCode == 72) {
        // Horizontal linesplit (h)
        X = window.innerWidth / 2;
        Y = window.innerHeight / 2;
        $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
    }
    if (event.keyCode == 86) {
        // Vertical linesplit (v)
        X = window.innerWidth / 2;
        Y = window.innerHeight / 2.006;
        $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
    }
}

// When a player lets go of W stop feeding
function keyup(event) {
    if (event.keyCode == 87) canFeed = false;
}

// Alias for W key
function feed() {
    if (!canFeed) return;
    window.onkeydown({keyCode: 87});
    window.onkeyup({keyCode: 87});
    setTimeout(feed, 0);
}

// Alias for space
function split() {
    $("body").trigger($.Event("keydown", { keyCode: 32}));
    $("body").trigger($.Event("keyup", { keyCode: 32}));
}