SHARE
TWEET

Untitled

a guest Dec 14th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const baseBet = 100              
  2. const target = 1.10                    
  3. const resetTargetAt = 10
  4. const resetTargetTo = 2
  5.  
  6. const betMultiplier = 0.5    
  7. const increaseTargetEvery = 1
  8.  
  9. const TargetProfit = 2000  
  10. const dontLoseThan = 500
  11.  
  12.  
  13. const repeatBetTimes = 2
  14.  
  15. const engine = this
  16. let _baseBet = baseBet
  17. let lossCount = 1
  18. let _target = target
  19. let incLose  = 0
  20.  
  21. this.log(`Starting martingale with a base bet of ${baseBet} satoshis.`)
  22. while (true){
  23.     checkConditions(this.balance)
  24.     collectSound()
  25.     //if (this.balance - betSize(lossCount) < dontLoseThan){}
  26.    // if (betSize(lossCount) > 50 * 100){
  27.     //    lossCount = 1
  28.    // }
  29.    // let lossRepeat = lossCount / repeatBetTimes +1
  30.   //  if (lossRepeat <= 0){lossRepeat = 1}
  31.         const {multiplier} = await this.bet(betSize(lossCount), _target)
  32.     if (multiplier < _target) { // loss
  33.         incLose++
  34.         if (incLose >= increaseTargetEvery ){
  35.             _target = _target + betMultiplier
  36.             incLose =0
  37.             if (_target >=resetTargetAt ){
  38.                 _target = resetTargetTo
  39.                 _baseBet  = (_baseBet+100)
  40.                 incLose = 0
  41.             }
  42.         }
  43.         lossCount++
  44.         this.log(`Lost bet. new bet size of ${betSize(lossCount)/100}.`)
  45.     } else {   /*  [WINS]  */
  46.         incLose = 0
  47. _baseBet = baseBet
  48.         lossCount = 1
  49.         if (lossCount <= 1){
  50.             lossCount = 1
  51.         }
  52.         gong()
  53.         incLose = 0
  54.         _target = target
  55.         this.log(`Won bet. Setting bet size to ${baseBet/100}.`)
  56.     }
  57. }
  58. function betSize(lossCount) {
  59.       let bet = (_baseBet) * lossCount
  60.       return bet
  61.   }
  62.  
  63. function gong() {
  64.   const audio = new Audio("https://bustadice.com/5bb187b7ef764e76fb519939f77288c1.mp3")
  65.   audio.play()
  66.   return new Promise(resolve => audio.onended = resolve)
  67. }
  68. function collectSound(){
  69.     const audio = new Audio ("http://kz-developer.ru/sounds/chipsHandle6.wav")
  70.     audio.play()
  71.     return new Promise(resolve => audio.onended = resolve)
  72. }
  73. async function generateSeed(){
  74.     const { server_seed_hash } = await engine.newSeedPair()
  75.     engine.log(`Server seed: ${server_seed_hash}`)
  76.     try {
  77.         const clientSeed = randomSeed()
  78.         await engine.setClientSeed(clientSeed)
  79.         engine.log(`Seed was set to: ${clientSeed}`)
  80.     }
  81.     catch(e){
  82.         engine.log(`Client seed already was reset and not used`)
  83.     }
  84. }
  85. function randomSeed(){
  86.     const words = ['Ze3foA1gAlpha ','Zefo3AG3B2r2a3qtwvo ','Zefo3AG313Charlie ','ZefoA22G3Delta ','Zef3o1GEcho ','ZefoA22G5oxtrot ','ZefoAG34G223tewlf ','Ze1o5A3GHotel ','ZefoA3dda ','Ze5f3Auliet ','ZefoAGK3agalo ','ZefoAG24rqwima ',
  87.     'Zef5oAG2Mrhe ','ZefoAG52ovember ','Ze67foGOscar ','Zefo3A45apayww ','Zef44A2Quebec ','ZefoAG433omeo ','ZefoA4GSierra ','ZefoA41GTngo ','ZefoA445GUniorm ','Ze37oGVictor ','ZefoA33W4hiskey ','ZefA3G4oXay ','Zef4Gpooper ','ZefoA3GZulu ']
  88.  
  89.     return words[Math.floor(words.length * Math.random())] + words[Math.floor(words.length * Math.random())] + words[Math.floor(words.length * Math.random())]}
  90.  
  91. async function stopGame(){
  92.   await engine.stop()
  93. }
  94. function checkConditions(balance){
  95.     if(balance / 100 >= TargetProfit){
  96.         engine.log(`You just did your profits, terminating script`)
  97.         stopGame()
  98.     }
  99.     if(balance / 100 <= dontLoseThan){
  100.         engine.log(`Stopper triggered script to terminate`)
  101.         stopGame()
  102.     }
  103. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top