Elite

Very fast macro to enhance gameplay!

当前为 2016-11-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Elite
  3. // @namespace Macro!
  4. // @version 5.1
  5. // @description Very fast macro to enhance gameplay!
  6. // @author Unknown
  7. // @match http://agario.link/
  8. // @match http://agarz.com
  9. //@match http://agario.global
  10. // @match http://agario.sx/*
  11. //@match http://agarioplay.org/*
  12. //@match http://en.agar.bio/
  13. // @grant none
  14. // ==/UserScript==
  15. /* jshint -W097 */
  16. 'use strict';
  17. var interval;
  18. var switchy = false;
  19. $(document).on('keydown',function(e){
  20.  
  21. if(e.keyCode == 69){
  22.  
  23. if(switchy){
  24. return;
  25. }
  26. switchy = true;
  27. interval = setInterval(function() {
  28.  
  29. $("body").trigger($.Event("keydown", { keyCode: 87}));
  30. $("body").trigger($.Event("keyup", { keyCode: 87}));
  31. }, 3);//increase this number to make it fire them out slower
  32. }
  33. });
  34.  
  35. $(document).on('keyup',function(e){
  36.  
  37. if(e.keyCode == 69){
  38.  
  39. switchy = false;
  40. clearInterval(interval);
  41. return;
  42. }
  43. });
  44.  
  45. var f5 = setInterval(chat,100);
  46.  
  47. function chat(){
  48. //var w = window.mini_map_tokens[0];
  49. document.getElementById("chat_textbox").onkeyup = function() {
  50. if (this.value == "3") {
  51. this.value = "Virus Him!";
  52. }
  53. if (this.value == "4") {
  54. this.value = "Split into me!";
  55. }
  56. if (this.value == "5") {
  57. this.value = "Split him!";
  58. }
  59. if (this.value == "2") {
  60. this.value = "Where are you!?";
  61. }
  62. if (this.value == "1") {
  63.  
  64. for (var id in window.mini_map_tokens) {
  65. var token = window.mini_map_tokens[id];
  66. var x = token.x;
  67. var y = token.y;
  68. this.value = "I'm at " + String.fromCharCode(Math.floor(y*6)+65) + Math.floor((x*6)+1);
  69. }
  70. }
  71. var mouseX = event.clientX; // Get the horizontal coordinate
  72. var mouseY = event.clientY; // Get the vertical coordinate
  73. if (this.value == "6") {
  74. this.value = mouseX;
  75. }
  76. }
  77. }