DATE: Wed, 10 Jul 2013 08:18:34 +0000 | SIZE: 1.57 KB | SYNTAX: NONE | HITS: 562 | EXPIRES IN: NEVER


  1. /*
  2. Commands:
  3. start()         - Start the Martingale Bot
  4. stopNow()       - Stop the Martingale Bot
  5. stopAfterWin()  - Stop the Martingale Bot After Winning
  6. */
  7.  
  8. //Settings
  9. var initialBet = "0.0000005";//CHANGE THIS TO YOUR START BET LEAVE EVERYTHING ELSE ALONE
  10. var chanceToWin = "49.5";
  11.  
  12. //Your don't need to change anything below here
  13. var payoutMultiplier;
  14. var martingaleMultiplier;
  15. var nextBet;
  16. var bStopNow = false;
  17. var bStopAfterWin = false;
  18.  
  19. function start() {
  20.     payoutMultiplier = 99/parseFloat(chanceToWin);
  21.     martingaleMultiplier = payoutMultiplier/(payoutMultiplier-1);
  22.     nextBet = parseFloat(initialBet);
  23.     roll();
  24. }
  25.  
  26. function stopNow() {
  27.     bStopNow = true;
  28. }
  29.  
  30. function stopAfterWin() {
  31.     bStopAfterWin = true;
  32. }
  33.  
  34. function roll() {
  35.     var hi_lo = Math.round(Math.random());
  36.     if (hi_lo == 0)
  37.         hi_lo = 'hi';
  38.     else
  39.         hi_lo = 'hi';
  40.    socket.emit("bet", csrf, { chance: chanceToWin, bet: nextBet.toFixed(8), which: hi_lo });
  41. }
  42.  
  43. socket.on("wins", function (data) {
  44.     if (bStopNow || bStopAfterWin)
  45.     {
  46.         bStopNow = false;
  47.         bStopAfterWin = false;
  48.         return;
  49.     }
  50.     nextBet = parseFloat(initialBet);
  51.     roll();
  52. });
  53. socket.on("losses", function (data) {
  54.     if (bStopNow)
  55.     {
  56.         bStopNow = false;
  57.         return;
  58.     }
  59.     nextBet = nextBet * martingaleMultiplier;
  60.     roll();
  61. });
  62. socket.on("jderror", function (data) {
  63.     roll();
  64. });


comments powered by Disqus