MacroS & auto settings for bomb agar

MacroS for bomb.agar.bio

当前为 2019-07-29 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         MacroS & auto settings for bomb agar
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  MacroS for bomb.agar.bio
// @author       #EMBER (htps://fb.com/embermaxx)
// @match        http://bomb.agar.bio/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
         $("body").dblclick(function(){
         keyPress(68);
  });
newIns();
var interval_gold, interval_bomb, key = false, key2 = false, att=20, X=0, Y=0, k=0;
    function keyPress(code)
    {
        $("body").trigger($.Event("keydown", { keyCode: code}));
        $("body").trigger($.Event("keyup", { keyCode: code}));
    }

    function autoSplit() {
        $("body").trigger($.Event("keydown", { keyCode: 32}));
        $("body").trigger($.Event("keyup", { keyCode: 32}));
    }

    function newIns()
    {
	var instr = document.getElementById("instructions");
        instr.style.lineHeight = "1.15";
        instr.style.fontSize = "14px";
        instr.style.marginTop = "-30px";
        instr.style.color = "white";
        instr.innerHTML +='<center><span> Press <b>Ctrl+Shift+Z</b> for auto settings / <b>ACTIVATION</b></span></center>'+
    '<center><span> Mouse <b>Double click</b> to eject bomb</span></center>'+
    '<center><span><span> Press <b>F</b> to freeze movement</span></span></center>'+
    '<center><span> Press <b>R</b> for macro bombs</span></center>' +
    '<center><span> Press <b>Q</b> for macro gold</span></center>' +
    '<center><span><span> Press <b>4</b> to split 4x</span></span></center>'+
	'<center><span><span> Press <b>3</b> to split 3x</span></span></center>'+
	'<center><span><span> Press <b>2</b> to split 2x</span></span></center>'

    }
$(document).on('keydown',function(e){

    //Macro Gold
if(e.keyCode == 81){ //Q
if(key)return;
key = true;
interval_gold = setInterval(function() {
keyPress(65);
}, 10);
//===================================
    //Macro Bomb
}else if(e.keyCode == 82){ //R
    if(key2)return;

key2 = true;
interval_bomb = setInterval(function() {
keyPress(68)
}, 100);
// Tricksplit -> key4
}else if(e.keyCode == 52){
    autoSplit();
    setTimeout(autoSplit, att);
    setTimeout(autoSplit, att*2);
    setTimeout(autoSplit, att*3);
}
// Triplesplit -> key3
else if (e.keyCode == 51) {
    autoSplit();
    setTimeout(autoSplit, att);
    setTimeout(autoSplit, att*2);
}
// Doublesplit -> key2
else if (e.keyCode == 50) {
    autoSplit();
    setTimeout(autoSplit, att);
}
//Freeze -> F
    else if (e.keyCode == 70){
        X = window.innerWidth/2;
        Y = window.innerHeight/2;
        $("canvas").trigger($.Event("mousemove", {clientX: X, clientY: Y}));
    }
//===============================
else if(e.keyCode == 90 && e.shiftKey && e.ctrlKey){
$('#nick').val('Your nick'); //Your nick here
setDarkTheme(true); //Dark theme: true
setSmooth(true); //Smooth render: true
setSkins(false); //Skins: false
    $('#screenshot, #account_button, .controls, #klan, #level, #stats').remove();
    $("#gamemode").replaceWith(
        '<style>.emberstyle a, #ip_newserver{border-radius:5px;}</style><div class="emberstyle"><a onclick="reconnect()" class="btn btn-info reconnnect">Reconnect</a>&nbsp;<a onclick="doubleplay()"'+
        ' class="btn btn-success">Force Play</a>&nbsp;<a onclick="agarmen()" class="btn btn-default">Agarmen</a>&nbsp;'+
        '<div style="margin-top:4px;"><input type="text" style="width: 58%;float: left; text-align:center; "'+
        ' class="form-control" placeholder="Server IP:Port" id="ip_newserver" value="37.187.76.129:2401"/>&nbsp;<a onclick="connect2newserver();"'+
        ' class="btn btn-danger btn-md">Connect</a></div></div>');
    $(".adsbygoogle").replaceWith('<center><h3>Script by #EMBER</h3></center>');
    $("#chat_textbox").after('<a style="position:fixed;bottom:7px;left:24%; border-radius:5px;" onclick="$("#emojidiv").toggle();" class="btn btn-default" data-toggle="modal" data-target="#bilgilerModal">Emoji</a>');
    $("#bilgilerModal").html('<div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header">Emoji<button type="button" class="close" data-dismiss="modal">&times;</button></div><div class="modal-body"><h3>'+
                             '<button></button>&nbsp;<button></button>&nbsp;<button></button>&nbsp;<button></button>&nbsp;<button></button>&nbsp;</h3></div></div></div>');
    $('.btn-play-guest').text('PLAY');
    $('.btn-spectate').text('Spectate');
    $('.row div.col-sm-6').eq(6).html('<label><input type="checkbox" onchange="setChatHide($(this).is(\':checked\'));"><span>Hide chatbox</span></label>');
}
})
    $(function () {
    $('<script>')
    .attr('type', 'text/javascript')
    .text(
        "function connect2newserver(){setServer(document.getElementById('ip_newserver').value);}function doubleplay(){var nickname=document.getElementById('nick').value; setNick(nickname); setTimeout(setNick(nickname),250);setTimeout(setNick(nickname),500); return false;} function agarmen(){window.open('https://fb.com/agarmencom', '_blank');} function reconnect(){setServer('37.187.76.129:2402');$('.reconnnect').text('Connecting...');setTimeout(function(){setServer('37.187.76.129:2401');$('.reconnnect').text('Reconnect')},500)}")
    .appendTo('body');
})

$(document).on('keyup',function(e){
if(e.keyCode == 81){
key = false;
clearInterval(interval_gold);
return;
}else if (e.keyCode == 82){
key2 = false;
clearInterval(interval_bomb);
return;
}
})
//Script by #EMBER
})();