Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #FL Randomizer v1.0
- import os, random, time, datetime, math, array
- from os import path
- #mpv path. Point this towards your copy of mpv (mpv.io)
- mpv_path = "binaries\Windows\mpv.exe"
- def video(currentval):
- #Enter the path to your FL folder here
- os.system(mpv_path + " -msg-level=all=no -fs " + '"C:\\Downloads\\Fap Land\\Main Game\\' +str(currentval) + '.mp4"')
- #Alternate method for those with mpv installed and pathed
- #https://stackoverflow.com/questions/44272416/how-to-add-a-folder-to-path-environment-variable-in-windows-10-with-screensho
- #os.system("mpv -msg-level=all=no -fs " + '"C:\\Downloads\\Fap Land\\Main Game\\' +str(currentval) + '.mp4"')
- def image(totalrolls):
- #Interval path. Point this to your favorite images
- imageFolder = 'C:\\Anon\\tiddies\\'
- imageFile = os.listdir(imageFolder)
- random_file = random.choice(imageFile)
- fullImagePath = imageFolder + random_file
- #Break period shrinks as rounds go on
- #round 0 = 10 seconds, round 15 = 5 seconds
- #round 20+ = no breaks :)
- breaktime = math.ceil(10 - min(totalrolls/3, 5))
- print(str(breaktime) + " second break")
- os.system(mpv_path + " -fs --image-display-duration=" + str(breaktime) + " " + '"' + fullImagePath + '"')
- #os.system("mpv -fs --image-display-duration=" + str(breaktime) + " " + '"' + fullImagePath + '"')
- def populate(stagelist, played):
- for x in range(2, 99):
- if (x % 25 != 0):
- validstage = 1
- for y in range(0, len(played)):
- if played[y] == x:
- validstage = 0
- if (validstage):
- stagelist.append(x)
- return stagelist
- def game():
- print("Game start!")
- pos = 1
- totalrolls = 0
- video(pos)
- print("")
- stagelist = []
- played = []
- #Load up history file, if it exists
- if path.exists("history.txt"):
- history = open("history.txt", "r")
- if not os.stat("history.txt").st_size == 0:
- for line in history:
- currentPlace = line[:-1]
- played.append(int(currentPlace))
- history.close()
- #Populate stage list. Excludes stages from history
- stagelist = populate(stagelist, played)
- you = 1
- newfag = 1
- #main game loop
- while (you == newfag):
- totalrolls += 1
- #Stage selection, more rolls = more likely to pick a later stage
- minstage = min(random.randint(0, totalrolls*3), math.trunc(len(stagelist)/2))
- stagepicker = random.randint(minstage, len(stagelist)-1)
- pos = stagelist[stagepicker]
- #Add selected stage to history
- if len(played) >= 40:
- played.pop(0)
- played.append(pos)
- stagelist.pop(stagepicker)
- history = open("history.txt", "w")
- for line in played:
- history.write('%i\n' % line)
- history.close()
- print("Position : " + str(pos))
- print("Rolls : " + str(totalrolls))
- video(pos)
- #refill stage list if you somehow go on for 40+ god damn rounds
- if (len(stagelist) < 20):
- stagelist = populate(stagelist, played)
- #Break period
- #Every 5 rounds, hits a checkpoint
- if (totalrolls < 21):
- if (totalrolls % 5 == 0):
- print("Checkpoint!")
- video(math.trunc(25*(totalrolls/5)))
- else:
- image(totalrolls)
- print("")
- random.seed(int(datetime.datetime.now().strftime("%Y%m%d%H%M%S")))
- game()
Advertisement
Add Comment
Please, Sign In to add comment