Sovale

1234

Oct 22nd, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var just = document.createElement("Button");
  2. just.appendChild(document.createTextNode("50x"));
  3. document.getElementById("content-wheel-balance").appendChild(just);
  4. just.id = "50x";
  5. just.style.backgroundColor = "#FFC870";
  6. just.style.padding = "16px"
  7. var abet = 10;
  8.  
  9. function fiftybet() {
  10.     document.getElementById("bet-btn-50x").click();
  11.     if (winner.choice === 3) {
  12.         document.getElementById("bet-input").value = 10;
  13.         abet = 10;
  14.     } else {
  15.         abet = abet + 1;
  16.         document.getElementById("bet-input").value = abet;
  17.     }
  18. }
  19. just.onclick = function() {
  20.     document.getElementById("bet-input").value = 10;
  21.     fiftybet();
  22.     var shit = setInterval(fiftybet, 35000);
  23. }
  24.  
  25. var streaks = document.createElement("Button");
  26. streaks.appendChild(document.createTextNode("Streaks"));
  27. document.getElementById("content-wheel-balance").appendChild(streaks);
  28. streaks.id = "Streaks";
  29. streaks.style.backgroundColor = "00FFCC";
  30. streaks.style.marginLeft = "5px";
  31. streaks.style.marginRight = "5px";
  32. streaks.onclick = function() {
  33.     alert(streak_array);
  34. }
  35.  
  36.  
  37. var col = document.createElement("button");
  38. var or = document.createTextNode("Color");
  39. col.appendChild(or);
  40. document.getElementById("content-wheel-balance").appendChild(col);
  41. col.id = 'predict';
  42. var property = document.getElementById('predict');
  43.  
  44. var yell = document.createElement('div');
  45. document.getElementById('content-wheel-balance').appendChild(yell)
  46. yell.id = "yellowc"
  47.  
  48. function tellme() {
  49.     if (winner.choice === 0) {
  50.         console.log('Black');
  51.         property.style.backgroundColor = "#666";
  52.     } else if (winner.choice === 1) {
  53.         console.log('Red');
  54.         property.style.backgroundColor = "#C8354E"
  55.     } else if (winner.choice === 2) {
  56.         console.log('Blue');
  57.         property.style.backgroundColor = "#45B5DA"
  58.     } else if (winner.choice === 3) {
  59.         console.log('Yellow');
  60.         property.style.backgroundColor = "#FFC870";
  61.     }
  62. };
  63. var myVari = setInterval(myTimers, 500);
  64.  
  65. function myTimers() {
  66.     tellme();
  67. }
  68. tellme();
  69.  
  70.  
  71. //------------------------------------------Sovale
  72. var streak_array = [];
  73. var blacks = 0;
  74. var reds = 0;
  75. var blues = 0;
  76. var yellows = 0;
  77. var streak = 0;
  78. var max_streak = 0;
  79. var streak_avg = 0.0;
  80. var temp = 0;
  81. var coinswin = 0;
  82. var abet2 = 10;
  83. var temp2 = 0;
  84. var wins = 0;
  85. var streak_array_id = 0;
  86. var stats = document.createElement("div");
  87. stats.innerHTML =
  88.     '<p><b>Blacks:</b>' + blacks + '</p>' +
  89.     '<p><b>Reds:</b>' + reds + '</p>' +
  90.     '<p><b>Blues:</b>' + blues + '</p>' +
  91.     '<p><b>Yellows:</b>' + yellows + '</p>' +
  92.     '<p><b>Max streak:</b>' + max_streak + '</p>' +
  93.     '<p><b>Wins:</b>' + wins + '</p>';
  94.  
  95. stats.id = 'stats';
  96. document.getElementById("content-wheel-balance").appendChild(stats);
  97.  
  98. function updateHTML() {
  99.     stats.innerHTML =
  100.         '<p><b>Blacks:</b>' + blacks + '</p>' +
  101.         '<p><b>Reds:</b>' + reds + '</p>' +
  102.         '<p><b>Blues:</b>' + blues + '</p>' +
  103.         '<p><b>Yellows:</b>' + yellows + '</p>' +
  104.         '<p><b>Max streak:</b>' + max_streak + '</p>' +
  105.         '<p><b>Wins:</b>' + wins + '</p>';
  106. }
  107.  
  108. function counter() {
  109.     if (winner.choice === 0) {
  110.         if (streak != 0) streak_array.push(streak); else wins++;
  111.         blacks += 1;
  112.         if (streak > max_streak) {
  113.             max_streak = streak;
  114.         }
  115.         temp2++;
  116.         streak = 0;
  117.         updateHTML();
  118.     } else if (winner.choice === 1) {
  119.         if (streak != 0) streak_array.push(streak); else wins++;
  120.         reds += 1;
  121.         if (streak > max_streak) {
  122.             max_streak = streak;
  123.         }
  124.         temp2++;
  125.         streak = 0;
  126.         updateHTML();
  127.     } else if (winner.choice === 2) {
  128.         blues += 1;
  129.         streak += 1;
  130.         temp2++;
  131.         updateHTML();
  132.     } else if (winner.choice === 3) {
  133.         yellows += 1;
  134.         streak += 1;
  135.         temp2++;
  136.         updateHTML();
  137.     }
  138. };
  139. var countInterval = setInterval(counter, 35000);
Advertisement
Add Comment
Please, Sign In to add comment