Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.48 KB | None | 0 0
  1. // ==UserScript==
  2. // @name BOT INTELIGENTNY
  3. // @version 1.0.1
  4. // @description Bot CSGOPolygon!
  5. // @author 在Kanapka❤Amelia
  6. // @match http://csgopolygon.com/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. var s=0;
  11. var m=0;
  12. var h=0;
  13.  
  14. var ball_pattern="nothing";
  15.  
  16. var x=0;
  17.  
  18. var z=0;
  19.  
  20. var y=true;
  21. var y2=true;
  22.  
  23. setInterval(function(){
  24. if(s===60){
  25. s=0;
  26. m+=1;
  27. }
  28. if(m===60){
  29. m=0;
  30. h+=1;
  31. }
  32. s+=1;
  33. $("#BotTimer").html('<b style="font-size: 22px;" class="text-info"><center>By 在Kanapka❤Amelia <br> Grasz już - '+h+'h '+m+'min '+s+'sec</center></b>');
  34. },1000);
  35.  
  36.  
  37. $("footer").hide();
  38. $(".col-xs-3 .panel").hide();
  39. $(".col-xs-3").append('<div id="BotInfo" class="well" style="margin-top: 10px;"></div>');
  40. $(".col-xs-3").append('<div id="BotStatus" class="well"><center> <div id="STATUS"><b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-danger">OFF</b></div> <hr> <input type="text" class="form-control input-lg" placeholder="Bet amount..." id="botAmount" style="width: 100%;display: inline-block;box-shadow: inset 0 0 0 rgba(0, 0, 0, .075);border: 0px;background-color: #4d4d4f;color: #fff; text-align: center; font-size: 13px;height: 36px;border-radius: 10px;"> </center><hr>'+'<button id="ononr" class="btn-success" style="width: 24.5%;"><span>Red</span></button> <button id="ononb" class="btn-success" style="width: 24.5%;"><span>Black</span></button>'+' '+'<button id="ofof" class="btn-danger" style="width: 49%;"><span>Wyłącz</span></button>'+'</div>');
  41. $(".col-xs-3").append('<div id="BotTimer" class="well"></div>');
  42.  
  43. // CONFIG /////////////////
  44. var initialBetAmount = 1;//
  45. var start = 0; //
  46. var mode = 'martingale'; //
  47. var betColor = 'nothing';//
  48. var pattern = "nothing";
  49. ///////////////////////////
  50.  
  51. $("#ononr").click(function(){
  52. initialBetAmount=$("#botAmount").val();
  53. currentBetAmount=$("#botAmount").val();
  54. start=1;
  55. $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-success">ON</b>');
  56. betColor="red";
  57. });
  58.  
  59. $("#ononb").click(function(){
  60. initialBetAmount=$("#botAmount").val();
  61. currentBetAmount=$("#botAmount").val();
  62. start=1;
  63. $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-success">ON</b>');
  64. betColor="black";
  65. });
  66.  
  67. $("#ofof").click(function(){
  68. start=0;
  69. $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-danger">OFF</b>');
  70. });
  71.  
  72. setInterval(function() { if (!WS) { chat('alert', 'Reconnecting...'); connect(); } }, 5000);
  73.  
  74. function tick(){
  75. var a=getStatus();
  76. if(a!==lastStatus&&"unknown"!==a){
  77. switch(a){
  78. case"Czekam":bet();
  79. break;
  80. case"Wylosowano":
  81. rolled();
  82.  
  83. if(lastBetColor===lastRollColor){
  84. x+=$("#botAmount").val();
  85. $("#plusBOT").html(x);
  86. }
  87. //P/A/T/E/R/N//
  88. if(betColor==="red"){
  89. ball_pattern='<b class="ball-1" style="width: 10px;height: 10px;display: inline-block;border-radius: 10px;"></b>';
  90. }
  91. if(betColor==="black"){
  92. ball_pattern='<b class="ball-8" style="width: 10px;height: 10px;display: inline-block;border-radius: 10px;"></b>';
  93. }
  94.  
  95. ///////////////
  96.  
  97. }
  98. lastStatus=a,printInfo();
  99. }
  100. }
  101. function checkBalance(){
  102. return getBalance()<currentBetAmount?($("#case").html("<br><center><b style='font-size: 22px;' class='well text-danger'>ZBANKRUTOWAŁEŚ(AŚ)!<b style='margin-left: 1px;margin-right: 1px;'></b> BRAKUJE COINSÓW!</b></center>"),clearInterval(refreshIntervalId),!1):!0;
  103. }
  104. function printInfo(){
  105. var $napisz=$("#BotInfo");
  106. $napisz.html("<center><b style='font-size: 22px;' class='text-danger'>Info bot:</b></center>");
  107. $napisz.append("<hr>");
  108. $napisz.append("<center><b class='text-primary'>Status: "+lastStatus+"</b></center><br>");
  109. $napisz.append("<center><b class='text-primary'>Obecy los: "+currentRollNumber+"</b></center><br>");
  110. $napisz.append("<center><b class='text-primary'>Stawka: "+currentBetAmount+"</b></center><br>");
  111. $napisz.append("<center><b class='text-primary'>Ostatni los: "+(null===wonLastRoll()?"-":wonLastRoll()?"won":"lost")+"</b></center>");
  112. $napisz.append("<hr>");
  113. $napisz.append("<center><b class='text-primary'>Kolor: "+ball_pattern+"</b></center>");
  114.  
  115. }
  116. function rolled(){
  117. if(start===1){
  118. return"anti-martingale"===mode?void antiMartingale():(martingale(),void currentRollNumber++);
  119. }
  120. }
  121. function antiMartingale(){
  122. currentBetAmount=wonLastRoll()?2*currentBetAmount:initialBetAmount;
  123. }
  124. function martingale(){
  125. if(start===1){
  126. currentBetAmount=wonLastRoll()?initialBetAmount:2*currentBetAmount;
  127. }
  128. }
  129. function bet(){
  130. if(start===1){
  131. checkBalance()&&(setBetAmount(currentBetAmount),setTimeout(placeBet,50));
  132. }
  133. }
  134. function setBetAmount(a){
  135. if(start===1){
  136. $betAmountInput.val(a);
  137. }
  138. }
  139. function placeBet(){
  140. if(start===1){
  141. return"red"===betColor?($redButton.click(),void(lastBetColor="red")):($blackButton.click(),void(lastBetColor="black"));
  142. }
  143. }
  144. function getStatus(){
  145. var a=$statusBar.text();
  146. if(hasSubString(a,"Rolling in"))return"Czekam";
  147. if(hasSubString(a,"***ROLLING***"))return"Losuję";
  148. if(hasSubString(a,"Rolled")){
  149. var b=parseInt(a.split("Rolled")[1]);
  150. return lastRollColor=getColor(b),"Wylosowano";
  151. }
  152. return"unknown";
  153. }
  154. function getBalance(){
  155. return parseInt($balance.text());
  156. }
  157. function hasSubString(a,b){
  158. return a.indexOf(b)>-1;
  159. }
  160. function getColor(a){
  161. if(start===1){
  162. return 0==a?"green":a>=1&&7>=a?"red":"black";
  163. }
  164. }
  165. function wonLastRoll(){
  166. if(start===1){
  167. return lastBetColor?lastRollColor===lastBetColor:null;
  168. }
  169. }
  170.  
  171. //
  172. var currentBetAmount=initialBetAmount,
  173. currentRollNumber=1,
  174. lastStatus,
  175. lastBetColor,
  176. lastRollColor,
  177. $balance=$("#balance"),
  178. $betAmountInput=$("#betAmount"),
  179. $statusBar=$(".progress #banner"),
  180. $redButton=$("#panel11-7-b .betButton"),
  181. $blackButton=$("#panel8-14-b .betButton"),
  182. refreshIntervalId=setInterval(tick,500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement