Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.21 KB | None | 0 0
  1. var socketport = "socket.csgo500.com";
  2. var socket = io(socketport, {
  3. transports: ['websocket']
  4. });
  5. var rojos = 0;
  6. var amarillos = 0;
  7. var azules = 0;
  8. var negros = 0;
  9. var total = 0;
  10. var x = 0 ;
  11. var y = 0 ;
  12. var multiplicador = 0;
  13. var rachasdenegro = 0;
  14.  
  15. var $wrapper = $("#content-mybets");
  16. $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>');
  17.  
  18. socket.on('round', function(data) {
  19. var blue = [1, 9, 11, 19, 21, 33, 35, 43, 45, 53];
  20. var red = [3, 5, 7, 13, 15, 17, 23, 25, 27, 29, 31, 37, 39, 41, 47, 49, 51];
  21. 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];
  22. var gold = [0];
  23.  
  24.  
  25. if (blue.indexOf(data.winner.random) != -1) {
  26. $wrapper.find(".circle").css("background-color", "#45B5DA");
  27. $wrapper.find(".azules").html(azules);
  28. $wrapper.find(".multiplicador").html(multiplicador);
  29. total = 0;
  30. multiplicador = 0;
  31. azules++;
  32. x = 10;
  33. y = 10;
  34. $('#bet-input').val(x);
  35. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  36. setTimeout(function(){$('#bet-input').val(y);},18000);
  37. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  38.  
  39.  
  40. }
  41. else if (red.indexOf(data.winner.random) != -1) {
  42. $wrapper.find(".circle").css("background-color", "#C8354E");
  43. $wrapper.find(".rojos").html(rojos);
  44. $wrapper.find(".multiplicador").html(multiplicador);
  45. total = 0;
  46. multiplicador = 0;
  47. rojos++;
  48. x = 10;
  49. y = 10;
  50. $('#bet-input').val(x);
  51. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  52. setTimeout(function(){$('#bet-input').val(y);},18000);
  53. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  54.  
  55.  
  56.  
  57.  
  58. }
  59. else if (gold.indexOf(data.winner.random) != -1) {
  60. $wrapper.find(".circle").css("background-color", "#FFC870");
  61. $wrapper.find(".multiplicador").html(multiplicador);
  62. $wrapper.find(".amarillos").html(amarillos);
  63. total++;
  64. amarillos++;
  65. multiplicador++;
  66.  
  67. if (total ==0) {
  68. x = 10;
  69. y = 10;
  70. $('#bet-input').val(x);
  71. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  72. setTimeout(function(){$('#bet-input').val(y);},18000);
  73. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  74. }
  75. else if (total ==1) {
  76. x = 22;
  77. y = 13;
  78. $('#bet-input').val(x);
  79. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  80. setTimeout(function(){$('#bet-input').val(y);},18000);
  81. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  82. }
  83. else if (total ==2) {
  84. x = 47;
  85. y = 28;
  86. $('#bet-input').val(x);
  87. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  88. setTimeout(function(){$('#bet-input').val(y);},18000);
  89. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  90. }
  91. else if (total ==3) {
  92. x = 100;
  93. y = 60;
  94. $('#bet-input').val(x);
  95. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  96. setTimeout(function(){$('#bet-input').val(y);},18000);
  97. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  98. }
  99. else if (total ==4) {
  100. x = 215;
  101. y = 129;
  102. $('#bet-input').val(x);
  103. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  104. setTimeout(function(){$('#bet-input').val(y);},18000);
  105. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  106. }
  107.  
  108.  
  109. }
  110. else if (black.indexOf(data.winner.random) != -1) {
  111. $wrapper.find(".circle").css("background-color", "#555");
  112. $wrapper.find(".negros").html(negros);
  113. total++;
  114. multiplicador++;
  115. negros++;
  116. $wrapper.find(".multiplicador").html(multiplicador);
  117.  
  118. if (total ==0) {
  119. x = 10;
  120. y = 10;
  121. $('#bet-input').val(x);
  122. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  123. setTimeout(function(){$('#bet-input').val(y);},18000);
  124. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  125. }
  126. else if (total ==1) {
  127. x = 22;
  128. y = 13;
  129. $('#bet-input').val(x);
  130. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  131. setTimeout(function(){$('#bet-input').val(y);},18000);
  132. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  133. }
  134. else if (total ==2) {
  135. x = 47;
  136. y = 28;
  137. $('#bet-input').val(x);
  138. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  139. setTimeout(function(){$('#bet-input').val(y);},18000);
  140. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  141. }
  142. else if (total ==3) {
  143. x = 100;
  144. y = 60;
  145. $('#bet-input').val(x);
  146. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  147. setTimeout(function(){$('#bet-input').val(y);},18000);
  148. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  149. }
  150. else if (total ==4) {
  151. x = 215;
  152. y = 129;
  153. $('#bet-input').val(x);
  154. setTimeout(function(){$('#bet-btn-3x').trigger('click');},16000);
  155. setTimeout(function(){$('#bet-input').val(y);},18000);
  156. setTimeout(function(){$('#bet-btn-5x').trigger('click');},19000);
  157. }
  158. else if (total ==5) {
  159. $wrapper.find(".rachasdenegro").html(rachasdenegro);
  160. rachasdenegro++;
  161. }
  162.  
  163.  
  164.  
  165. }
  166. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement