Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name BOT INTELIGENTNY
- // @version 1.0.1
- // @description Bot CSGOPolygon!
- // @author 在Kanapka❤Amelia
- // @match http://csgopolygon.com/*
- // @grant none
- // ==/UserScript==
- var s=0;
- var m=0;
- var h=0;
- var ball_pattern="nothing";
- var x=0;
- var z=0;
- var y=true;
- var y2=true;
- setInterval(function(){
- if(s===60){
- s=0;
- m+=1;
- }
- if(m===60){
- m=0;
- h+=1;
- }
- s+=1;
- $("#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>');
- },1000);
- $("footer").hide();
- $(".col-xs-3 .panel").hide();
- $(".col-xs-3").append('<div id="BotInfo" class="well" style="margin-top: 10px;"></div>');
- $(".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>');
- $(".col-xs-3").append('<div id="BotTimer" class="well"></div>');
- // CONFIG /////////////////
- var initialBetAmount = 1;//
- var start = 0; //
- var mode = 'martingale'; //
- var betColor = 'nothing';//
- var pattern = "nothing";
- ///////////////////////////
- $("#ononr").click(function(){
- initialBetAmount=$("#botAmount").val();
- currentBetAmount=$("#botAmount").val();
- start=1;
- $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-success">ON</b>');
- betColor="red";
- });
- $("#ononb").click(function(){
- initialBetAmount=$("#botAmount").val();
- currentBetAmount=$("#botAmount").val();
- start=1;
- $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-success">ON</b>');
- betColor="black";
- });
- $("#ofof").click(function(){
- start=0;
- $("#STATUS").html('<b style="font-size: 22px;" class="text-primary">Status:</b> <b style="font-size: 22px;" class="text-danger">OFF</b>');
- });
- setInterval(function() { if (!WS) { chat('alert', 'Reconnecting...'); connect(); } }, 5000);
- function tick(){
- var a=getStatus();
- if(a!==lastStatus&&"unknown"!==a){
- switch(a){
- case"Czekam":bet();
- break;
- case"Wylosowano":
- rolled();
- if(lastBetColor===lastRollColor){
- x+=$("#botAmount").val();
- $("#plusBOT").html(x);
- }
- //P/A/T/E/R/N//
- if(betColor==="red"){
- ball_pattern='<b class="ball-1" style="width: 10px;height: 10px;display: inline-block;border-radius: 10px;"></b>';
- }
- if(betColor==="black"){
- ball_pattern='<b class="ball-8" style="width: 10px;height: 10px;display: inline-block;border-radius: 10px;"></b>';
- }
- ///////////////
- }
- lastStatus=a,printInfo();
- }
- }
- function checkBalance(){
- 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;
- }
- function printInfo(){
- var $napisz=$("#BotInfo");
- $napisz.html("<center><b style='font-size: 22px;' class='text-danger'>Info bot:</b></center>");
- $napisz.append("<hr>");
- $napisz.append("<center><b class='text-primary'>Status: "+lastStatus+"</b></center><br>");
- $napisz.append("<center><b class='text-primary'>Obecy los: "+currentRollNumber+"</b></center><br>");
- $napisz.append("<center><b class='text-primary'>Stawka: "+currentBetAmount+"</b></center><br>");
- $napisz.append("<center><b class='text-primary'>Ostatni los: "+(null===wonLastRoll()?"-":wonLastRoll()?"won":"lost")+"</b></center>");
- $napisz.append("<hr>");
- $napisz.append("<center><b class='text-primary'>Kolor: "+ball_pattern+"</b></center>");
- }
- function rolled(){
- if(start===1){
- return"anti-martingale"===mode?void antiMartingale():(martingale(),void currentRollNumber++);
- }
- }
- function antiMartingale(){
- currentBetAmount=wonLastRoll()?2*currentBetAmount:initialBetAmount;
- }
- function martingale(){
- if(start===1){
- currentBetAmount=wonLastRoll()?initialBetAmount:2*currentBetAmount;
- }
- }
- function bet(){
- if(start===1){
- checkBalance()&&(setBetAmount(currentBetAmount),setTimeout(placeBet,50));
- }
- }
- function setBetAmount(a){
- if(start===1){
- $betAmountInput.val(a);
- }
- }
- function placeBet(){
- if(start===1){
- return"red"===betColor?($redButton.click(),void(lastBetColor="red")):($blackButton.click(),void(lastBetColor="black"));
- }
- }
- function getStatus(){
- var a=$statusBar.text();
- if(hasSubString(a,"Rolling in"))return"Czekam";
- if(hasSubString(a,"***ROLLING***"))return"Losuję";
- if(hasSubString(a,"Rolled")){
- var b=parseInt(a.split("Rolled")[1]);
- return lastRollColor=getColor(b),"Wylosowano";
- }
- return"unknown";
- }
- function getBalance(){
- return parseInt($balance.text());
- }
- function hasSubString(a,b){
- return a.indexOf(b)>-1;
- }
- function getColor(a){
- if(start===1){
- return 0==a?"green":a>=1&&7>=a?"red":"black";
- }
- }
- function wonLastRoll(){
- if(start===1){
- return lastBetColor?lastRollColor===lastBetColor:null;
- }
- }
- //
- var currentBetAmount=initialBetAmount,
- currentRollNumber=1,
- lastStatus,
- lastBetColor,
- lastRollColor,
- $balance=$("#balance"),
- $betAmountInput=$("#betAmount"),
- $statusBar=$(".progress #banner"),
- $redButton=$("#panel11-7-b .betButton"),
- $blackButton=$("#panel8-14-b .betButton"),
- refreshIntervalId=setInterval(tick,500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement