coinwalk

mark

May 18th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. function randomnum(min,max){
  2. return Math.floor(Math.random()*(Math.floor(max)-Math.floor(min)+1))+Math.floor(min);
  3. }
  4. function resetseed(){
  5. var a=document.getElementsByClassName('ManualSeedControls')[0];
  6. if(!a)return;
  7. if(a.style.display!='block'){
  8. console.log('Enabling manual seed');
  9. if(document.getElementById('AccountTabManualSeed')){
  10. document.getElementById('AccountTabManualSeed').click();
  11. }
  12. resetseed();
  13. }
  14. else{
  15. var b=a.getElementsByTagName('input')[0];
  16. if(b){
  17. b.value=randomnum(0,999999999);
  18. console.log('Seed changed: '+b.value);
  19. }
  20. }
  21. }
  22. function readbalance(){
  23. return Number(document.getElementsByClassName('UserBalance')[0].innerHTML);
  24. }
  25. function checkchange(){
  26. var a=document.getElementById('LastBetInfoProfit');
  27. var b=document.getElementById('LastBetInfoSecret');
  28. if(!a || !b)return false;
  29. if(Number(b.innerHTML)!==safe[0] || Number(a.innerHTML)!==safe[1]){
  30. safe=[Number(b.innerHTML),Number(a.innerHTML)];
  31. return true;
  32. }
  33. return false;
  34. }
  35. function checkwin(){
  36. if(!checkchange())return 'unchanged';
  37. var a=Number(document.getElementById('LastBetInfoProfit').innerHTML);
  38. var b=Number(document.getElementById('LastBetInfoSecret').innerHTML);
  39. return a>0?true:(a<0?false:'error');
  40. }
  41. function timestamp(){
  42. return Math.round(Date.now()/1000);
  43. }
  44. function dobet(){
  45. var t=document.getElementById("startstop");
  46. if(betting && t.value=='Start betting')t.value='Stop betting';
  47. else if(!betting && t.value=='Stop betting')t.value='Start betting';
  48. if(!betting)return;
  49. readbalance();
  50. win=checkwin();
  51. if(safe[0]!==0 && safe[1]!==0 && (win==='error' || win=='unchanged'))return;
  52. console.log('Win: '+win);
  53. if(win===false){ //lose
  54. kik++;
  55. resetseed();
  56. }
  57. else kik=0;
  58. if(kik>1)nextbet=previousbet*2;
  59. else nextbet=basebet;
  60. if(nextbet==previousbet*2)lol++;
  61. if(lol>=3)nextbet=previousbet;
  62. if(balance<=more/2)nextbet=previousbet*2.1;
  63. if(nextbet==previousbet*2.1){
  64. fuck++;
  65. if(fuck>1)nextbet=previousbet;
  66. }
  67. if(balance>more && a){
  68. nextbet=basebet;
  69. lol=0;
  70. more=balance;
  71. }
  72. if(balance<target){
  73. console.log('Balance: '+balance+' - Basebet: '+basebet+' ['+chance+'%] - Previousbet: '+previousbet+' - Nextbet: '+nextbet);
  74. document.getElementById('BetSizeInput').value=nextbet;
  75. document.getElementById('BetChanceInput').value=chance;
  76. document.getElementById('BetLowButton').click();
  77. }
  78. else{
  79. console.log('Target reached ('+target+')');
  80. betting=false;
  81. }
  82. }
  83. document.getElementById("ChatTabOtherRooms").innerHTML='<input id="startstop" type="button" onclick="betting=!betting;" value="Start betting">';
  84. var delay=1.5;//seconds
  85. var balance=readbalance();
  86. var chance=49.95;
  87. var kik=0;
  88. var fraction=100;
  89. var target=10000; //fixed amount
  90. var basebet=balance/fraction;
  91. var nextbet=basebet;
  92. var previousbet=basebet;
  93. var more=balance;
  94. var lol=0;
  95. var fuck=0;
  96. var time0=timestamp();
  97. var time1=time0;
  98. var win=false;
  99. var safe=[0,0]; //don't touch this
  100. var betting=false;
  101. setInterval(dobet,delay*1000);
Add Comment
Please, Sign In to add comment