// Here are some stats.
// All these are individual sets of 10 million spins.
//
// chance for a third hit in 37 spins >> [ 98% ]
// # of spins: 9999990
// # of cycles of 37 spins: 270270
// Cycles with three hits: 265475
//
// chance for a fourth hit in 74 spins >> [ 99% ]
// # of spins: 9999990
// # of cycles of 74 spins: 135135
// Cycles with four hits: 135122
//
// chance for a fifth hit in 111 spins >> [ 100% ]
// # of spins: 9999990
// # of cycles of 111 spins: 90090
// Cycles with five hits: 90090
//
// chance for a sixth hit in 111 spins >> [ 100% ]
// # of spins: 9999990
// # of cycles of 111 spins: 90090
// Cycles with six hits: 90090
//
// chance for a fourth hit in 37 spins >> [ 49% ]
// # of spins: 9999990
// # of cycles of 37 spins: 270270
// Cycles with four hits: 134963
//
// chance for a fifth hit in 74 spins >> [ 90% ]
// # of spins: 9999990
// # of cycles of 74 spins: 135135
// Cycles with five hits: 122565
//
// ==UserScript==
// @name Roulette Tweaks
// @version 0.1
// @grant GM_getValue
// @grant GM_addStyle
function l(u, i) {
var d = document;
if (!d.getElementById(i)) {
var s = d.createElement('script');
s.src = u;
s.id = i;
d.body.appendChild(s);
}
}
l('//code.jquery.com/jquery-3.2.1.min.js', 'jquery');
// ==/UserScript==
//////JQuery Compatibility statement//////
this.$ = this.jQuery = jQuery.noConflict(true);
//////JQuery Compatibility statement//////
var spinCount = 0;
var spinCountSave = 0;
var autom = 0;
var autoCount = 0;
var startbalance = 0;
var oldrowNumber = 0;
var maxhitcount = 0;
var clearflag = false;
setTimeout(function(){ startIt(); }, 1000);
function startIt(){
console.log( "starting..." );
$( "head" ).append( "<style type='text/css'>.info { font-family: proxima-nova, sans-serif; font-size: 14px !important; } .hidethere { display: none !important; } .nwrapper { width: 100%; display: inline-block; align-items: center; justify-content: center } .numbas { padding: 1px; margin: 1px; border: true; border-style: solid; border-width: 1px; height: 12px; width: 14px; background: #F7F7FA; display: inline-block; font-family: proxima-nova, sans-serif; font-size: 8px; text-align: center; } #myrow0 { opacity: 0.5; } .labelz { opacity: 0.5; padding: 1px; margin: 1px; border: true; border-style: solid; border-width: 1px; height: 12px; width: 14px; background: #F7F7FA; display: inline-block; font-family: proxima-nova, sans-serif; font-size: 8px; text-align: center; } </style>" );
$( ".container:first" ).prepend( "<div class='nwrapper' width='100%'><div class='info' id='infopanel' width='100%' style='font-size: 10px;'>[ spin: <span id='ninfo'>0</span> ] [ profit: <span id='myprofit'></span> ]</div><div class='nrow' id='myrow0' width = '100%'><div class='labelz' id='label0'>0x</div><div class='numbas' id='mynumba0'>0</div><div class='numbas' id='mynumba1'>1</div><div class='numbas' id='mynumba2'>2</div><div class='numbas' id='mynumba3'>3</div><div class='numbas' id='mynumba4'>4</div><div class='numbas' id='mynumba5'>5</div><div class='numbas' id='mynumba6'>6</div><div class='numbas' id='mynumba7'>7</div><div class='numbas' id='mynumba8'>8</div><div class='numbas' id='mynumba9'>9</div><div class='numbas' id='mynumba10'>10</div><div class='numbas' id='mynumba11'>11</div><div class='numbas' id='mynumba12'>12</div><div class='numbas' id='mynumba13'>13</div><div class='numbas' id='mynumba14'>14</div><div class='numbas' id='mynumba15'>15</div><div class='numbas' id='mynumba16'>16</div><div class='numbas' id='mynumba17'>17</div><div class='numbas' id='mynumba18'>18</div><div class='numbas' id='mynumba19'>19</div><div class='numbas' id='mynumba20'>20</div><div class='numbas' id='mynumba21'>21</div><div class='numbas' id='mynumba22'>22</div><div class='numbas' id='mynumba23'>23</div><div class='numbas' id='mynumba24'>24</div><div class='numbas' id='mynumba25'>25</div><div class='numbas' id='mynumba26'>26</div><div class='numbas' id='mynumba27'>27</div><div class='numbas' id='mynumba28'>28</div><div class='numbas' id='mynumba29'>29</div><div class='numbas' id='mynumba30'>30</div><div class='numbas' id='mynumba31'>31</div><div class='numbas' id='mynumba32'>32</div><div class='numbas' id='mynumba33'>33</div><div class='numbas' id='mynumba34'>34</div><div class='numbas' id='mynumba35'>35</div><div class='numbas' id='mynumba36'>36</div></div><div class='nrow' id='myrow1' width = '100%'><div class='labelz' id='label1'>1x</div></div><div class='nrow' id='myrow2' width = '100%'><div class='labelz' id='label2'>2x</div></div><div class='nrow' id='myrow3' width = '100%'><div class='labelz' id='label3'>3x</div></div><div class='nrow' id='myrow4' width = '100%'><div class='labelz' id='label4'>4x</div></div><div class='nrow' id='myrow5' width = '100%'><div class='labelz' id='label5'>5x</div></div><div class='nrow' id='myrow6' width = '100%'><div class='labelz' id='label6'>6x</div></div><div class='nrow' id='myrow7' width = '100%'><div class='labelz' id='label7'>7x</div></div></div>" );
$( "#mynumba0" ).click( function(){
$( "div.CanvasWrapper__Wrapper-jZpqcf.SNUQp" ).attr("id", "mywheel");
$( "#mywheel" ).addClass("hidethere" );
$( "span.Winning__Value-clcYJN.cQYwXv" ).attr("id", "winningnumba");
$( "div.Footer__Main-cbYjLO.eGoesP" ).attr("id", "numbercontainer");
$( "div.Balance__BalanceWrapper-TyjZM.kYQMZJ" ).attr("id", "balancewrp");
$( "#balancewrp" ).appendTo( $( "#infopanel" ) );
$( "div.styles__StyledFeedSidebar-fuLCcn.cGGHBR" ).attr("id", "sidebar");
$( sidebar ).addClass("hidethere" );
$( "ol.SpinHistory__List-aMykR.cicZIv" ).attr("id", "history");
$( "#history" ).css( "flex-direction", "row" );
$( "div.Header__Wrapper-laTQtG.hHyrgc" ).attr("id", "putContainer");
$( ".nwrapper" ).appendTo( $( "#putContainer" ) );
$( "div.custom-scrollbar styles__AppWrapper-cxIzVO.cIWPOU" ).attr("id", "scroller");
$( "#scroller" ).width( "100%" );
$( "div.Winning__StyledWinning-jjfbQN.aWlVh" ).attr("id", "winningnumberwrp");
$( "#winningnumberwrp" ).css( "margin-left", "0" );
var clearBtntxt = $("span").filter(function() { return ($(this).text() == "Clear table" ); });
var clearBtn = clearBtntxt.parent();
console.log( "clearbtn: "+clearBtntxt.text() );
$( "div.Balance__BalanceWrapper-TyjZM.kYQMZJ" ).attr("id", "mybalance");
var tmpblnce = $( "#mybalance" ).text();
startbalance = parseFloat(tmpblnce.substring(4, 14));
console.log( startbalance );
$( "button[data-test='rouletteBet']" ).attr("id", "letsBet");
$( "#letsBet" ).click( function(){ waitForIt(); });
});
$( "#mynumba1" ).click( function(){
autom = 1;
autoCount = 36;
var tmpblnce = $( "#mybalance" ).text();
startbalance = parseFloat(tmpblnce.substring(4, 14));
spinCountSave = spinCount;
console.log( "autoCount: "+autoCount );
});
$( "#ninfo" ).click( function(){
autom = 0;
});
}
function waitForIt(){
winningnumba = setInterval( function(){
var letsbetString = $( "#letsBet" ).text();
if( letsbetString != "Spinning..." ){
spinCount = spinCount + 1;
$( "#ninfo" ).text( spinCount );
var actuallyrolled = $( "#winningnumba" ).text();
var lastnumba = $( "#mynumba"+actuallyrolled );
var oldrow = lastnumba.parent("div");
var oldrowID = oldrow.attr('id');
oldrowNumber = parseInt(oldrowID.substring(5));
if( (oldrowNumber+1) > maxhitcount){
maxhitcount = (oldrowNumber+1);
clearflag = true;
}
var newrowString = "#myrow"+(oldrowNumber+1);
$( "#mynumba"+actuallyrolled ).appendTo( $( newrowString) );
var tmpblnce = $( "#mybalance" ).text();
var actualBlnce = parseFloat(tmpblnce.substring(4, 14));
var actualPrft = (actualBlnce - startbalance);
console.log( "actualPrft: "+actualPrft );
$( "#myprofit" ).text( actualPrft.toFixed(8) );
var mywager = parseFloat(letsbetString.substring(4, 14));
var numberBtn = $("span").filter(function() { return ($(this).text() == actuallyrolled ); });
console.log( actuallyrolled );
clearInterval(winningnumba);
if( autom == 1 ){
if( spinCount >= spinCountSave+autoCount ){
autom = 0;
}else if( actualBlnce < mywager ){
autom = 0;
}else{
if( clearflag === true ){
clearflag = false;
clearBtn.click();
console.log( $( clearBtn ).text() );
}
if( oldrowNumber >= 1 && oldrowNumber >= (maxhitcount-2) && spinCount >= 20 ){ numberBtn.next().click(); }
//if( oldrowNumber >= 2 && oldrowNumber >= (maxhitcount-1) ){ numberBtn.next().click(); }
setTimeout(function(){ $( "#letsBet" ).click(); },300);
}
}
}
}, 300);
}
//$( "div.Winning__Field-dHNJRL.fOiyPl" ).addClass("hidethere" );