Greasy Fork is available in English.

Name Bots

Bot Script

Αυτός ο κώδικας δεν πρέπει να εγκατασταθεί άμεσα. Είναι μια βιβλιοθήκη για άλλους κώδικες που περιλαμβάνεται μέσω της οδηγίας meta // @require https://update.greasyfork.org/scripts/26908/172230/Name%20Bots.js

  1. // ==UserScript==
  2. // @name Name Bots
  3. // @namespace a
  4. // @version 1.0
  5. // @description Bot Script
  6. // @match *.5bz.esy.es/*
  7. // @match http://forceagar.com/
  8. // @match *.3rb.be/*
  9. // @match *.flaresserver.tk/*
  10. // @match *.cellcraft.io/*
  11. // @match *.agar.pro/*
  12. // @match *.cellcraft.io/*
  13. // @match *.agarios.com/*
  14. // @match *.agarz.com/*
  15. // @match *.mgar.io/*
  16. // @match *.agariogame.club/*
  17. // @match *.old.ogarul.io/*
  18. // @match *.agarly.com/*
  19. // @match *.bubble.am/*
  20. // @match *.gota.io/*
  21. // @match *.vincebots.ovh/*
  22. // @match *.agariohub.net/*
  23. // @match *.agarserv.com/*
  24. // @match *.agarioservers.ga/*
  25. // @match *.alis.io/*
  26. // @match http://astr.io/
  27. // @match *.agarioplay.org/*
  28. // @match *.agario.city/*
  29. // @match *.germs.io/*
  30. // @match *.agarioforums.io/*
  31. // @match *.agariofun.com/*
  32. // @match *.agar.pro/*
  33. // @match *.agarabi.com/*
  34. // @match *.warball.co/*
  35. // @match *.agariom.net/*
  36. // @match *.agar.re/*
  37. // @match *.www.agardark.com/*
  38. // @match *.easyagario.com/*
  39. // @match *.playagario.org/*
  40. // @match *.agariofr.com/*
  41. // @match *.agariowun.com/*
  42. // @match *.agarios.org/*
  43. // @match *.agariowun.com/*
  44. // @match *.usagar.com/*
  45. // @match *.agarioplay.com/*
  46. // @match *.privateagario.net/*
  47. // @match *.agariorage.com/*
  48. // @match *.blong.io/*
  49. // @match *.agar.blue/*
  50. // @match *.agar.bio/*
  51. // @match *.agario.se/*
  52. // @match *.nbkio.com/*
  53. // @match *.agariohit.com/*
  54. // @match *.agariomultiplayer.com/*
  55. // @match *.agariogameplay.com/*
  56. // @match *.agariowow.com/*
  57. // @match *.bestagario.net/*
  58. // @match *.tytio.com/*
  59. // @match *.kralagario.com/*
  60. // @match *.agario.zafer2.com/*
  61. // @match *.agarprivateserver.net/*
  62. // @match *.agarca.com/*
  63. // @match *.agarioplay.mobi/*
  64. // @match *.agario.mobi*
  65. // @match *.abs0rb.me/*
  66. // @match *.agario.us/*
  67. // @match *.agariojoy.com/*
  68. // @match *.agario.ch/*
  69. // @match *.ioagar.us/*
  70. // @match *.play.agario0.com/*
  71. // @match *.agario.run/*
  72. // @match *.agarpvp.us/*
  73. // @match *.agario.pw/*
  74. // @match *.ogario.net/*
  75. // @match *.ogario.net/*
  76. // @match *.nbk.io/*
  77. // @match *.agariofly.com/*
  78. // @match *.agario.info/*
  79. // @match *.inciagario.com/*
  80. // @match *.agar.io.biz.tr/*
  81. // @match *.agariown.com/*
  82. // @match *.agario.dk/*
  83. // @match *.agario.lol/*
  84. // @match *.agario.gen.tr/*
  85. // @match *.agarioprivateserver.us/*
  86. // @match *.agariot.com/*
  87. // @match *.agarw.com/*
  88. // @match *.agario.city/*
  89. // @match *.agario.ovh/*
  90. // @match *.feedy.io/*
  91. // @match *.agar.io/*
  92. // @match *.agar.zircon.at/*
  93. // @match *.minemoorealt.github.io/*
  94. // @match *.agario.bz/*
  95. // @match *.cell.sh/*
  96. // @match *.c0nsume.me/*
  97. // @match *.agar.red/*
  98. // @match *.trydox.com/*
  99. // @match *.agarix.esy.es/*
  100. // @match *.blobsonline.com/*
  101. // @match *.agr-game.ml/*
  102. // @match *.xgario.com/*
  103. // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
  104. // @require https://code.jquery.com/jquery-3.1.1.min.js
  105. // @grant none
  106. // @run-at document-start
  107. // ==/UserScript==
  108.  
  109.  
  110. setTimeout(function() {
  111. window.__WebSocket = window.WebSocket;
  112. window.fakeWebSocket = function(){return {readyState: 0}};
  113. window._WebSocket = window.WebSocket = function(ip){return new window.fakeWebSocket(ip);};
  114. window.__botclonsData = {};
  115. window.__botclonsData.mx = 0;
  116. window.__botclonsData.my = 0;
  117. window.__botclonsData.ml = 0;
  118. window.__botclonsData.ma = 0;
  119. window.__botclonsData.mb = 0;
  120. window.__botclonsData.wa = false;
  121. window.__botclonsData.sa = false;
  122. window.__botclonsData.w = null;
  123. window.__botclonsData.s = null;
  124. window.__botclonsData.aX = -1;
  125. window.__botclonsData.aY = -1;
  126. window.__botclonsData.p = 0;
  127. window.__botclonsData.q=false;
  128. window.__botclonsData.socketaddr = null;
  129. window.addEventListener("load",function(){
  130. // код инжектинга
  131. if(!window.OldSocket)
  132. OldSocket = window.__WebSocket;
  133. window._WebSocket = window.WebSocket = window.fakeWebSocket = function(ip){
  134. var ws = new OldSocket(ip);
  135. ws.binaryType="arraybuffer"
  136. var fakeWS = {};
  137. for(var i in ws)
  138. fakeWS[i] = ws[i];
  139. fakeWS.send = function(){
  140. //console.log("перехватили передачу! " + arguments[0]);
  141. var msg = new DataView(arguments[0]);
  142. /*if((msg.byteLength>0)&&(msg.getUint8(0)!=16)){
  143. var f="";
  144. for(var i=0;i<msg.byteLength;i++){
  145. var a=msg.getUint8(i);
  146. f=f+a+" ";
  147. }
  148. console.log(f);
  149. }*/
  150. if(msg.byteLength==21){ // Most clones
  151. if(msg.getInt8(0, true) == 16){
  152. window.__botclonsData.mx = msg.getFloat64(1, true);
  153. window.__botclonsData.my = msg.getFloat64(9, true);
  154. window.__botclonsData.ml = msg.byteLength;
  155. }
  156. } else {
  157. if(msg.byteLength==13){ // Agar.re, agarioforums.io, alis.io
  158. if(msg.getUint8(0, true) == 16){
  159. window.__botclonsData.mx = msg.getInt32(1, true);
  160. window.__botclonsData.my = msg.getInt32(5, true);
  161. window.__botclonsData.ml = msg.byteLength;
  162. }else{
  163. if(msg.byteLength>4){ // gota.io
  164. if(msg.getUint8(0, true) == 16){
  165. window.__botclonsData.mx = msg.getInt16(1, true);
  166. window.__botclonsData.my = msg.getInt16(3, true);
  167. window.__botclonsData.ml = msg.byteLength;
  168. }
  169. }
  170. }
  171. }
  172. }
  173. return ws.send.apply(ws, arguments);
  174. };
  175. ws.onmessage = function(){
  176. //console.log("перехватили прием! " + arguments[0].data);
  177. var msg = new DataView(arguments[0].data);
  178. if(msg.byteLength>16){ // Most clones
  179. if(msg.getUint8(0, true) == 64){
  180. window.__botclonsData.ma = msg.getFloat64(1, true);
  181. window.__botclonsData.mb = msg.getFloat64(9, true);
  182. }
  183. }
  184. fakeWS.onmessage && fakeWS.onmessage.apply(ws, arguments);
  185. };
  186. ws.onopen = function(){
  187. window.__botclonsData.socketaddr = ws.url;
  188. //console.log("перехватили подключение!");
  189. fakeWS.readyState = 1;
  190. fakeWS.onopen.apply(ws, arguments);
  191. };
  192. ws.onclose = function(){
  193. fakeWS.onclose.apply(ws, arguments);
  194. };
  195. return fakeWS;
  196. }
  197. if(location.origin=="http://cellcraft.io")connect("");
  198. })
  199. var real_minx = -7071;
  200. var real_miny = -7071;
  201. var real_maxx = 7071;
  202. var real_maxy = 7071;
  203. var lastsent = {
  204. minx: 0,
  205. miny: 0,
  206. maxx: 0,
  207. maxy: 0
  208. };
  209.  
  210. function valcompare(Y, Z) {
  211. return 0.01 > Y - Z && -0.01 < Y - Z
  212. }
  213. var socket = io.connect('ws://localhost:8081');
  214. var canMove = true;
  215. var movetoMouse = true;
  216. var moveEvent = new Array(2);
  217. var canvas = document.getElementById("canvas");
  218. last_transmited_game_server = null;
  219. socket.on('force-login', function(data) {
  220. socket.emit("login", {
  221. "uuid": client_uuid,
  222. "type": "client"
  223. });
  224. transmit_game_server()
  225. });
  226. $( "#canvas" ).after( "<div style='position: absolute; top: 30px; left: 30px; color: #010; font-family: Ubuntu; width: 240px; height: 140px; background-image: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(184,184,184,0.4) 100%); padding: 20px; '><center> <span style='border-radius: 25px; background-color: #f1c40f; padding: 5px 70px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>BestBots</span><br><br> <span style='padding: 5px; color: #2c3e50;'>Bots: </span><span id='minionCount' style='border-radius: 25px; background-color: #f1c40f; padding: 5px 12px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>0</span><br><br> <span style='padding: 5px; color: #2c3e50;'>Position: </span><span id='gh45nmvsy' style='border-radius: 25px; background-color: #f1c40f; padding: 5px 12px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>0,0</span></center> <div id='dfdghehfj' style='display: none;'> </div> <div id='ismoveToMouse' style='display: none;'> </div><br><br> </div>" );
  227. socket.on('spawn-count', function(data) {
  228. document.getElementById('minionCount').innerHTML = data
  229. });
  230. var client_uuid = localStorage.getItem('client_uuid');
  231. if (client_uuid == null) {
  232. console.log("generating a uuid for this user");
  233. client_uuid = ""; var ranStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  234. for (var ii = 0; ii < 15; ii++) client_uuid += ranStr.charAt(Math.floor(Math.random() * ranStr.length));
  235. localStorage.setItem('client_uuid', client_uuid)
  236. }
  237. socket.emit("login", client_uuid);
  238. $("#instructions").replaceWith('<br><div class="input-group"><span class="input-group-addon" id="basic-addon1">UUID</span><input type="text" value="' + client_uuid + '" readonly class="form-control"</div>');
  239.  
  240. function isMe(cell) {
  241. for (var i = 0; i < window.agar.myCells.length; i++) {
  242. if (window.agar.myCells[i] == cell.id) {
  243. return true
  244. }
  245. }
  246. return false
  247. }
  248.  
  249. function getCell() {
  250. var me = [];
  251. for (var key in window.agar.allCells) {
  252. var cell = window.agar.allCells[key];
  253. if (isMe(cell)) {
  254. me.push(cell)
  255. }
  256. }
  257. return me[0]
  258. }
  259. var skin_var = 0;
  260.  
  261. function emitPosition() {
  262. console.log(client_uuid);
  263. document.getElementById('gh45nmvsy').innerHTML=(~~(window.__botclonsData.mx-window.__botclonsData.ma))+","+(~~(window.__botclonsData.my-window.__botclonsData.mb));
  264. socket.emit("pos", {
  265. "x": window.__botclonsData.mx-window.__botclonsData.ma,
  266. "y": window.__botclonsData.my-window.__botclonsData.mb,
  267. "l": window.__botclonsData.ml,
  268. "p": window.__botclonsData.p,
  269. "c": window.__botclonsData.q
  270. })
  271. }
  272.  
  273. function toggleMovement() {
  274. canMove = !canMove;
  275. switch (canMove) {
  276. case true:
  277. canvas.onmousemove = moveEvent[0];
  278. moveEvent[0] = null;
  279. canvas.onmousedown = moveEvent[1];
  280. moveEvent[1] = null;
  281. break;
  282. case false:
  283. canvas.onmousemove({
  284. clientX: innerWidth / 2,
  285. clientY: innerHeight / 2
  286. });
  287. moveEvent[0] = canvas.onmousemove;
  288. canvas.onmousemove = null;
  289. moveEvent[1] = canvas.onmousedown;
  290. canvas.onmousedown = null;
  291. break
  292. }
  293. }
  294. interval_id = setInterval(function() {
  295. emitPosition()
  296. }, 100);
  297. interval_id2 = setInterval(function() {
  298. transmit_game_server_if_changed()
  299. }, 5000);
  300. document.addEventListener('keydown', function(e) {
  301. var key = e.keyCode || e.which;
  302. switch (key) {
  303. case 16:
  304. if(!window.__botclonsData.sa){
  305. window.__botclonsData.sa=true;
  306. window.__botclonsData.s = setInterval(function() {
  307. $("body").trigger($.Event("keydown", { keyCode: 32}));
  308. $("body").trigger($.Event("keyup", { keyCode: 32}));
  309. }, 10);
  310. }
  311. break;
  312. case 87:
  313. if(!window.__botclonsData.wa){
  314. window.__botclonsData.wa=true;
  315. window.__botclonsData.w = setInterval(function() {
  316. $("body").trigger($.Event("keydown", { keyCode: 87}));
  317. $("body").trigger($.Event("keyup", { keyCode: 87}));
  318. }, 10);
  319. }
  320. break;
  321. case 65:
  322. window.__botclonsData.p--;
  323. document.getElementById('ismoveToMouse').innerHTML = window.__botclonsData.p;
  324. break;
  325. case 45:
  326. window.__botclonsData.q=!window.__botclonsData.q;
  327. if(window.__botclonsData.q) { document.getElementById('dfdghehfj').innerHTML = "On"; } else { document.getElementById('dfdghehfj').innerHTML = "Off"; }
  328. break;
  329. case 69:
  330. socket.emit("cmd", {
  331. "name": "split"
  332. })
  333. break;
  334. case 82:
  335. socket.emit("cmd", {
  336. "name": "eject"
  337. })
  338. break;
  339. case 80:
  340. window.__botclonsData.p++;
  341. document.getElementById('ismoveToMouse').innerHTML = window.__botclonsData.p;
  342. break
  343. }
  344. });
  345. document.addEventListener('keyup', function(e) {
  346. var key = e.keyCode || e.which;
  347. console.log(key);
  348. switch (key) {
  349. case 87:
  350. clearInterval(window.__botclonsData.w);
  351. window.__botclonsData.wa=false;
  352. break;
  353. case 16:
  354. clearInterval(window.__botclonsData.s);
  355. window.__botclonsData.sa=false;
  356. break;
  357. }
  358. });
  359.  
  360. function transmit_game_server_if_changed() {
  361. if (last_transmited_game_server != window.__botclonsData.socketaddr) {
  362. transmit_game_server()
  363. }
  364. }
  365.  
  366. function transmit_game_server() {
  367. last_transmited_game_server = window.__botclonsData.socketaddr;
  368. socket.emit("cmd", {
  369. "name": "connect_server",
  370. "ip": window.__botclonsData.socketaddr,
  371. "origin": location.origin
  372. })
  373. }
  374. var mouseX = 0;
  375. var mouseY = 0;
  376. $("body").mousemove(function(event) {
  377. mouseX = event.clientX;
  378. mouseY = event.clientY
  379. });
  380. client_uuid = "MineMoore123";
  381.  
  382. }, 2200);