Advertisement
Guest User

pd bot

a guest
Nov 14th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. chance=2.7500
  2. nextbet=0.00014000
  3. bethigh=false
  4. currency="Ltc"
  5.  
  6. local lastBetID = nil
  7. local lastBetNumber = nil
  8.  
  9. function dobet()
  10. if win then
  11. if lastBetID == nil then
  12. lastBetID = lastBet.Id
  13. lastBetNumber = lastBet.Roll
  14. bethigh = not bethigh
  15. else
  16. if getNumberOfMatches(getUniqueDigits(lastBetNumber), getUniqueDigits(lastBet.Roll)) >= 2 then
  17. ching()
  18. print(lastBetID)
  19. print(lastBet.ID)
  20. stop()
  21. else
  22. resetHunt()
  23. end
  24. end
  25. else
  26. resetHunt()
  27. end
  28. end
  29.  
  30. function resetHunt()
  31. lastBetID = nil
  32. lastBetNumber = nil
  33. end
  34.  
  35. function round(x)
  36. return math.floor(x + 0.5)
  37. end
  38.  
  39. function getUniqueDigits(rollNumber)
  40. local digits = {}
  41. local digit4 = round((rollNumber * 100) % 10)
  42. local digit3 = round(((rollNumber * 100) % 100 - digit4) / 10)
  43. local digit2 = round(((rollNumber * 100) % 1000 - digit3 * 10 - digit4) / 100)
  44. local digit1 = round(((rollNumber * 100) - digit2 * 100 - digit3 * 10 - digit4) / 1000)
  45.  
  46. digits[digit1] = true
  47. digits[digit2] = true
  48. digits[digit3] = true
  49. digits[digit4] = true
  50.  
  51. return digits
  52. end
  53.  
  54. function getNumberOfMatches(set1, set2)
  55. local matchCount = 0
  56. for key1, value1 in pairs(set1) do
  57. if set2[key1] ~= nil then
  58. matchCount = matchCount + 1
  59. end
  60. end
  61. return matchCount
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement