Advertisement
dicekode

dicekode-fibonacci

Nov 23rd, 2020
822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. -- edited by DICEKODE
  2. -- youtube: https://www.youtube.com/channel/UC-BpueviNmn12aV_pBRY3gQ
  3. -- blog: https://dicekode.blogspot.com
  4. -- whatsapp: https://chat.whatsapp.com/Faes925uLw9HkhZeFHchFf
  5. -- linkdonasi: DTbhgnUi71WE9QFVRdQCN64xPeyMRoXAxP
  6. -- This is GAMBLING! -- DWYOR (Do With Your Own Risk)
  7.  
  8. basebet  = 0.01
  9. chance   = 80.1
  10. nextbet  = basebet
  11. level    = 0
  12. fibstep  = 1
  13. fibreset = 30
  14. target   = balance * 1.2
  15.  
  16. function fib(level)
  17.     fibno     = basebet
  18.     temp      = 0
  19.     prevfibno = 0
  20.     if (level  == 0) then
  21.         fibno = basebet
  22.     else
  23.         for j = 0,level-1,1 do    
  24.             temp      = fibno
  25.             fibno     = fibno + (prevfibno * fibstep)
  26.             prevfibno = temp
  27.         end
  28.     end
  29.     return fibno    
  30. end
  31.  
  32. function dobet()
  33.     if balance > target then stop() end
  34.     if win then
  35.         level += 1
  36.     else
  37.         level -= 1
  38.     end
  39.     if level > fibreset then
  40.         level = 0
  41.     end
  42.     nextbet = fib(level)  
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement