Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Dogbots V4
- // @namespace Dogbots V4
- // @version 4
- // @description A free bot service provided by Wolfie
- // @author Wolfie
- // @match *.galx.io/*
- // @match *.cellcraft.io/*
- // @match *.hagar.pe.hu/*
- // @match *.agario.top/*
- // @match *.agar.pro/play/*
- // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
- // @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
- // @resource https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
- // @grant none
- // @run-at document-end
- // ==/UserScript==
- 'use strict';
- if (localStorage.getItem("fe_uuid") === null) {
- console.log("%c Oh no, you don't seem to have a UUID. Let me generate that UUID for you", "background-color: #4286f4; color: #f4e241;");
- localStorage.setItem("fe_uuid", getUserId());
- window.location.reload();
- } else {
- console.log("%c UUID: %s", "background-color: #4286f4; color: #f4e241;", localStorage.getItem("fe_uuid"));
- }
- function getUserId() {
- function getItem() {
- return Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
- }
- return getItem() + getItem() + getItem() + getItem();
- }
- $(document).ready(function() {
- var self = io.connect("ws://142.44.240.153:8081");
- var photoText = "<div id='divContainer' style='display: table; position: absolute;bottom: 15px;right: 220px;font-family:inherit;color: rgb(255, 255, 255); box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.6) ; z-index: 9999;border-radius: 0px;min-width: 200px;background-color: rgba(0, 0, 0, 0.6); border-radius: 20px; border: 2px solid black; '><div style='display:table-cell;padding: 0px 3px 0px 5px;'><div id='gbots-header' style='font-size: 16px;margin: 5px 0px 3px 0px; right: 10px; text-align: center;'>Dogbots<span style='font-size: 20px; '><span style='font-size: 20px;'><span class='hide' id='position'> </div> <div id='gbots-dl' style='display: block; padding: 10px 0px; border-top: 1px solid rgba(255, 255, 255, 0.85098); width: auto; margin-left: auto; margin-right: 10px; text-align: left; font-size: 20px;'><i class='' style='font-size: 14px;margin-right: 10px;color:#bbb;'></i> <span id='' style='color:#bbb;'></span></div><a id='gbots-link-btn' class='' href='http://dogbots.ga/' id='position' target='_blank' style='display: block; color: rgb(255, 255, 0); background-color: rgba(0,0,0,.35); border-color: rgb(0, 0, 0); border-radius: 4px; font-size: 13px; padding: 2px; text-align: center; margin: -12px 0px 6px; font-weight: bold; text-shadow: rgb(0, 0, 0) 0px 0px 2px;'>Bots : [ <span style='color: gold;' <span id='bot_a'style='color:#FFFFFF;'> Offline</span></span> ]</a><div id='gbots-header' style='font-size: 13px;margin: 8px 0px 8px 0px;'> <span style='font-size: 15px;'><span style='font-size: 10px; text-decoration: underline;text-shadow: 2px 2px #ff0000;'></span><div><br></span></span><div style='font-size: 13px'>Bot Controls : <span id=''><span style='color:#ff8a8a;'></span></span><br></span>Split [<span><span style='color:#ff8a8a;'> E </span>] </span><br></span>Eject [<span><span style='color:#ff8a8a;'> R </span>] </span><br></span><br><span id=''><span style='color:orange;'></span>";
- $("body").append(photoText);
- var opts = {
- uuid: "",
- mouse_x: null,
- mouse_y: null,
- server: null,
- origin: null,
- extra: {
- collect_mass: false,
- rage_mode: false
- },
- hotkeys: {
- empty: true
- },
- FetchUserId: function getVisitKey() {
- return localStorage.getItem("fe_uuid");
- },
- FetchMouse: function send(callback) {
- if (window.location.origin === "http://alis.io") {
- var oneSecondTick = function open() {
- callback(getCurrentX(), getCurrentY(), window.webSocket.url, window.location.origin);
- };
- setInterval(oneSecondTick, 200);
- } else {
- WebSocket.prototype._send = WebSocket.prototype.send;
- WebSocket.prototype.send = function(data) {
- var errorMessages = this;
- this._send(data);
- var view = new DataView(data);
- if (view.byteLength === 21) {
- if (view.getInt8(0, true) === 16) {
- callback(view.getFloat64(1, true), view.getFloat64(9, true), errorMessages.url, window.location.origin);
- }
- }
- if (view.byteLength === 13) {
- if (view.getUint8(0, true) === 16) {
- callback(view.getInt32(1, true), view.getInt32(5, true), errorMessages.url, window.location.origin);
- }
- }
- };
- }
- },
- sendData: function client_send_data(data) {
- var header = {
- mouse_x: opts.mouse_x,
- mouse_y: opts.mouse_y,
- server: opts.server,
- origin: opts.origin,
- extra: opts.extra
- };
- data.emit("data", header);
- },
- sendSplit: function match(cmd) {
- cmd.emit("action", "split");
- },
- sendEject: function register(pool) {
- pool.emit("action", "eject");
- }
- };
- if (opts.FetchUserId() !== null) {
- opts.uuid = opts.FetchUserId();
- }
- opts.FetchMouse(function(local_url, goPage, proxy, error) {
- opts.mouse_x = local_url;
- opts.mouse_y = goPage;
- opts.server = proxy;
- opts.origin = error;
- });
- self.on("request_uuid", function() {
- self.emit("request_uuid", opts.uuid);
- });
- setInterval(function() {
- opts.sendData(self);
- }, 150);
- document.addEventListener("keydown", function(data) {
- if (data.key === "e") {
- opts.sendSplit(self);
- }
- if (data.key === "r") {
- opts.sendEject(self);
- }
- if (data.key === "x") {
- opts.sendAi_on(self);
- }
- if (data.key === "c") {
- opts.sendAi_off(self);
- }
- });
- var GithubImageViewer = {
- bot_a: document.getElementById("bot_a")
- };
- self.on("info", function(canCreateDiscussions) {
- GithubImageViewer.bot_a.innerHTML = canCreateDiscussions.bot_a + " / 100";
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement