SHARE
TWEET

Fibo_Modified_beta

a guest May 24th, 2019 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --@ Fibo_for_faucets_by_Keiichi_1.0.2
  2.  
  3. --@ Fibonacci function written by -CttCJim- (c)
  4.  
  5. --@ In case u win and want to share =)
  6. --@ BTC: 14Jr2M5VjNJnotXsDEMEnP8TSgGfe4zt5J
  7. --@ ETH: 0x43838a1fbaa28B1EB53aF1b227C206d232aEb72A
  8. --@ DASH: Xx8AmwBBNTniZCjf4E4RdabjZLfjXEPxjM
  9. --@ LTC: LP6J8n2zcghbkm9joZmEgK7qeXweFe4B2s
  10. --@ ty
  11.  
  12.  
  13. -----------------SETTINGS------------------
  14. -------------------------------------------
  15.  
  16. -------------------------------------------
  17. ----CHANGE-ACCURDING-TO-USED-CURRENCY------
  18.  
  19. basebet = 10  -- Will be used as basebet by default if 'autotune = false'
  20. --@ Use whole integers (i.e. "10" = 10 sats = 0.00000010)
  21.  
  22. targetb = 0.005 -- Target Balance
  23. --@ Rolling will stop when this balance reached
  24.  
  25. -----------DONT-CHANGE-FOR-BTC-------------
  26. -------------------------------------------
  27.  
  28.  
  29. -------------------------------------------
  30. ----ADJUST-THIS-SETTIN GS-TO-UR-PLAYSTYLE---
  31.  
  32.  
  33. HUNTChance = 1 -- Chance that will be used during Hunting Stage  (try 0.44 - 1.11 -  1.44 - 1.77 - 2.00 - 2.22 - 2.44 )
  34. --@ The Fibo Stage will start with this chance
  35.  
  36. fibStepBase = 0.066  -- Fibonacci stepping amount (can decrease up to 0.066 for less risk and less profit)
  37. --@ Will adjust each FiboStep on this number
  38.  
  39. chanceStepBase = 0.033 -- Chance stepping amount  (can increase up to 0.044 for less risk and less profit)
  40. --@ Will increase chance on this amount each roll during Fibo-Stage
  41. ------------------------------------------
  42. -------------------------------------------
  43.  
  44.  
  45.  
  46.  
  47.  
  48. -------------------------------------------
  49. HUNTRollsNumber = 3  -- Number of rolls to do during Hunting Stage
  50. --@ Put 0 if you want to use the number based on selected HUNTChance
  51.  
  52. HUNTRollsPercent = 0.0 -- Number of rolls to do during Hunting Stage in % according to selected HUNTChance
  53. --@ i.e 1.00 = 100% - 100 rolls for x100 or 990 rolls for x990. Put 0 if you want to use plain number selected in HUNTRollsNumber
  54.  
  55. bbMult = 100.0  -- Multiplier for Hunting. Basebet will be multiplied by this number during Huntung Stage.
  56. --@ WILL NOT INFLUENCE THE FIBO STAGE (Change basebet for that)
  57.  
  58. minbet = basebet  -- Will be used if 'autotune = true' as minimum possible bet
  59. --@ Use whole integers
  60. -------------------------------------------
  61.  
  62.  
  63. -------------------MISC-------------------
  64. showStats = true -- Show stats in console
  65. --@ Can slow down the rolling. Try switching to false.
  66.  
  67. sound = true -- 'Pling' on Win
  68.  
  69. housePercent = 1 -- House Edge used by casino. Used for number of HUNT rolls calculation
  70. --@ Leave 1 as default if not known
  71.  
  72. seedEachRoll = false-- Set to true to change seed on each roll (Dont use together with seedOnWin)
  73.  
  74. seedOnWin = true-- Set to true to change seed on win (Dont use together with seedEachRoll)
  75.  
  76. HiLoOnWin = false-- Set to true to change HiLo on 1-3 wins randomly
  77.  
  78. HiLoAvgCalc = false -- Set to true to change HiLo dynamicly based on previous rolls
  79.  
  80. autotune = false -- Set to true to calculate basebet based on current balance
  81. -------------------------------------------
  82. -------------------------------------------
  83. -------------------------------------------
  84.  
  85.  
  86.  
  87.  
  88.  
  89. --------------BASE-VARIABLES---------------
  90. betCount = 0
  91. chanceStep = chanceStepBase
  92. fibstep = fibStepBase
  93. if HUNTRollsPercent > 0 then
  94.   winAmount = (100 - (100 * (housePercent / 100))) / HUNTChance
  95.   fiboStart = winAmount * HUNTRollsPercent
  96. end
  97. if HUNTRollsNumber > 0 then
  98.   fiboStart = HUNTRollsNumber
  99. end
  100. curbal = balance
  101. targetpercent = curbal / targetb * 100
  102. bbs = curbal / minbet
  103. wincount = 0
  104. change = 0
  105. minbet = minbet * 0.00000001
  106. basebet = basebet * 0.00000001
  107. stepsTo100 = 100 / chanceStepBase
  108. currentStep = 0
  109. lossCount = 0
  110. stepCount = 0
  111. highLowAverage = {}
  112. averageCount = 0
  113. averageIndex = 0
  114. averageMax = 4
  115. if not (HiLoAvgCalc) and not (HiLoOnWin) then
  116.   bethigh = true
  117. end
  118. name = "|             HUNT-STAGE                 |"
  119. huntName1 = "Chance = " .. string.format("%3.2f",HUNTChance) .. "%"
  120. huntName2 = "Payout = x" .. string.format("%3.0f",9900 / (HUNTChance * 100))
  121. huntName3 = "Range: > " .. string.format("%3.0f",9999 - (HUNTChance * 100)) .. " or <" .. string.format("%3.0f",(HUNTChance * 100))
  122. HC = 1
  123. -------------------------------------------
  124.  
  125.  
  126.  
  127. --------------HiLo-AVERAGE-ARRAY-----------
  128. for i=0, averageMax do
  129.   highLowAverage[i] = 0
  130. end
  131. -------------------------------------------
  132.  
  133.  
  134. --------------BASEBET-AUTOCALC-------------
  135. function autocalc()
  136.   if(autotune == true) then
  137.     if(lossCount == 0) then
  138.       basebet = balance / 100000
  139.       basebet = basebet / (10 - HUNTChance)
  140.       if basebet < minbet then
  141.         basebet = minbet
  142.       end
  143.     end
  144.   end
  145. end
  146. -------------------------------------------
  147.  
  148.  
  149. --------------FIBO-CALCULATION-------------
  150. --@ Routine was written by -CttCJim- (c)
  151. function myfib(level)
  152.   fibno=basebet
  153.   temp=0
  154.   prevfibno=0
  155.   if level == 0 then
  156.     fibno= basebet
  157.   else
  158.     for j=0,level-1,1 do
  159.  
  160.       temp=fibno
  161.       fibno=fibno + (prevfibno * fibstep)
  162.       prevfibno=temp
  163.     end
  164.   end
  165.   return fibno
  166. end
  167. -------------------------------------------
  168.  
  169.  
  170. --------------STARTING-SETTINGS------------
  171. autocalc()
  172. chance = HUNTChance
  173. nextbet=basebet * bbMult
  174. -------------------------------------------
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. -------------------------------------------
  182. -------------------------------------------
  183. -------------------DOBET-------------------
  184. -------------------------------------------
  185. -------------------------------------------
  186. function dobet()
  187.  
  188.   betCount += 1
  189.   autocalc()
  190.   -------------------------------------------
  191.   if seedEachRoll then
  192.     resetseed()
  193.   end
  194.   ------------------ON-WIN-------------------
  195.   if win then
  196.  
  197.     if seedOnWin then
  198.       resetseed()
  199.     end
  200.  
  201.     if sound then
  202.       ching()
  203.     end
  204.  
  205.     if HiLoOnWin then
  206.       wincount += 1
  207.       change = math.random(1,3)
  208.       if wincount >= change then
  209.         bethigh = not bethigh
  210.         wincount = 0
  211.       end
  212.  
  213.     end
  214.     curbal = balance
  215.     if curbal >= targetb then
  216.       print("\n---------")
  217.       print("---------\n")
  218.       print("Target Reached - Congratulations ")
  219.       print("\n---------")
  220.       print("---------\n")
  221.       stop()
  222.     end
  223.  
  224.     name = "|             HUNT-STAGE                 |"
  225.     fibstep = fibStepBase -- reset
  226.  
  227.     if curbal > minbet * 6000 then
  228.       chance = HUNTChance * 0.25
  229.       HC = 0.25
  230.     end
  231.    
  232.     if curbal <= minbet * 6000 and curbal > minbet * 3000 then
  233.       chance = HUNTChance * 0.5
  234.         HC = 0.5
  235.     end
  236.    
  237.     if curbal <= minbet * 3000 and curbal > minbet * 1500 then
  238.       chance = HUNTChance * 0.75
  239.        HC = 0.75
  240.     end
  241.    
  242.     if curbal <= minbet * 1500 then
  243.       chance = HUNTChance
  244.        HC = 1
  245.     end
  246.  
  247.     chanceStep = chanceStepBase -- reset
  248.     lossCount = 0 -- reset
  249.     nextbet = basebet * bbMult -- reset
  250.     stepCount = 0 -- reset
  251.     ------------------------------------------
  252.  
  253.  
  254.     -----------------ON-LOSE------------------
  255.   else
  256.     lossCount += 1
  257.  
  258.     if lossCount > fiboStart then
  259.       stepCount += 1
  260.       name = "|             FIBO-STAGE                   |"
  261.  
  262.       if lossCount <= fiboStart + (stepsTo100 * 0.02) then
  263.         fibstep = fibStepBase -- * 0.55
  264.         chanceStep = chanceStepBase -- * 0.93
  265.       elseif lossCount <= fiboStart + (stepsTo100 * 0.03) then
  266.         fibstep = fibStepBase -- * 0.66
  267.         chanceStep = chanceStepBase -- * 1.11
  268.       elseif lossCount <= fiboStart + (stepsTo100 * 0.05) then
  269.         fibstep = fibStepBase -- * 0.77
  270.         chanceStep = chanceStepBase -- * 1.22
  271.       elseif lossCount <= fiboStart + (stepsTo100 * 0.07) then
  272.         fibstep = fibStepBase -- * 0.88
  273.         chanceStep = chanceStepBase -- * 1.33
  274.       elseif lossCount <= fiboStart + (stepsTo100 * 0.09) then
  275.         fibstep = fibStepBase
  276.         chanceStep = chanceStepBase -- * 1.11
  277.       elseif lossCount <= fiboStart + (stepsTo100 * 0.11) then
  278.         fibstep = fibStepBase
  279.         chanceStep = chanceStepBase
  280.       else
  281.         fibstep = fibStepBase
  282.         chanceStep = chanceStepBase -- * 0.88
  283.       end
  284.  
  285.       chance += chanceStep
  286.       nextbet = myfib(stepCount)
  287.     end
  288.   end
  289.   ------------------------------------------
  290.  
  291.  
  292.  
  293.   -----------LoHi-AVERAGE-CALC------------
  294.   if HiLoAvgCalc then
  295.     if(lastBet.Roll >= 50) then
  296.       highLowAverage[averageIndex] = 1
  297.     else
  298.       highLowAverage[averageIndex] = 0
  299.     end
  300.     averageIndex += 1
  301.     if(averageIndex >= averageMax) then
  302.       averageIndex = 0
  303.     end
  304.     if(averageCount < averageMax) then
  305.       averageCount += 1
  306.     end
  307.     average = 0.00
  308.     for i=0, averageCount do
  309.       average += highLowAverage[i]
  310.     end
  311.     average = average / averageCount
  312.     if average >= 0.5 then
  313.       bethigh = true
  314.     else
  315.       bethigh = false
  316.     end
  317.   end
  318.   -----------------------------------------
  319.  
  320.  
  321.  
  322.   ----------------BALANCE------------------
  323.   curbal = balance
  324.   targetpercent = curbal / targetb * 100
  325.   bbs = curbal / minbet
  326.   -----------------------------------------
  327.  
  328.   if nextbet > curbal then
  329.     nextbet = curbal
  330.   end
  331.  
  332.   if curbal <= minbet then
  333.     stop()
  334.   end
  335.  
  336.   ----------------PRINTS-------------------
  337.   if showStats then
  338.     print("\n---------\n")
  339.     print("\n---------\n")
  340.     print("\n---------\n")
  341.     print("\n---------\n")
  342.     print("\n---------\n")
  343.     print("\n---------\n")
  344.     print("\n---------\n")
  345.     print("\n---------\n")
  346.     print("\n---------\n")
  347.     print("\n---------\n")
  348.     print("\n---------\n")
  349.     print("\n---------\n")
  350.     print("\n---------\n")
  351.     print("\n------------------------------------------------------")
  352.     print("------------------------------------------------------")
  353.     print("|                                                     |")
  354.     print(name)
  355.     if name == "|             HUNT-STAGE                 |" then
  356.       print("|                                                     |")
  357.       print("|           " .. huntName1 .. "                |")
  358.       print("|                                                     |")
  359.       print("|           " .. huntName2 .. "                 |")
  360.       print("|                                                     |")
  361.       print("|       " .. huntName3 .. "           |")
  362.       print("|                                                     |")
  363.       print("|        Rolls = " .. lossCount .. "  Out Of  " .. string.format("%3.0f",fiboStart) .. "            |")
  364.       print("|                                                     |")
  365.     else
  366.       print("|                                                     |")
  367.       print("|      Current Fibo Step = " .. string.format("%3.3f",fibstep) .. "       |")
  368.       print("|                                                     |")
  369.       print("|    Current Chance Step = " .. string.format("%3.3f",chanceStep) .. "     |")
  370.       print("|                                                     |")
  371.       print("|          LoseStreak = " .. lossCount .. "                 |")
  372.       print("|                                                     |")
  373.     end
  374.     print("------------------------------------------------------")
  375.     print("------------------------------------------------------\n")
  376.     print("\n---------\n")
  377.     if HC == 1 then
  378.     print("1")
  379.     end
  380.     if HC == 0.75 then
  381.     print("0.75")
  382.     end
  383.     if HC == 0.5 then
  384.     print("0.5")
  385.     end
  386.     if HC == 0.25 then
  387.     print("0.25")
  388.     end
  389.    
  390.     print("bbs = " .. string.format("%3.0f",bbs))
  391.     print("\n---------\n")
  392.     print("Total Bets = " .. betCount)
  393.     print("\n\nTarget Balance = " .. targetb)
  394.     print("\n% of Target Reached = " .. string.format("%3.2f",targetpercent) .. "%")
  395.     print("\n---------\n")
  396.     print("\n---------\n")
  397.   end
  398.   -----------------------------------------
  399.   -----------------------------------------
  400.   -----------------------------------------
  401.  
  402. end
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