freebtc


SUBMITTED BY: antoineh1

DATE: May 4, 2016, 5:43 p.m.

FORMAT: Text only

SIZE: 1.9 kB

HITS: 455

  1. $('#double_your_btc_stake').val(multiply);
  2. }
  3. function getRandomWait(){
  4. var wait = Math.floor(Math.random() * maxWait ) + 100;
  5. console.log('Waiting for ' + wait + 'ms before next bet.');
  6. return wait ;
  7. }
  8. function startGame(){
  9. console.log('Game started!');
  10. reset();
  11. $loButton.trigger('click');
  12. }
  13. function stopGame(){
  14. console.log('Game will stop soon! Let me finish.');
  15. stopped = true;
  16. }
  17. function reset(){
  18. $('#double_your_btc_stake').val(startValue);
  19. }
  20. function deexponentize(number){
  21. return number * 10000000;
  22. }
  23. function iHaveEnoughMoni(){
  24. var balance = deexponentize(parseFloat($('#balance').text()));
  25. var current = deexponentize($('#double_your_btc_stake').val());
  26. return ((balance)*2/100) * (current*2) > stopPercentage/100;
  27. }
  28. function stopBeforeRedirect(){
  29. var minutes = parseInt($('title').text());
  30. if( minutes < stopBefore )
  31. {
  32. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  33. stopGame();
  34. return true;
  35. }
  36. return false;
  37. }
  38. $('#double_your_btc_bet_lose').unbind();
  39. $('#double_your_btc_bet_win').unbind();
  40. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  41. if( $(event.currentTarget).is(':contains("lose")') )
  42. {
  43. console.log('You LOST! Multiplying your bet and betting again.');
  44. multiply();
  45. setTimeout(function(){
  46. $loButton.trigger('click');
  47. }, getRandomWait());
  48. }
  49. });
  50. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event){
  51. if( $(event.currentTarget).is(':contains("win")') )
  52. {
  53. if( stopBeforeRedirect() )
  54. {
  55. return;
  56. }
  57. if( iHaveEnoughMoni() )
  58. {
  59. console.log('You WON! But don\'t be greedy. Restarting!');
  60. reset();
  61. if( stopped )
  62. {
  63. stopped = false;
  64. return false;
  65. }
  66. }
  67. else
  68. {
  69. console.log('You WON! Betting again');
  70. }
  71. setTimeout(function(){
  72. $loButton.trigger('click');
  73. }, getRandomWait());
  74. }
  75. });startGame()

comments powered by Disqus