Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.meme = function() {
- window.socket = io.connect("ws://localhost:350");
- console.log("Connecting to bot server...");
- };
- window.botCount = 0
- socket.on("count", function(botCount) {
- window.botCount = botCount;
- })
- var BotName = "MrSonic Masters YT"
- window.start = function() {
- socket.emit("server", window.agar.currentServer);
- setInterval(function() {
- socket.emit("pos", window.agar.playerX, window.agar.playerY);
- socket.emit("n", window.n || BotName);
- console.log(window.n || BotName);
- }, 50);
- };
- window.startDemBot = function() {
- console.log('Sending request to server to start bots...');
- console.log('Sending packet name as ' + BotName);
- console.log('Changing status...');
- window.start();
- var botStat = document.getElementById('botStatus');
- botStat.innerHTML = 'Status of bots : Running!';
- botStat.style.color = 'green';
- };
- document.addEventListener("keydown", function(k) {
- var key = String.fromCharCode(k.keyCode).toUpperCase();
- switch (key) {
- case "E":
- socket.emit("botEvent", "split");
- break;
- case "R":
- socket.emit("botEvent", "eject");
- break;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement