Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var socketport = "socket.csgo500.com";
- var socket = io(socketport, {
- transports: ['websocket']
- });
- var rojos = 0;
- var amarillos = 0;
- var azules = 0;
- var negros = 0;
- var total = 0;
- var x = 0 ;
- var y = 0 ;
- var multiplicador = 0;
- var rachasdenegro = 0;
- var $wrapper = $("#content-mybets");
- $wrapper.prepend('<div style="text-align: center;">Ganador: <div class="circle" style="background-color: red;height: 20px;width: 20px;border-radius: 10px;display: inline-block;vertical-align: bottom;margin-left: 10px;padding-left: 21px;"></div><br><div>Azules 18%: <span class="azules"></span></div><div>Rojos 31%: <span class="rojos"></span></div><div>Amarillos 1,8%: <span class="amarillos"></span></div><div>Negros 48%: <span class="negros"></span></div><div>Fallos: <span class="multiplicador"></span></div><div>Rachas de negros: <span class="rachasdenegro"></span></div>');
- socket.on('round', function(data) {
- var blue = [1, 9, 11, 19, 21, 33, 35, 43, 45, 53];
- var red = [3, 5, 7, 13, 15, 17, 23, 25, 27, 29, 31, 37, 39, 41, 47, 49, 51];
- var black = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52];
- var gold = [0];
- if (blue.indexOf(data.winner.random) != -1) {
- $wrapper.find(".circle").css("background-color", "#45B5DA");
- $wrapper.find(".azules").html(azules);
- $wrapper.find(".multiplicador").html(multiplicador);
- total = 0;
- multiplicador = 0;
- azules++;
- x = 10;
- y = 10;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (red.indexOf(data.winner.random) != -1) {
- $wrapper.find(".circle").css("background-color", "#C8354E");
- $wrapper.find(".rojos").html(rojos);
- $wrapper.find(".multiplicador").html(multiplicador);
- total = 0;
- multiplicador = 0;
- rojos++;
- x = 10;
- y = 10;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (gold.indexOf(data.winner.random) != -1) {
- $wrapper.find(".circle").css("background-color", "#FFC870");
- $wrapper.find(".multiplicador").html(multiplicador);
- $wrapper.find(".amarillos").html(amarillos);
- total++;
- amarillos++;
- multiplicador++;
- if (total ==0) {
- x = 10;
- y = 10;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==1) {
- x = 22;
- y = 13;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==2) {
- x = 47;
- y = 28;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==3) {
- x = 100;
- y = 60;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==4) {
- x = 215;
- y = 129;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- }
- else if (black.indexOf(data.winner.random) != -1) {
- $wrapper.find(".circle").css("background-color", "#555");
- $wrapper.find(".negros").html(negros);
- total++;
- multiplicador++;
- negros++;
- $wrapper.find(".multiplicador").html(multiplicador);
- if (total ==0) {
- x = 10;
- y = 10;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==1) {
- x = 22;
- y = 13;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==2) {
- x = 47;
- y = 28;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==3) {
- x = 100;
- y = 60;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==4) {
- x = 215;
- y = 129;
- $('#bet-input').val(x);
- setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
- setTimeout(function(){$('#bet-input').val(y);},18000);
- setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
- }
- else if (total ==5) {
- $wrapper.find(".rachasdenegro").html(rachasdenegro);
- rachasdenegro++;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement