Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #I wrote this in literally two hours, please don't judge me on the fucked up style
- import itertools
- import copy
- import random
- import math
- import pyconsolegraphics as pc
- import pyconsolegraphics.ezmode as ez
- def vinesauce():
- framenum = 0
- term = pc.Terminal((119,40),font = "Fixedsys Excelsior 3.01")
- gfx = ez.EZMode(term)
- brbcursor = pc.Cursor(term, autoscroll=False)
- brbendpos = term.bottomright
- loadingbartotal = 2 * (term.width // 3)
- loadingbarloaded = 0
- brbcursor.fgcolor = (64, 64, 64)
- statusprintstatus = 0
- statustimer = 300
- starglyphs= itertools.cycle(["|", "/", "-", "\\"])
- redscreen = False
- redscreenprinted = False
- statuses = [
- "Downloading memes off Twitter...",
- "Unboxing Cpt. Picard's ballsack...",
- "Admonishing chat...",
- "Fucking with XSplit...",
- "PROTIP: Upload art _DURING_ the stream!",
- "Salty cunts...",
- "Queueing up quack.wav...",
- "Whipping enslaved former villagers...",
- "Hiding Cherry r34...",
- "Cyclops edging... ... ... ... ... ... ... ... ... ... ... ... ... ...",
- "PROTIP: Vinny takes like a week to respond to emails. Dude's busy.",
- "Choosing new emotes...",
- "Retrieving more seltzer...",
- "Reticulating splines...",
- "Putting head on Bono's biddy...",
- "PROTIP: Kappa",
- "Disposing of Oreos...",
- "Practicing MAHINAPEAAAAAAAA...",
- "Convincing Reggie and Iwata to leave the house...",
- "Searching for the Buvvins...",
- "Watching Red Letter Media...",
- "Queueing up new meme videos...",
- "PROTIP: Don't fuck with Mr. Dink's grill. He'll fucking kill you.",
- "Deleting game request emails...",
- "Indulging apiophillia..."
- ]
- origstatuses = copy.copy(statuses)
- currentstatus = statuses.pop(0)
- for idx, thecell in enumerate(term):
- if idx % 2:
- thecell.character = "r"
- else:
- thecell.character = "b"
- fgcolors = [ [(0,0,0) for y in range(-1, term.height+1)]
- for x in range(-1, term.width+1) ]
- gol = [[False for y in range(term.height)]
- for x in range(term.width)]
- redscreencounter = 0
- while True:
- if not redscreen:
- for t in range(150 + random.randint(50,150)):
- brbcursor.fgcolor = fgcolors[brbcursor.x+1][brbcursor.y+1]
- try:
- if brbcursor.x % 2:
- brbcursor.smart_writechar("r")
- else:
- brbcursor.smart_writechar("b")
- except pc.VerticalCursorOverflowError:
- brbcursor.pos=(0,0)
- oldfgcolors = copy.deepcopy(fgcolors)
- amp = 13
- for x in range(1, term.width+1):
- for y in range(1, term.height+1):
- rtotal = btotal = gtotal = 0
- for dx in (-1, 0, 1):
- for dy in (-1, 0, 1):
- r, g, b = oldfgcolors[x+dx][y+dy]
- rtotal += r ** amp
- gtotal += g ** amp
- btotal += b ** amp
- if random.randint(1,2000) == 1:
- fgcolors[x][y]=random.randint(0,255),random.randint(0,255),random.randint(0,255)
- else:
- newr = math.floor(math.pow(rtotal / 9, 1 / amp) * 0.94)
- newg = math.floor(math.pow(gtotal / 9, 1 / amp) * 0.94)
- newb = math.floor(math.pow(btotal / 9, 1 / amp) * 0.94)
- fgcolors[x][y] = newr, newg, newb
- if random.randint(1, 5) != 1:
- loadingbarloaded += random.randint(1, 2)
- if loadingbarloaded > loadingbartotal:
- loadingbarloaded = -loadingbartotal
- if loadingbarloaded >= 0:
- loadingbar = ("█" * loadingbarloaded) + ("░" * (loadingbartotal - loadingbarloaded))
- else:
- loadingbar = ("░" * (loadingbartotal - abs(loadingbarloaded)) + ("█" * (abs(loadingbarloaded))))
- gfx.center_line_at(loadingbar, "center", fgcolor = (167, 167, 167))
- if statusprintstatus < len(currentstatus):
- statusprintstatus += 1
- elif statustimer:
- statustimer -= 1
- else:
- statustimer = 300
- statusprintstatus = 0
- try:
- currentstatus = statuses.pop(0)
- except IndexError:
- redscreen=True
- redscreenprinted=False
- redscreencounter = 0
- brbcursor.pos=(0,0)
- statuses = copy.copy(origstatuses)
- currentstatus = statuses.pop(0)
- gfx.put_line_at(" " * (term.width // 3 * 2), "centerleft", (term.width // 6, 0),
- fgcolor=(0, 0, 0), bgcolor=(220, 220, 220))
- gfx.put_line_at(currentstatus[:statusprintstatus], "centerleft", (term.width // 6, 0),
- fgcolor = (0, 0, 0), bgcolor = (220, 220, 220))
- gfx.put_line_at("Vinesauce is loading..."+next(starglyphs), "centerleft", (term.width // 6, -2),
- fgcolor=(44, 255, 44), bgcolor=(0, 0, 0))
- else:
- redscreencounter += 1
- if not redscreenprinted:
- brbcursor.fgcolor = (64, 0, 0)
- brbcursor.bgcolor = (0, 0, 0)
- try:
- for t in range(100):
- brbcursor.smart_writechar("@")
- except pc.VerticalCursorOverflowError:
- redscreenprinted=True
- else:
- if redscreencounter % 30 < 15:
- scrotbg = (255, 0, 0)
- else:
- scrotbg = (127, 0, 0)
- if redscreencounter < (30 * 8):
- gfx.center_line_at("!!! SCROTAL EMERGENCY !!!", "center", fgcolor=(0, 0, 0), bgcolor = scrotbg)
- if (30 * 4) < redscreencounter < (30 * 8) :
- gfx.center_line_at("System restarting..."+next(starglyphs), "center", (0, 1), fgcolor=(200, 0, 0), bgcolor=(0,0,0))
- if redscreencounter == (30 * 8):
- brbcursor.pos=(0,0)
- brbcursor.fgcolor=(255,255,255)
- brbcursor.bgcolor=(0,0,0)
- if redscreencounter > (30 * 8):
- for t in range(100):
- try:
- if t % 2:
- brbcursor.smart_writechar("r")
- else:
- brbcursor.smart_writechar("b")
- except pc.VerticalCursorOverflowError:
- break
- if redscreencounter > (30 * 10):
- brbcursor.pos=(0,0)
- redscreen=False
- term.draw()
- if __name__ == "__main__":
- vinesauce()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement