Cursors Custome Bot Server

Go To Fleet And Click On + And Add U Fleet And Click On Server Kursor To Have Ur Own Limit Of Bots And 50 Is Very Laggy So Watch Out. And Cursors Server Will Have A Limit And It Is 2 or a bit more so thats all.

Author
He Gaming Chanel YT
Daily installs
0
Total installs
3
Ratings
0 0 0
Version
1.02
Created
Updated
License
N/A
Applies to
  • cursors.io
// ==UserScript==
// @name Cursors Custome Bot Server
// @namespace He Gaming Chanel YT
// @description Go To Fleet And Click On + And Add U Fleet And Click On Server Kursor To Have Ur Own Limit Of Bots And 50 Is Very Laggy So Watch Out. And Cursors Server Will Have A Limit And It Is 2 or a bit more so thats all.
// @include http://cursors.io/
// @version 1.02
// @grant none
// @author He Gaming Chanel YT
// @match https://cursors.io/
// @require http://cdn.jsdelivr.net/msgpack/1.05/msgpack.js
// @grant none
// @run-at document-window
// ==/UserScript==



"use strict"

// Beta client for the Zursor Master project
// Please do not paste this script itself into tampermonkey or cursors.io, instead please use the tampermonkey extension that I have provided here: https://pastebin.com/krbGjJ9v
// Especially since this script is still in development, the tampermonkey extension provided is automatically updated
window.zM = {};
window.zMDK = {};
async function wait(ms = 1000) {
setTimeout(()=>{return new Promise(async resolve => resolve());},ms);
}
window.D = document;
(async function(styles, init, cfg, dependencies, elements) {
zM.dependenciesLoaded = 0b000000;
zM.version = '0.2';

zM.cfg = cfg.raw;
zM.createConfig = cfg.createConfig;
zM.saveConfig = cfg.saveConfig;
zM.getConfig = cfg.getConfig;

zM.returnAfterUndeployed = false;
zM.antiIdle = true;

// load developer kit for plugins
// it isn't exactly done yet, I plan to only do it once I'm mostly done the whole script- and it's stable and everything
/**
* Tools for modifying the localStorage configuration
*
* .generate() - creates a default config, returns the result. Optionally, you can put the object pointer as a parameter.
* .save() - saves the parameter provided. Returns true/false dependant if errors occur.
* .get() - returns the saved config. Optionally, you can put the object pointer as a parameter.
*/
zMDK.config = {
generate: cfg.createConfig,
save: cfg.saveConfig,
get: cfg.getConfig
}

// some useful shortcuts
window.head = D.head,
window.body = D.body;

// disable all elements on page
var temp = [];
temp = body.getElementsByTagName('*');
for (var i = 0; i < temp.length; ++i) temp[i].style.display = 'none';

// delete all header elements
head.innerHTML = 'Loading...';

// add a container
temp = D.createElement('div');
temp.style.cssText = 'background:linear-gradient(45deg, rgba(33,33,33,1) 0%, rgba(66,66,66,1) 100%);position:fixed;top:0px;left:0px;width:100vw;height:100vh;';
temp.id = 'zM-container'
body.appendChild(temp);

zM.el = zMDK.elements = {};
zM.el.container = temp;

zM.fleet = [];
zM.fSel = NaN; // NaN for news

temp = styles();

zM.el.style = {
fleetTopbarContainer: temp[0]
}

zM.pos = {
mouseX: 400,
mouseY: 300,
lastMouseX: 400,
lastMouseY: 300
}

zM.useWallhack = true;

zM.ease = function(n, o, upd) {
var dist = n - o,
prog = (Date.now() - upd) / 100,
maxMin = Math.min(Math.max(0, prog), 1);

return o + (maxMin ** 2 * (3 - 2 * maxMin)) * dist;
}

zM.isLoading = false;

zM.game = {
m28nCursorsIP: '157.245.226.69:2828'
}

zM.asyncWaitUntil = async function(toEval) {
return new Promise(resolve => {
var temp = setInterval(()=>{if (eval(toEval)) resolve(), clearInterval(temp);},1);
});
}

zM.origin = (location.hostname === 'cursors.io' || location.href.startsWith('file:///')) ? 'cursors' : location.hostname === 'kursors.io' ? 'kursors' : 'localhost';

zM.movement = 1;

// I decided to load the loading bars before the loading API therefore it works for when the script is starting first
var temp = [D.createElement('div'), D.createElement('div'), D.createElement('div'), D.createElement('div')];

temp[0].className = 'zM-loading-outer';
zM.el.container.appendChild(temp[0]);

temp[1].className = 'zM-loading-title';
temp[0].appendChild(temp[1]);
temp[1].textContent = 'Loading...'

temp[2].className = 'zM-loading-bar-outer';
temp[0].appendChild(temp[2]);

temp[3].className = 'zM-loading-bar-fill';
temp[2].appendChild(temp[3]);

zM.el.loadingOuter = temp.shift();
zM.el.loadingTitle = temp.shift();
zM.el.loadingBarFill = temp.pop();

// loading bar API
zM.setLoadingWidth = function(width = 50) {
zM.el.loadingBarFill.style.width = 'calc(' + width + '%' + ' - 10px)';
}

zM.showLoading = function() {
zM.el.loadingOuter.style.display = 'block';
D.getElementsByTagName('title')[0].textContent = 'Loading...';
}

zM.hideLoading = function() {
zM.el.loadingOuter.style.display = 'none';
D.getElementsByTagName('title')[0].textContent = 'zM / No fleets yet';
}

zM.setLoadingTitle = function(title) {
zM.el.loadingTitle.textContent = title;
}

zM.clickQueue = 0;

zM.updateTabs = function() { // updates fleet tabs
zM.el.fleetTopbarOuter.innerHTML = '';
zM.el.fleetTopbarContainer.innerHTML = '';
zM.el.fleetTopbarOuter.appendChild(zM.el.fleetTopbarContainer);
zM.el.fleetTopbarOuter.appendChild(zM.el.fleetTopbarAdd);
zM.el.fleetTopbarAdd.appendChild(zM.el.fleetTopbarAddImg);
zM.el.fleetTopbarOuter.appendChild(zM.el.fleetTopbarHint);

for (var i = 0; i < zM.fleet.length; ++i) {
var f = zM.fleet[i];
zM.fleet[i].el.container.style.display = 'none';
zM.el.fleetTopbarContainer.innerHTML += `
${zM.fSel === i ? '(Selected)' : ''} #${i} / (${f.botsOpened}/${f.maxBots}) / ${f.name}
`;
}

zM.fleet[zM.fSel].updateTabs();
}

zM.createFleet = function(ip, port, ipv6, startbots, maxbots, name) {
var nF;
var temp2 = function() {
clearInterval(temp[2]);
clearInterval(temp[3]);
clearInterval(temp[4]);
zM.setLoadingWidth(0);
zM.setLoadingTitle('Server isn\'t a valid cursors.io server.');
nF.bots.forEach(X => X.socket.close());
setTimeout(zM.hideLoading, 2000);
};
var temp = [
setInterval(() => {
if (!zM.isLoading) clearInterval(temp[0]), zM.isLoading = true, temp[1]();
}, 50),

function() {
zM.el.fleetTopbarHint.style.display = 'none';
zM.el.fleetPromptOuter.style.display = 'none';
zM.setLoadingWidth(0);
zM.setLoadingTitle('Creating fleet object...');
zM.showLoading();



nF = new zM.Fleet(ip, port, ipv6, startbots, maxbots, name);

zM.fSel = zM.fleet.push(nF) - 1;

nF.createGUI(zM.el.container)
temp[2] = setInterval(() => {
zM.setLoadingTitle('Connecting bots ('+nF.botsOpened+'/'+startbots+')');
zM.setLoadingWidth(100/startbots*nF.botsPinged);
if (nF.verified === false) temp2();
else if (startbots <= nF.botsPinged) {
clearInterval(temp[2]);
setTimeout(async ()=>{
zM.isLoading = false;
zM.hideLoading(),
zM.updateTabs(),
zM.el.game.style.display = 'block';
await zM.asyncWaitUntil('!(Date.now() % 50)');
nF.startTickLoop();
}, 800);
}
}, 50);
}
]
}

// get IP
if (window.m28n) {
m28n.findServerPreference('cursors', (err, end ) => {
if (err) {
console.error(err);
} else {
zM.game.m28nCursorsIP = (end.ipv4 || ('[' + end.ipv6 + ']')) + ':2828';
}
});
}







zM.clog = [

//
//
// Beta v0.2
//
// VVVVVVVVV

{
type: 'title',
msg: 'Beta v0.2'
},
{
type: 'desc',
msg: 'I added several new improvements, mostly to the GUI, a full list is below:

'
},
{
type: 'desc',
msg: '• Added a changelog and a little information thingy at the bottom right. I plan to make it contain more information soon'
},
{
type: 'desc',
msg: '• Cursor movements are now synchronized, they should no longer split up'
},
{
type: 'desc',
msg: '• Script now loads the Nova Flat font used'
},
];






dependencies.forEach(i => zM.el.container.appendChild(temp = D.createElement('script'), temp.src = 'http://pastebin.com/raw/'+i, temp));

zM.setLoadingWidth(0);
zM.showLoading();
zM.setLoadingTitle('Loading dependencies...');
temp = setInterval(() => {
if (zM.dependenciesLoaded == 0b111111) {
zM.setLoadingWidth(100);
clearInterval(temp);
elements.forEach(i => i(zM.el.container));
head.getElementsByTagName('title')[0].textContent = 'zM / No fleets yet' // run all element functions
setTimeout(zM.hideLoading,800);
} else {
var done = 0;
for (var i = 0; i < temp.length; ++i) {
done += (zM.dependenciesLoaded & 2**i) ? 1 : 0;
}
zM.setLoadingWidth((100 / 16 * done) | 0);
}
}, 50);

init();
})(
function() { // add