Advertisement
CrimsonNoble

Auto-Tip Bot-Static Base Balance-

Mar 19th, 2015
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. CrimsonNoble's Auto-Tip Bot.
  3.   -Static Base Balance-
  4. */
  5. tippingPoint  =0.00050001;
  6. minimumBalance=0.00050001;
  7. bankName      ="CrimsonBank";
  8. //Edit Above this Line//
  9. minimumBalance*=100000000;tippingPoint*=100000000;balance=0;pending=true;
  10. var tippedTotal=0;
  11. if(!isNaN(localStorage.tippedTotal)){tippedTotal=Number(localStorage.tippedTotal);}
  12. checkBalance();
  13. setInterval(function (){
  14.   if(!pending&&balance>=(minimumBalance+tippingPoint)){
  15.     tip(bankName,(balance-minimumBalance));  
  16.     pending=true;
  17.   }
  18. },500);
  19. setInterval(function (){checkBalance();},2000);
  20. function checkBalance(){
  21.         $.ajax({
  22.                     url: 'https://api.primedice.com/api/users/1?access_token='+localStorage.token,
  23.                     type: 'GET',
  24.                     datatype: 'json',
  25.                     async: true,
  26.                     success: function (data, textStatus, jqXHR){  
  27.                       balance=Math.floor(data.user.balance);
  28.                       $('.btn__text.select div').html(""+(balance/100000000).toFixed(8)+"<br>"+(tippedTotal/100000000).toFixed(8)+"(Banked)<br><center><button style='background-color:white' onclick='localStorage.tippedTotal=0;tippedTotal=0;'>Reset Session</button><br></center>");                      
  29.                      
  30.                       pending=false;
  31.                     }
  32.         });
  33. }  
  34. function tip(username, amount){
  35.   $.post("https://api.primedice.com/api/tip?access_token="+localStorage.token,{username: username, amount: amount}).success(function(){
  36.       tippedTotal+=amount;
  37.       localStorage.tippedTotal=Number(tippedTotal);
  38.   });
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement