Keiich

Fibo_faucets_Keiichi

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