Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////
- //Recording and Displaying Stats //
- /////////////////////////////////////////
- //~CrimsonNoble
- //Base Bet Settings//
- basebet =1; // Amount in satoshi
- basecondition ='<'; // '<' for under '>' for over
- winchance =0.01;// 49.5 has 2x payout...if your rolling under,
- //Other Settings////
- win_increment =0; //Increase bet by this amount(in satoshi) when you win.
- win_multiplier =1; //Multiply bet by this amount when you win.(1 is no change)
- win_reset =false;//If true when you win bet amount goes back to base bet.
- loss_increment =0; //Increase bet by this amount(in satoshi) when you lose.
- loss_multiplier=1; //Multiply bet by this amount when you lose.(1 is no change)
- loss_reset =false;//If true when you lose bet amount goes back to base bet.
- min_wager =0; //Bet will never go lower then this.(satoshi)
- max_wager =99999;//Bet will never go higher then this.(satoshi)
- roll_remaining =true; //When true if your balance is too low to make a bet then you bet what you have left.
- stop_on_win =true;
- switch_hilow = 0; //switches from over to under/vice vesa every X rolls, 0 means no switching
- random_condition =false; //Randomly picks high or low each roll, Overrides switch_hilow
- //Assign Base Values////
- truebet=basebet;truecondition=basecondition;pause=true;balance=0;hilow_count=0;session_profit=0;max_redstreak=0;redstreak=0;
- xlossdata=0;
- //Load previously stored information//
- if(!isNaN(localStorage.session_profit)){session_profit=Number(localStorage.session_profit);}
- if(!isNaN(localStorage.max_redstreak)) {max_redstreak=Number(localStorage.max_redstreak);}
- if(!isNaN(localStorage.redstreak)) {redstreak=Number(localStorage.redstreak);}
- ////////////////////////
- gui_startBot="<center><button style='background-color:red' onclick='pause=!pause;startBot();'>Start Bot</button><br></center>";
- gui_pauseBot="<center><button style='background-color:green' onclick='pause=!pause;pauseBot();'>Pause Bot</button><br></center>";
- $('.hero__main').append("<div id='bot_controls' style='background-color:black'>"+gui_startBot+"</div>");
- $('.hero__main').append("<div id='bot_stats' style='background-color:black'></div>");
- $('.hero__main').append("<div id='resetswitch' style='background-color:black'><center><button onclick='reset_stats();'>Reset Session</button></center></div>");
- bot_controls=document.getElementById('bot_controls');
- bot_stats =document.getElementById('bot_stats');
- setInterval(function (){
- if(pause===false){
- if(truebet>max_wager){truebet=max_wager;}
- if(truebet<min_wager){truebet=min_wager;}
- if(roll_remaining===true && balance<truebet && balance>1){
- betData = {
- amount: Math.floor(balance),
- condition: truecondition,
- target: winchance
- }
- }else{
- betData = {
- amount: Math.floor(truebet),
- condition: truecondition,
- target: winchance
- }
- }
- $.ajax({
- url: 'https://api.primedice.com/api/bet?access_token='+localStorage.token,
- type: 'POST',
- data: betData,
- datatype: 'json',
- async: true,
- success: function (data, textStatus, jqXHR){
- balance=data.user.balance-1;
- session_profit+=data.bet.profit;
- if(switch_hilow>0){
- hilow_count++;
- if(hilow_count>=switch_hilow){
- hilow_count=0;
- if(truecondition=='<'){truecondition='>';}
- else{truecondition='<';}
- winchance-=100;
- winchance*=-1;
- }
- }
- if(random_condition===true){
- var rnd=Math.floor((Math.random()*2)+1);
- if(rnd==1){newcondition='>';}else{newcondition='<';}
- if(newcondition!=truecondition){
- truecondition=newcondition;
- winchance-=100;
- winchance*=-1;
- }
- }
- if(redstreak>max_redstreak){max_redstreak=redstreak;}
- if(session_profit>0){session_profitColor="<font color='green'>";}
- else{session_profitColor="<font color='red'>";}
- bot_stats.innerHTML="Statistics:"+
- "<br>Current Bet: "+Math.floor(truebet)+
- "<br>Session Profit: "+session_profitColor+session_profit+"</font>"+
- "<br>RedStreak: "+redstreak+"("+max_redstreak+")";
- if(data.bet.win===true){ //Bet Won://
- truebet*=win_multiplier;
- truebet+=win_increment;
- if(win_reset===true){truebet=basebet;}
- redstreak=0;
- if(stop_on_win===true){pause=true;}
- }else{ //Bet Lost://
- truebet*=loss_multiplier;
- truebet+=loss_increment;
- if(loss_reset===true){truebet=basebet;}
- redstreak++;
- }
- $('.btn__text.select div').html("Balance:"+(balance/100000000).toFixed(8));
- localStorage.session_profit= Number(session_profit);
- localStorage.max_redstreak = Number(max_redstreak);
- localStorage.redstreak = Number(redstreak);
- }
- });
- }
- }, 150);
- function reset_stats(){
- localStorage.session_profit=0;
- localStorage.max_redstreak =0;
- localStorage.redstreak =0;
- session_profit=0;
- max_redstreak =0;
- redstreak=0;
- xlossdata=0;
- }
- function pauseBot(){pause=true; bot_controls.innerHTML=gui_startBot;}
- function startBot(){pause=false;bot_controls.innerHTML=gui_pauseBot;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement