Agario Macro Eject

An agar.io extension to eject mass quickly

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         Agario Macro Eject
// @namespace    Macro!
// @version      0.5
// @description  An agar.io extension to eject mass quickly
// @author       Vex
// @match        http://agar.io/*
// @match        http://agariohub.net/*
// @grant        none
// ==/UserScript==

var feedChar = "E"; /* The key you want to macro feed with */
var speed = 3; /* The number of milliseconds in between feeds, The greater you make it, the slower it shoots */

feedChar = feedChar.toUpperCase().charCodeAt(0);

var interval;
var switchy = false;
$(document).on('keydown', function(e) {
	if(e.keyCode == feedChar) {
		if(switchy) {
			return;
		}
		switchy = true;
		interval = setInterval(function() {
			$("body").trigger($.Event("keydown", {
				keyCode: 87
			}));
			$("body").trigger($.Event("keyup", {
				keyCode: 87
			}));
		}, speed);
	}
});

$(document).on('keyup', function(e) {
	if(e.keyCode == feedChar) {
		switchy = false;
		clearInterval(interval);
		return;
	}
});