Just-Dice Script!


SUBMITTED BY: Guest

DATE: July 10, 2013, 8:18 a.m.

FORMAT: Text only

SIZE: 1.6 kB

HITS: 1585

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

comments powered by Disqus