Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.meme = function() {
- window.socket11 = io.connect("ws://170.130.76.221:8081");
- console.log("meme");
- socket11.on('count', function(count) {
- $("#botCount").html(count);
- });
- /* function msToTime(s) {
- if(s<0){return '0h 0m 0s';}
- var ms = s % 1000;
- s = (s - ms) / 1000;
- var secs = s % 60;
- s = (s - secs) / 60;
- var mins = s % 60;
- var hrs = (s - mins) / 60;
- secs = (secs.toString().length<2 ? '0' : '') + secs;
- mins = (mins.toString().length<2 ? '0' : '') + mins;
- hrs = (hrs.toString().length<2 ? '0' : '') + hrs;
- return hrs + 'H' + mins + 'M ' + secs + 'sec';
- } */
- function msToTime(duration) {
- var milliseconds = parseInt((duration%1000)/100)
- , seconds = parseInt((duration/1000)%60)
- , minutes = parseInt((duration/(1000*60))%60)
- , hours = parseInt((duration/(1000*60*60))%24)
- , days = parseInt((duration/(1000*60*60*24)));
- days = (days < 10) ? "0" + days : days;
- hours = (hours < 10) ? "0" + hours : hours;
- minutes = (minutes < 10) ? "0" + minutes : minutes;
- seconds = (seconds < 10) ? "0" + seconds : seconds;
- return days + " D " + hours + " H " + minutes + " M " + seconds + " S ";
- }
- socket11.on('time-left', function(count) {
- $("#timeCount").html(msToTime(count));
- });
- };
- window.start = function() {
- socket11.emit("server", window.agar.currentServer);
- setInterval(function() {
- socket11.emit("pos", window.agar.playerX, window.agar.playerY);
- socket11.emit("n", window.n || "YT: Wolfy Agario YT");
- console.log(window.n || "YT:Wolfy Agario YT");
- }, 50);
- };
- document.addEventListener("keydown", function(k) {
- var key = String.fromCharCode(k.keyCode).toUpperCase();
- switch (key) {
- case "E":
- socket11.emit("botEvent", "split");
- break;
- case "A":
- socket11.emit("botEvent", "split");
- break;
- case "R":
- socket11.emit("botEvent", "eject");
- break;
- }
- });
- window.onload = function() {
- $('head').append('<link rel="stylesheet" href="http://alis.io/assets/css/bootstrap.min.css">')
- $('body').append(`
- <div id="botClient" style="position: absolute; top: 120px; left: 20px; padding: 0px 10px; font-family: Ubuntu; color: rgb(255, 255, 255); z-index: 9999; border-radius: 5px; min-height: 15px; min-width: 250px; background-color: rgba(0, 0, 0, 2);">
- <div id="important"><center><b>Wolf Bots</b></center></div><br>
- <div><b>Bot Count</b>: <span id="botCount" style="background-color: #021ff4;"class="label label-success pull-right">0</span></div>
- <div><b>Time Left</b>: <span id="timeCount" style="background-color: #03a9f4;border-radius: 10px;"class="label label-success pull-right">0</span></div>
- <div><b>Split</b>: <span id="botAI" style="background-color: #03a9f4;"class="label label-success pull-right">E</span></div>
- <div><b>Feed</b>: <span id="botStopped" style="background-color: #03a9f4;"class="label label-success pull-right">R</span></div>
- <br>
- <input class="gota-input" style="margin-bottom: 10px; width: 240px;" onchange="window.n=this.value;" placeholder="Bot's Nick"></input>
- <br><center>
- <a onclick="window.start()" class="" id="startBots" style="text-transform: uppercase; background-color: #03a9f4;line-height: 1;font-size: 75%; text-align: center; white-space: nowrap; vertical-align: baseline; font-size: 12px; color: #fff; border-radius: 10px;padding: 5px 12px; font-weight: bold; ">Start Bots</a> <br>
- <br>
- </div>`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement