freebit.co script


SUBMITTED BY: Guest

DATE: May 26, 2015, 4:58 p.m.

FORMAT: Text only

SIZE: 2.6 kB

HITS: 2069

  1. function reset(){
  2. $('#double_your_btc_stake').val(startValue);
  3. }
  4. // quick and dirty hack if you have very little bitcoins like 0.0000001
  5. function deexponentize(number){
  6. return number * 1000000;
  7. }
  8. function iHaveEnoughMoni(){
  9. var balance = deexponentize(parseFloat($('#balance').text()));
  10. var current = deexponentize($('#double_your_btc_stake').val());
  11. return ((balance*2)/100) * (current*2) > stopPercentage/100;
  12. }
  13. function stopBeforeRedirect(){
  14. var minutes = parseInt($('title').text());
  15. if( minutes < stopBefore )
  16. {
  17. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  18. stopGame();
  19. return true;
  20. }
  21. return false;
  22. }
  23. // Unbind old shit
  24. $('#double_your_btc_bet_lose').unbind();
  25. $('#double_your_btc_bet_win').unbind();
  26. // Loser
  27. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  28. if( $(event.currentTarget).is(':contains("lose")') )
  29. {
  30. console.log('You LOST! Multiplying your bet and betting again.');
  31. multiply();
  32. setTimeout(function(){
  33. $loButton.trigger('click');
  34. }, getRandomWait());
  35. //$loButton.trigger('click');
  36. }
  37. });
  38. // Winner
  39. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event){
  40. if( $(event.currentTarget).is(':contains("win")') )
  41. {
  42. if( stopBeforeRedirect() )
  43. {
  44. return;
  45. }
  46. if( iHaveEnoughMoni() )
  47. {
  48. console.log('You WON! But don\'t be greedy. Restarting!');
  49. reset();
  50. if( stopped )
  51. {
  52. stopped = false;
  53. return false;
  54. }
  55. }
  56. else
  57. {
  58. console.log('You WON! Betting again');
  59. }
  60. setTimeout(function(){
  61. $loButton.trigger('click');
  62. }, getRandomWait());
  63. }
  64. });startGame()

comments powered by Disqus