NeyBots Client v3.0(LONG)1

Private Bots

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/30385/199263/NeyBots%20Client%20v30%28LONG%291.js

  1. // ==UserScript==
  2. // @name NeyBots Client v3.0(LONG)1
  3. // @namespace Beta!@!
  4. // @version 3.0
  5. // @description Private Bots
  6. // @author FreeTzYT
  7. // @match *.alis.io/*
  8. // @match *.dual-agar.online/*
  9. // @match *.agarz.com/*
  10. // @match *.agar.bio/*
  11. // @match *.nbk.io/*
  12. // @match *.gaver.io/*
  13. // @match *.cellcraft.io/*
  14. // @match *.gota.io/*
  15. // @match *.germs.io/*
  16. // @match *.galx.io/*
  17. // @match *.germs.io/*
  18. // @match *.happyfor.win/*
  19. // @match *.agarios.org/*
  20. // @match *.6gem.pw/*
  21. // @match *.agar.red/*
  22. // @match *.gkclan.tk/*
  23. // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
  24. // @grant none
  25. // @run-at document-start
  26. // ==/UserScript==
  27.  
  28. function httpGet(theUrl) {
  29. var xmlHttp = new XMLHttpRequest();
  30. xmlHttp.open("GET", theUrl, false); // false for synchronous request
  31. xmlHttp.send(null);
  32. return xmlHttp.responseText;
  33. }
  34.  
  35. console.log('Connection Established');
  36. console.log('NeyBots Script Loaded ~');
  37.  
  38. fokseBotServer = '127.0.0.1:8081'; // server connection
  39. setTimeout(function() {
  40. window.__WebSocket = window.WebSocket;
  41. window.fakeWebSocket = function(){
  42. return {
  43. readyState: 0
  44. };
  45. };
  46. window._WebSocket = window.WebSocket = function(ip){
  47. return new window.fakeWebSocket(ip);
  48. };
  49. window.__botclonsData = {};
  50. window.__botclonsData.mx = 0;
  51. window.__botclonsData.my = 0;
  52. window.__botclonsData.ml = 0;
  53. window.__botclonsData.ma = 0;
  54. window.__botclonsData.mb = 0;
  55. window.__botclonsData.wa = false;
  56. window.__botclonsData.sa = false;
  57. window.__botclonsData.w = null;
  58. window.__botclonsData.s = null;
  59. window.__botclonsData.aX = -1;
  60. window.__botclonsData.aY = -1;
  61. window.__botclonsData.p = 0;
  62. window.__botclonsData.q = false;
  63. window.__botclonsData.socketaddr = null;
  64. window.addEventListener("load",function(){
  65. // êîن èيوهêٍèيمà
  66. if(!window.OldSocket)
  67. OldSocket = window.__WebSocket;
  68. window._WebSocket = window.WebSocket = window.fakeWebSocket = function(ip){
  69. var ws = new OldSocket(ip);
  70. ws.binaryType="arraybuffer";
  71. var fakeWS = {};
  72. for(var i in ws)
  73. fakeWS[i] = ws[i];
  74. fakeWS.send = function(){
  75. //console.log("ïهًهُâàٍèëè ïهًهنà÷َ! " + arguments[0]);
  76. var msg = new DataView(arguments[0]);
  77. if ((msg.byteLength > 0) && (msg.getUint8(0) != 16)) {
  78. var f = "";
  79.  
  80. for (var i = 0; i < msg.byteLength; i++) {
  81. var a = msg.getUint8(i);
  82. f = f + a + " ";
  83. }
  84. console.log(f);
  85. } else {
  86. window.__botclonsData.mx = msg.getInt16(1, true);
  87. window.__botclonsData.my = msg.getInt16(3, true);
  88. window.__botclonsData.ml = msg.byteLength;
  89. }
  90.  
  91.  
  92. if(msg.byteLength==21){ // Most clones
  93. if(msg.getInt8(0, true) == 16){
  94. window.__botclonsData.mx = msg.getFloat64(1, true);
  95. window.__botclonsData.my = msg.getFloat64(9, true);
  96. window.__botclonsData.ml = msg.byteLength;
  97. }
  98. } else {
  99. if(msg.byteLength==13){ // Agar.re, agarioforums.io, alis.io
  100. if(msg.getUint8(0, true) == 16){
  101. window.__botclonsData.mx = msg.getInt32(1, true);
  102. window.__botclonsData.my = msg.getInt32(5, true);
  103. window.__botclonsData.ml = msg.byteLength;
  104. }else{
  105. if(msg.byteLength>4){ // gota.io
  106. /*if(msg.getUint8(0, true) == 16){
  107. window.__botclonsData.mx = msg.getInt16(1, true);
  108. window.__botclonsData.my = msg.getInt16(3, true);
  109. window.__botclonsData.ml = msg.byteLength;
  110. }*/
  111. }
  112. }
  113. }
  114. }
  115. return ws.send.apply(ws, arguments);
  116. };
  117. ws.onmessage = function(){
  118. //console.log("ïهًهُâàٍèëè ïًèهى! " + arguments[0].data);
  119. var msg = new DataView(arguments[0].data);
  120. if(msg.byteLength>16){ // Most clones
  121. if(msg.getUint8(0, true) == 64){
  122. window.__botclonsData.ma = msg.getFloat64(1, true);
  123. window.__botclonsData.mb = msg.getFloat64(9, true);
  124. }
  125. }
  126. if (fakeWS.onmessage && fakeWS.onmessage.apply(ws, arguments));
  127. };
  128. ws.onopen = function(){
  129. window.__botclonsData.socketaddr = ws.url;
  130. //console.log("ïهًهُâàٍèëè ïîنêë÷هيèه!");
  131. fakeWS.readyState = 1;
  132. fakeWS.onopen.apply(ws, arguments);
  133. };
  134. ws.onclose = function(){
  135. fakeWS.onclose.apply(ws, arguments);
  136. };
  137. return fakeWS;
  138. };
  139. if(location.origin=="http://mgar.io")connect("");
  140. });
  141. var real_minx = -7071;
  142. var real_miny = -7071;
  143. var real_maxx = 7071;
  144. var real_maxy = 7071;
  145. var lastsent = {
  146. minx: 0,
  147. miny: 0,
  148. maxx: 0,
  149. maxy: 0
  150. };
  151.  
  152. function valcompare(Y, Z) {
  153. return 0.01 > Y - Z && -0.01 < Y - Z;
  154. }
  155. var socket = io.connect('ws://'+ fokseBotServer);
  156. var canMove = true;
  157. var movetoMouse = true;
  158. var moveEvent = new Array(2);
  159. var canvas = document.getElementById("canvas");
  160. last_transmited_game_server = null;
  161. socket.on('force-login', function(data) {
  162. socket.emit("login", {
  163. "uuid": client_uuid,
  164. "type": "client"
  165. });
  166. transmit_game_server();
  167. });
  168.  
  169. $( "#canvas" ).after( "<div style='background-color: #000000; -moz-opacity: 0.4; -khtml-opacity: 0.4; opacity: 0.8; filter: alpha(opacity=40); zoom: 1;border: 2px solid rgb(66, 139, 202); border-radius: 12px; top: 200px; left: 10px; display: block; position: absolute; text-align: center; font-size: 15px; color: #ffffff; padding: 5px; font-family: Ubuntu;'> <div style='color:#ffffff; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'><a>NeyBots-FeederClient</a></div> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'><br>Bots: <a id='minionCount' > </a><br>Chat Spam: <a id='dfdghehfj'>C</a> </div> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'> </div> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'><br>Target: <a id='Target' >0,0</a> </div> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'> </div> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'> </div>" );
  170. socket.on('spawn-count', function(data) {
  171. document.getElementById('minionCount').innerHTML = data;
  172. });
  173. var client_uuid = "GFB";
  174. /*if (client_uuid === null) {
  175. console.log("generating a uuid for this user");
  176. client_uuid = ""; var ranStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  177. for (var ii = 0; ii < 15; ii++) client_uuid += ranStr.charAt(Math.floor(Math.random() * ranStr.length));
  178. localStorage.setItem('client_uuid', client_uuid)
  179. }*/
  180. socket.emit("login", client_uuid);
  181. $("#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>');
  182.  
  183. function isMe(cell) {
  184. for (var i = 0; i < window.agar.myCells.length; i++) {
  185. if (window.agar.myCells[i] == cell.id) {
  186. return true;
  187. }
  188. }
  189. return false;
  190. }
  191.  
  192. function getCell() {
  193. var me = [];
  194. for (var key in window.agar.allCells) {
  195. var cell = window.agar.allCells[key];
  196. if (isMe(cell)) {
  197. me.push(cell);
  198. }
  199. }
  200. return me[0];
  201. }
  202.  
  203. function emitPosition() {
  204. console.log(client_uuid);
  205. document.getElementById('Target').innerHTML=(~~(window.__botclonsData.mx-window.__botclonsData.ma))+","+(~~(window.__botclonsData.my-window.__botclonsData.mb));
  206. socket.emit("pos", {
  207. "x": window.__botclonsData.mx-window.__botclonsData.ma,
  208. "y": window.__botclonsData.my-window.__botclonsData.mb,
  209. "l": window.__botclonsData.ml,
  210. "p": window.__botclonsData.p,
  211. "c": window.__botclonsData.q
  212. });
  213. }
  214.  
  215. function toggleMovement() {
  216. canMove = !canMove;
  217. switch (canMove) {
  218. case true:
  219. canvas.onmousemove = moveEvent[0];
  220. moveEvent[0] = null;
  221. canvas.onmousedown = moveEvent[1];
  222. moveEvent[1] = null;
  223. break;
  224. case false:
  225. canvas.onmousemove({
  226. clientX: innerWidth / 2,
  227. clientY: innerHeight / 2
  228. });
  229. moveEvent[0] = canvas.onmousemove;
  230. canvas.onmousemove = null;
  231. moveEvent[1] = canvas.onmousedown;
  232. canvas.onmousedown = null;
  233. break;
  234. }
  235. }
  236. interval_id = setInterval(function() {
  237. emitPosition();
  238. }, 100);
  239. interval_id2 = setInterval(function() {
  240. transmit_game_server_if_changed();
  241. }, 5000);
  242. document.addEventListener('keydown', function(e) {
  243. var key = e.keyCode || e.which;
  244. switch (key) {
  245. case 16:
  246. if(!window.__botclonsData.sa){
  247. window.__botclonsData.sa=true;
  248. window.__botclonsData.s = setInterval(function() {
  249. $("body").trigger($.Event("keydown", {
  250. keyCode: 32
  251. }));
  252. $("body").trigger($.Event("keyup", {
  253. keyCode: 32
  254. }));
  255. }, 10);
  256. }
  257. break;
  258. case 87:
  259. if (!window.__botclonsData.wa) {
  260. window.__botclonsData.wa = true;
  261. window.__botclonsData.w = setInterval(function() {
  262. $("body").trigger($.Event("keydown", {
  263. keyCode: 87
  264. }));
  265. $("body").trigger($.Event("keyup", {
  266. keyCode: 87
  267. }));
  268. }, 10);
  269. }
  270. break;
  271. case 65:
  272. window.__botclonsData.p--;
  273. document.getElementById('ismoveToMouse').innerHTML = window.__botclonsData.p;
  274. break;
  275. case 67:
  276. window.__botclonsData.q=!window.__botclonsData.q;
  277. if(window.__botclonsData.q) { document.getElementById('dfdghehfj').innerHTML = "On"; } else { document.getElementById('dfdghehfj').innerHTML = "Off"; }
  278. break;
  279. case 69:
  280. socket.emit("cmd", {
  281. "name": "split"
  282. });
  283. break;
  284. case 82:
  285. socket.emit("cmd", {
  286. "name": "eject"
  287. });
  288. break;
  289. case 80:
  290. window.__botclonsData.p++;
  291. document.getElementById('ismoveToMouse').innerHTML = window.__botclonsData.p;
  292. break;
  293. }
  294. });
  295. document.addEventListener('keyup', function(e) {
  296. var key = e.keyCode || e.which;
  297. console.log(key);
  298. switch (key) {
  299. case 87:
  300. clearInterval(window.__botclonsData.w);
  301. window.__botclonsData.wa=false;
  302. break;
  303. case 16:
  304. clearInterval(window.__botclonsData.s);
  305. window.__botclonsData.sa=false;
  306. break;
  307. }
  308. });
  309.  
  310. function transmit_game_server_if_changed() {
  311. if (last_transmited_game_server != window.__botclonsData.socketaddr) {
  312. transmit_game_server();
  313. }
  314. }
  315.  
  316. function transmit_game_server() {
  317. last_transmited_game_server = window.__botclonsData.socketaddr;
  318. socket.emit("cmd", {
  319. "name": "connect_server",
  320. "ip": window.__botclonsData.socketaddr,
  321. "origin": location.origin
  322. });
  323. }
  324. var mouseX = 0;
  325. var mouseY = 0;
  326. $("body").mousemove(function(event) {
  327. mouseX = event.clientX;
  328. mouseY = event.clientY;
  329. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址