dicekode

dicekode-filler

Oct 31st, 2020
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.13 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: berikan pada yang "berhak"
  6. -- This is GAMBLING! -- DWYOR (Do With Your Own Risk)
  7.  
  8. isTokens     = false -- Set to false for satoshi betting, true for tokens
  9. a            = 0
  10. roll         = 0
  11. target       = balance*1.1
  12. basechance   = 42   --sets your chance for placing a bet
  13. basebet      = 0.01      -- Base bet in whole numbers.
  14. basegambit   = 0.1 -- base gambit section betting in whole numbers
  15. prerolllimit = 3 -- length of loss set before gambit
  16. gambitlimit  = 2 -- number of gambit bets to make
  17. fibstep      = 0.135 -- Stepping for the fibonacci bet increments
  18. rollDelay    = 0 -- Sleep period in seconds.  Some sites need this
  19.  
  20.  
  21. -- Init variables
  22.  
  23.  
  24. nextbet            = basebet -- sets your first bet.
  25. chance             = basechance -- sets the chance to play at
  26. losscount          = 0 -- to count until set of losses
  27. waitforwin         = 0 -- Wait for a win after gambit
  28. gambit             = 0 -- flag for when doing 3-bet runs
  29. gambitcount        = 0 -- number of gambit bets performed currently
  30. gambitmult         = 0 -- gambit multiplier/counter
  31. streakStartBalance = 0
  32. previouscount      = 0
  33.  
  34. local clock = os.clock
  35. function sleep(n)  -- seconds
  36.     local t0 = clock()
  37.     while clock() - t0 <= n do end
  38. end
  39.  
  40. function myfib(level)
  41.     fibno=basegambit
  42.     temp=0
  43.     prevfibno=0
  44.     if level == 0 then
  45.         fibno= basebet
  46.     else
  47.         for j=0,level-1,1 do
  48.            
  49.             temp=fibno
  50.             fibno=fibno + (prevfibno * fibstep)
  51.             prevfibno=temp
  52.         end
  53.     end
  54.     return fibno    
  55. end
  56.  
  57.  
  58. function dobet()
  59. roll+=1
  60. if a==5 then
  61.     resetseed()
  62.     a=0
  63.     bethigh = !bethigh
  64. end
  65.    
  66. if roll>=50 then
  67.      resetseed()
  68.      print(" ")  
  69.      print("target: "..target)  
  70.      print("nextbet: "..nextbet)  
  71.      print("chance: "..chance)  
  72.      print("Profit to go: "..target -  balance)
  73.      print(" ")
  74. end
  75.  
  76. end
  77.     if win then
  78.         if gambit == 0 then -- win, regular roll
  79.             losscount = 0
  80.             waitforwin = 0
  81.         else -- win, gambit roll; reset everything
  82.             if(balance > streakStartBalance) then -- Reset everything
  83.                 a+=1
  84.                 gambitcount=0
  85.                 previouscount = 0
  86.                 gambit=0
  87.                 gambitmult = 0
  88.                 nextbet = basebet
  89.                 losscount = 0
  90.                 waitforwin = 0
  91.                 streakStartBalance = 0
  92.             else -- continue gambit
  93.                 gambit = 0
  94.                 previouscount -= 1
  95.                 if(previouscount < 1) then
  96.                     previouscount = 1
  97.                 end
  98.                 nextbet = basebet
  99.                 -- nextbet = myfib(previouscount)
  100.             end
  101.         end
  102.     else -- lost last roll
  103.         if(streakStartBalance == 0) then -- Get initial balance at the start of this run
  104.             streakStartBalance = balance
  105.         end
  106.         if gambit == 0 then -- lose, regular roll
  107.             losscount = losscount + 1
  108.             if losscount >= prerolllimit and waitforwin == 0 then -- turn on the gambit
  109.                 gambit = 1
  110.                 gambitcount = 1
  111.                 previouscount += 1
  112.                 -- gambitmult = gambitmult + 1
  113.                 nextbet = myfib(previouscount)
  114.                 -- nextbet = basebet * (multiplier^gambitmult)
  115.                 losscount = 0 -- primed for after the gambit
  116.             end
  117.         else -- lose, gambit roll
  118.             if gambitcount<gambitlimit and waitforwin == 0 then -- next bet is another gambit
  119.                 gambitcount = gambitcount + 1
  120.                 previouscount += 1
  121.                 nextbet = myfib(previouscount)
  122.             else -- gambit set over; go back to base bet but preserve previouscount
  123.                 nextbet = basebet
  124.                 gambitcount = 0
  125.                 gambit = 0
  126.                 waitforwin = 1
  127.             end    
  128.         end
  129.     end
  130.     sleep(rollDelay)
  131. end
  132.  
Add Comment
Please, Sign In to add comment