Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. var config = {};
  2.  
  3. var base_amount = 5;
  4. var restart_after_win = true;
  5. var start_after_no90 = 100;
  6.  
  7. /* DO NOT EDIT AFTER THIS */
  8.  
  9. var amount = base_amount;
  10. var losses = 0, vlosses = 0, no90 = 0;
  11. var playing = false, active = true;
  12.  
  13. engine.on('GAME_STARTING', function () {
  14. if(playing) {
  15. log(losses + ' losses, betting with ' + amount);
  16. engine.bet(parseInt(amount) * 100, 90);
  17. }
  18. });
  19.  
  20. engine.on('GAME_ENDED', function (game) {
  21. var below_90 = parseInt(game.bust) < 90;
  22. if(playing) {
  23. if (below_90) {
  24. losses++;
  25. if (losses < 125) {
  26. if (losses >= 80) amount = base_amount * 2;
  27. } else if (losses == 125) {
  28. amount = base_amount * 2.5;
  29. } else if (losses > 125) {
  30. vlosses++;
  31. if (vlosses == 22) {
  32. vlosses = 0;
  33. amount = amount + amount / 4;
  34. }
  35. }
  36. } else {
  37. if (restart_after_win) {
  38. log('won ' + (parseInt(amount) * 90) + ' bits, restarting');
  39. amount = base_amount;
  40. losses = vlosses = no90 = 0;
  41. playing = false;
  42. }
  43. else {
  44. playing = active = false;
  45. stop('won ' + (parseInt(amount) * 90) + ' bits, stopping');
  46. }
  47. }
  48. }else if(active) {
  49. if (below_90) {
  50. no90++;
  51. } else {
  52. no90 = 0;
  53. log('x90 event, counter reset');
  54. }
  55. if (no90 >= start_after_no90) playing = true;
  56. log('no x90 counter: ' + no90);
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement