Guest User

Untitled

a guest
Dec 8th, 2020
10,270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. #FL Randomizer v1.0
  2.  
  3. import os, random, time, datetime, math, array
  4. from os import path
  5.  
  6. #mpv path. Point this towards your copy of mpv (mpv.io)
  7. mpv_path = "binaries\Windows\mpv.exe"
  8. def video(currentval):
  9. #Enter the path to your FL folder here
  10. os.system(mpv_path + " -msg-level=all=no -fs " + '"C:\\Downloads\\Fap Land\\Main Game\\' +str(currentval) + '.mp4"')
  11. #Alternate method for those with mpv installed and pathed
  12. #https://stackoverflow.com/questions/44272416/how-to-add-a-folder-to-path-environment-variable-in-windows-10-with-screensho
  13. #os.system("mpv -msg-level=all=no -fs " + '"C:\\Downloads\\Fap Land\\Main Game\\' +str(currentval) + '.mp4"')
  14.  
  15. def image(totalrolls):
  16. #Interval path. Point this to your favorite images
  17. imageFolder = 'C:\\Anon\\tiddies\\'
  18. imageFile = os.listdir(imageFolder)
  19. random_file = random.choice(imageFile)
  20. fullImagePath = imageFolder + random_file
  21. #Break period shrinks as rounds go on
  22. #round 0 = 10 seconds, round 15 = 5 seconds
  23. #round 20+ = no breaks :)
  24. breaktime = math.ceil(10 - min(totalrolls/3, 5))
  25. print(str(breaktime) + " second break")
  26. os.system(mpv_path + " -fs --image-display-duration=" + str(breaktime) + " " + '"' + fullImagePath + '"')
  27. #os.system("mpv -fs --image-display-duration=" + str(breaktime) + " " + '"' + fullImagePath + '"')
  28.  
  29. def populate(stagelist, played):
  30. for x in range(2, 99):
  31. if (x % 25 != 0):
  32. validstage = 1
  33. for y in range(0, len(played)):
  34. if played[y] == x:
  35. validstage = 0
  36. if (validstage):
  37. stagelist.append(x)
  38. return stagelist
  39.  
  40. def game():
  41. print("Game start!")
  42. pos = 1
  43. totalrolls = 0
  44. video(pos)
  45. print("")
  46. stagelist = []
  47. played = []
  48. #Load up history file, if it exists
  49. if path.exists("history.txt"):
  50. history = open("history.txt", "r")
  51. if not os.stat("history.txt").st_size == 0:
  52. for line in history:
  53. currentPlace = line[:-1]
  54. played.append(int(currentPlace))
  55. history.close()
  56. #Populate stage list. Excludes stages from history
  57. stagelist = populate(stagelist, played)
  58. you = 1
  59. newfag = 1
  60. #main game loop
  61. while (you == newfag):
  62. totalrolls += 1
  63. #Stage selection, more rolls = more likely to pick a later stage
  64. minstage = min(random.randint(0, totalrolls*3), math.trunc(len(stagelist)/2))
  65. stagepicker = random.randint(minstage, len(stagelist)-1)
  66. pos = stagelist[stagepicker]
  67. #Add selected stage to history
  68. if len(played) >= 40:
  69. played.pop(0)
  70. played.append(pos)
  71. stagelist.pop(stagepicker)
  72. history = open("history.txt", "w")
  73. for line in played:
  74. history.write('%i\n' % line)
  75. history.close()
  76.  
  77. print("Position : " + str(pos))
  78. print("Rolls : " + str(totalrolls))
  79. video(pos)
  80. #refill stage list if you somehow go on for 40+ god damn rounds
  81. if (len(stagelist) < 20):
  82. stagelist = populate(stagelist, played)
  83. #Break period
  84. #Every 5 rounds, hits a checkpoint
  85. if (totalrolls < 21):
  86. if (totalrolls % 5 == 0):
  87. print("Checkpoint!")
  88. video(math.trunc(25*(totalrolls/5)))
  89. else:
  90. image(totalrolls)
  91. print("")
  92.  
  93. random.seed(int(datetime.datetime.now().strftime("%Y%m%d%H%M%S")))
  94. game()
  95.  
Advertisement
Add Comment
Please, Sign In to add comment