Advertisement
alfarishi

dice

Apr 6th, 2020
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- PROSSESING
  2. alecon = {2, 3, 4, 5, 7, 9, 12, 16, 21, 32, 47, 67}
  3. progressionIndex = 1
  4. progressionWinned = 0
  5.  
  6. phase = 1
  7. maxPhase = 1
  8. phaseStart = 1
  9. go = true
  10.  
  11. -- starting setup
  12. div     = 10000000
  13. base    = 0.0000001
  14. target  = 1000000
  15. SL      = balance * 0.981
  16. nextbet = alecon[progressionIndex] * base
  17.  
  18. -- chances
  19. chance = math.random(6500,7500)/100
  20. bigchance = math.random(6200,7700)/100
  21. smallchance = 100 - bigchance
  22.  
  23. -- multipliers
  24. multi = 1.10
  25. a = alecon[progressionIndex] * base
  26.  
  27. -- counters
  28. lossCounter = 0
  29. winCounter = 0
  30.  
  31. -- ****** RESET ***********************
  32. function ResetAlecon()
  33.     phase            = 1
  34.     maxPhase         = 1
  35.     phaseStart       = 1
  36.     chance           = bigchance
  37.     progressionIndex = 1
  38.     base             = 0.0000001
  39.     SL               = balance * 0.981  -- rischio 5%
  40.     print("SL: "..SL)
  41.  
  42.     -- basebet = balance / 800
  43.     sleep (math.random(10000,15000))
  44.     resetseed ()
  45.    
  46.   end
  47. -- ************************************
  48.  
  49. -- ****** SET PHASE *******************
  50. function SetPhase(index)
  51.     local newPhase = GetPhaseFromIndex (index)
  52.   print(newPhase)
  53.  
  54.   if(newPhase > maxPhase) then
  55.     maxPhase = newPhase
  56.   end
  57.  
  58.   if(maxPhase == 3) then
  59.     phaseStart = 2
  60.   elseif(maxPhase == 4) then
  61.     phaseStart = 3
  62.   elseif(maxPhase == 5) then
  63.     phaseStart = 4
  64.   end
  65.  
  66.   phase = newPhase
  67. end
  68. -- ************************************
  69.  
  70.  
  71. -- ****** GET PHASE *******************
  72. function GetPhaseFromIndex (index)
  73.     if(index < 7) then
  74.       -- phase 1
  75.       return 1
  76.  
  77.     elseif(index < 10) then
  78.       -- phase 2
  79.       return 2
  80.  
  81.     elseif(index < 11) then
  82.       -- phase 3
  83.       return 3
  84.  
  85.     elseif(index < 12) then
  86.       -- phase 4
  87.       return 4
  88.  
  89.     elseif(index < 13) then
  90.       -- phase 5
  91.       return 5
  92.     end
  93. end
  94. -- ************************************
  95.  
  96. -- ********* WIN **********************
  97. function ProcessWin ()
  98.  
  99.     -- azzero i contatori
  100.     lossCounter = 0
  101.     winCounter += 1
  102.  
  103.     if (go) then
  104.         go        = false
  105.         a         = alecon[progressionIndex] * base
  106.         bigchance = math.random(6300,8700)/100
  107.         chance    = bigchance
  108.         mukti     = 1
  109.     else
  110.         if(alecon[progressionIndex] == 67) then
  111.             -- Finished Progression
  112.             progressionWinned += 1
  113.             ResetAlecon()
  114.         else
  115.             if winCounter > 1 then
  116.                 progressionIndex += 1
  117.                 SetPhase(progressionIndex)
  118.             end
  119.         end
  120.     end
  121.  
  122. end
  123. -- ************************************
  124.  
  125. -- ********* LOSS *********************
  126. function ProcessLoss ()
  127.  
  128.     -- alla prima perdita inverto alto/basso
  129.     if  lossCounter == 0 then
  130.         bethigh = !bethigh
  131.  
  132.         -- modifica chance
  133.         chance = smallchance
  134.         smallchance = 120 - bigchance
  135.         if smallchance < 39.37 then
  136.             multi = 3.168
  137.         end
  138.         if smallchance >= 39.37 then
  139.             multi = 3.565
  140.         end
  141.  
  142.         go = true
  143.     end
  144.  
  145.     -- azzero i contatori
  146.     lossCounter += 1
  147.     winCounter = 0
  148.     nextbet = previousbet*multi
  149.  
  150.    
  151. end
  152. -- ************************************
  153.  
  154. -- ******** DO BET ********
  155. function dobet ()
  156.  
  157.     print  ("fase: "..phase)
  158.     -- condizione TP
  159.     if balance > target  then
  160.         print ("Target archived!")
  161.         stop ()
  162.     end
  163.  
  164.     -- controllo risultato precedente
  165.     -- per applicare modifiche sullo stato
  166.     if (win) then
  167.         ProcessWin ()
  168.         -- imposto la prossima bet
  169.         nextbet = alecon[progressionIndex] * base
  170.     else
  171.         ProcessLoss ()
  172.     end
  173.    
  174.     -- in casi specials
  175.     if (lossCounter > 1) then
  176.         go = true
  177.     end
  178.  
  179.     if (lossCounter == 1) then
  180.         chance = smallchance
  181.         nextbet = a*multi
  182.         go = true
  183.     end
  184.  
  185.     if (lossCounter == 5) then
  186.         lossCounter = 0
  187.         a = previousbet
  188.         chance = bigchance
  189.         sleep(math.random(1000,5000))
  190.         go = false
  191.  
  192.         -- reimposto la progressione
  193.         if (phase == 1) then
  194.             progressionIndex = phaseStart
  195.         elseif (phase >= 2) then
  196.             progressionIndex -= 2
  197.             SetPhase(progressionIndex)
  198.          end
  199.     if  balance>target  then
  200.            stop()
  201.          end
  202.         end
  203.     end
  204.  
  205. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement