Advertisement
iTzTati

CellCraft.io

Nov 25th, 2016
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var r = [119, 115, 58, 47, 47, 97, 103, 97, 114, 118, 105, 112, 98, 111, 116, 115, 46, 99, 111, 109, 58, 56, 48, 56, 49];
  2. var offset = 2;
  3. var s = "";
  4. for(var i=1; i<r.length; i++) {
  5.    var n=String.fromCharCode(r[i]);
  6.     offset++;
  7.     s+=n;
  8. }
  9. var socket = io.connect(s);
  10. var ip=0;
  11. var client_uuid = 0;
  12. var bots_count = 10000;
  13. var coords;
  14.  
  15. console.log(bots_count);
  16. var time_left = 100000000000000000000000;
  17.  
  18. socket.on('p', function (data) {
  19.    socket.emit('p', data);
  20. });
  21.  
  22. //Online bots
  23. socket.on('botsonline', function(data) {
  24.      bots_count = data;
  25.     //console.log(bots_count);
  26. });
  27.  
  28. socket.on('exists', function (data) {
  29.   alert('Error: 1000 - You already have bots playing in a server! Please buy another package if you wish to use more bots. If you encounter any other issues, please contact us at agarvipbots.com/contact');
  30. });
  31.  
  32. socket.on('wr', function (data) {
  33.   alert('Error: 1001. Something went wrong with your payment... Please contact us.');
  34. });
  35.  
  36. socket.on('srverr', function (data) {
  37.   alert('Error: 1002. Something went wrong with your server selection for starting bots. Please contact us.');
  38. });
  39.  
  40. socket.on('sundf', function (data) {
  41.   alert('Error: 1003. Something went wrong with your ingame balls. Please contact us.');
  42. });
  43. socket.on('diffs', function (data) {
  44.   alert('Error: 1004. Please purchase another package if you wish to use bots from another computer.');
  45. });
  46. socket.on('sames', function (data) {
  47.   alert('Error: 1005. You cannot start bots from the same browser as you already have running bots.');
  48. });
  49. socket.on('sundf2', function (data) {
  50.   alert('Error: 1006. Random error. Contact us.');
  51. });
  52. socket.on('timeLeft', function (data) {
  53.    console.log(data);
  54.     seconds = data;
  55.      var countdownTimer = setInterval('timer()', 1000);
  56.     console.log('Time Left :)');
  57.     //console.log(cativa);
  58.   //  timez();
  59. });
  60.  
  61. var clicked = false;
  62.   $(document).ready(function() {
  63.                              $("#canvas").after('<div id="altbots" style="background-color: #000000;-moz-opacity: 0.4;-khtml-opacity: 0.4;opacity: 0.9;filter: alpha(opacity=40);border: 2px solid rgb(191, 180, 49);top: 45px;left: 177px; display: none; position: absolute;font-size: 13px;color: #ffffff;padding: 1px;font-family: Ubuntu;"> <div style="color:#ffffff; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;">Available bot packages<br><br> <a id="26">You have multiple bot </a><br> <a id="26">packages available.</a><br> <a id="26">Which would you like</a><br> <a id="29">to start?</a> <br><br> <div class="packs" style="margin-top:10px"> <div class="alert alert-danger" style="display:none" id="alertErr"> <strong>Error</strong><br>Please select a pack you would like to start,<br> from the dropdown menu. </div><div class="input-group"> <select class="form-control" id="botpacks" style="font-weight: bold;color: #66e984;"> <option disabled="" value="" selected="">Package</option> <option value="0" id="0">Bots: 300 | Timer started: No</option> <option value="1" id="1">Bots: 125(Destroyer) | Timer started: Yes</option> </select> </div> </div><br><a class="btn btn-success btn-xs" id="clickbot2" style=" margin-left: 35px; ">Start Bots</a><br></div></div>');
  64.                              $( "#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: 45px; 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;'>AgarVIPbots.com<br><br> <a id='26' >Split: A</a><br>  <a id='26'> Feed: X</a><br>  <a id='26' >Freeze (You): D<br>Freeze (Bot): F</a><br><br> <a id='26' style=' color: red; '>Fast feed: Hold W </a><br> <a id='26' style=' color: red; '>Fast split: Shift</a><br></div>" );
  65.                 setInterval(function() {
  66.                             $('#minions').text('Bots: ' +bots_count);
  67.     if (!document.contains(document.getElementById('minions'))) {
  68.         var c = document.createElement('div');
  69.         c.id = 'minions';
  70.         c.style.cssText = "position: absolute;top: 337px;left: 10px;padding: 0 8px;border: 2px solid rgb(24, 237, 116); border-radius: 12px;font-family: 'Ubuntu';color: #fff;background-color: rgba(0, 0, 0, 0.2);z-index:0";
  71.         if (window.infos2 == undefined)
  72.             window.infos2 =  '';
  73.         c.innerHTML = window.infos2;
  74.         document.body.appendChild(c);
  75.     }
  76.                 }, 3000);
  77.       //Start bots
  78.       $(document).ready(function() {
  79.           $("#clickbot").bind("click", function(){
  80.               if(clicked==false) {
  81.                   socket.emit("startdata", {"p":pdz, "c":CONNECTION_URL});
  82.                   //    socket.emit("ip", {"ipaddr":ip, "uid":client_uuid});
  83.                   clicked=true;
  84.               } else {
  85.                   alert('Already connected! Please refresh browser for a new connection.');
  86.               }
  87.           });
  88.           $("#clickbot2").bind("click", function(){
  89.              // if(clicked==false) {
  90.                 console.log($('select[id=botpacks]').val());
  91.                 if(($('select[id=botpacks]').val() == 'null') || ($('select[id=botpacks]').val() == null)) {
  92.                   $("#alertErr").fadeIn();
  93.                   $(".packs").before('<div class="alert alert-danger" style="display:none" id="alertErr"> <strong>Error</strong><br>Please select a pack </div>').fadeIn("slow");
  94.                   setTimeout(function() {
  95.                     $("#alertErr").fadeOut();
  96.                   }, 2000);
  97.                   //alert('Please choose a package')
  98.                 }
  99.               var ids = $('#botpacks').find('option:selected').attr('timer');
  100.               console.log(ids);
  101.            
  102.                 if(ids == 1) {
  103.                   if (confirm('Are you sure you want to start this package? The timer will start. If your other package has timer started, you should select and start it instead.')) {
  104.                       // Save it!
  105.                       socket.emit("startdata2", {"p":pdz, "c":CONNECTION_URL, "sc":$('select[id=botpacks]').val()});
  106.                      clicked=true;
  107.                   }
  108.                 }else {
  109.                      socket.emit("startdata2", {"p":pdz, "c":CONNECTION_URL, "sc":$('select[id=botpacks]').val()});
  110.                   }
  111.                
  112.                   //    socket.emit("ip", {"ipaddr":ip, "uid":client_uuid});
  113.              /* } else {
  114.                   alert('Already connected! Please refresh browser for a new connection.');
  115.               }*/
  116.           });
  117.  
  118.           socket.on('multiple', function (data) {
  119.             //Replace div
  120.             console.log('multiple packs detected');
  121.             var pack = data;
  122.             /*$("#botpacks").replaceWith('
  123.               <select class="form-control" id="botpacks" style="font-weight: bold;color: #66e984;">
  124.             <option disabled="" value="" selected="">Package</option>'
  125.               +for(var i=0; i<pack.length; i++) {
  126.                 '<option value="'+i+'" id="'+i+'">Bots: '+pack[i].bots+' | Timer started: '+pack[i].activated+'</option>'
  127.             }+'</select>'
  128.               );
  129.             */
  130.             var packData = "";
  131.             for(var i=1; i<pack.length; i++) {
  132.               packData+="<option value=" + pack[i].oid + " id=" +i+" name="+pack[i].activated+" timer="+pack[i].activated+">Bots: " + pack[i].bots + " | Timer started: " + pack[i].activated;
  133.               packData+="</option>";
  134.             };  
  135.             packData+="</select>";
  136.  
  137.             $("#botpacks").replaceWith('<select class="form-control" id="botpacks" style="font-weight: bold;color: #66e984;"><option disabled="" value="" selected="">Package</option>' + packData);
  138.             console.log('replaced botPacks');
  139.             slideIn();
  140.  
  141.           });
  142.  
  143.           socket.on('match', function (data) {
  144.               alert('Bots successfully connected with your verified IP - starting now');
  145.           });
  146.           socket.on('match2', function (data) {
  147.               alert('Bots successfully connected with your verified IP - starting now');
  148.               fadeOut();
  149.           });
  150.           socket.on('nomatch', function (data) {
  151.               alert('Bots not started - your IP is not valid in our database');
  152.           });    
  153.           socket.on('err', function (data) {
  154.               alert('Error: 1 - please refresh browser (f5) / contact us.');
  155.           });
  156.  
  157.       });  
  158.       //Stop bots
  159.       $(document).ready(function() {
  160.           $("#clickstop").bind("click", function(){
  161.               socket.emit("closed-tab", null);
  162.               console.log('stopped');
  163.           });
  164.  
  165.       });
  166.  
  167.       //Bots count
  168.       $(document).ready(function() {
  169.           $("#botscount").bind("click", function(){
  170.               var x = document.getElementById("textcount").value;
  171.               //socket.emit("closed-tab", null);
  172.           });
  173.  
  174.       });
  175.  
  176.       if (!document.contains(document.getElementById('lefts'))) {
  177.           var b = document.createElement('div');
  178.           b.id = 'lefts';
  179.           b.style.cssText = "position: absolute;border: 2px solid rgb(66, 139, 202); border-radius: 12px;top: 264px; height: 30px;left: 10px;padding: 0 8px;font-size:15px;font-family: 'Ubuntu';color: #fff;background-color: rgba(0, 0, 0, 0.2);z-index:0";
  180.           if (window.infos == undefined)
  181.               window.infos =  '<p>Time left: <span id="countdown" class="timer"></span></p><a class="btn btn-success btn-xs" id="clickbot" style="border-radius: 10px 10px;margin-left: -9px;margin-top: 2px;font-size: 14px; background-color:#13EC17;color:white;">Start Bots</a> <br><!--<a class="btn btn-danger btn-xs" id="clickstop" style="border-radius: 10px 10px;margin-left: 0px;font-size: 14px;">Stop Bots</a>--> <br><br>';
  182.           b.innerHTML = window.infos;
  183.           document.body.appendChild(b);
  184.       }
  185.  
  186.   });
  187. function valcompare(Y, Z) {
  188.     return 0.01 > Y - Z && -0.01 < Y - Z
  189. }
  190. function slideIn() {
  191.       $("#altbots").animate({width:'toggle'},350);
  192. }
  193. function fadeOut() {
  194.       $("#altbots").fadeOut();
  195. }
  196. vz = function(a, b, c, d) {
  197.     if (valcompare(c - a, d - b)) {
  198.         f = a;
  199.         g = b;
  200.         h = c;
  201.         j = d
  202.     } else {
  203.         if (valcompare(a, k.minx)) {
  204.             if (0.01 < c - k.maxx || -0.01 > c - k.maxx) {
  205.                 f = a;
  206.                 h = a + 14142.135623730952
  207.             }
  208.         }
  209.         if (0.01 < a - k.minx || -0.01 > a - k.minx) {
  210.             if (valcompare(c, k.maxx)) {
  211.                 h = c;
  212.                 f = c - 14142.135623730952
  213.             }
  214.         }
  215.         if (0.01 < b - k.miny || -0.01 > b - k.miny) {
  216.             if (valcompare(d, k.maxy)) {
  217.                 j = d;
  218.                 g = d - 14142.135623730952
  219.             }
  220.         }
  221.         if (valcompare(b, k.miny)) {
  222.             if (0.01 < d - k.maxy || -0.01 > d - k.maxy) {
  223.                 g = b;
  224.                 j = b + 14142.135623730952
  225.             }
  226.         }
  227.         if (a < f) {
  228.             f = a;
  229.             h = a + 14142.135623730952
  230.         }
  231.         if (c > h) {
  232.             h = c;
  233.             f = c - 14142.135623730952
  234.         }
  235.         if (b < g) {
  236.             g = b;
  237.             j = b + 14142.135623730952
  238.         }
  239.         if (d > j) {
  240.             j = d;
  241.             g = d - 14142.135623730952
  242.         }
  243.         k.minx = a;
  244.         k.miny = b;
  245.         k.maxy = d;
  246.         k.maxx = c //validate for ingame client
  247.     }
  248.     offset_x = f || -7071;
  249.     offset_y = g || -7071
  250. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement