Skip to content

Instantly share code, notes, and snippets.

@mxbi
Created October 28, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxbi/3e498f3c7d3ceb30a6c6c5fb432540d0 to your computer and use it in GitHub Desktop.
Save mxbi/3e498f3c7d3ceb30a6c6c5fb432540d0 to your computer and use it in GitHub Desktop.
import time
import math
import winsound
def beep():
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
Torb = 'Killian'
Mccree = 'Sam'
Hanzo = 'Will'
Zen = 'Mikel'
# def sleep(x):
# time.sleep(x/1000)
xy={'6:55': 'Shock Tyre (right)',
'6:40': 'Shock Tyre (top)',
'5:52': f'(for Reap) {Mccree}, {Torb} + {Hanzo} move to mid',
'5:42': 'Reaper +2',
'4:59': 'Shock Tyre (mid)',
'4:43': 'Shock Tyre (top)',
'4:29': 'Shock Tyre (right)',
'4:00': f'(for Hog) {Mccree} move forward + {Hanzo} move back',
'3:50': f'(for Hog) {Torb} ult',
'3:45': 'Junkenstein\'s Monster (mid) +1',
'3:28': 'Shock Tyre (right)',
'3:00': f'(for Symm) {Mccree} move to top',
'2:50': f'(for Symm) {Torb} ult right + top. Shoot mid',
'2:45': 'The Summoner (top) +2',
'2:38': 'Shock Tyre (right)',
'1:55': '(for Junk) Prep ults',
'1:45': 'Dr. Junkenstein (top right platform) +1',
'1:39': f'(for Reap) {Mccree} + {Torb} move to mid',
'1:34': 'The Reaper (mid) +2',
'0:53': 'Shock Tyre x2 (top then right)',
'0:43': f'(for Reap) {Mccree} + {Torb} move to mid',
'0:33': 'The Reaper (mid) +1',
'0:30': 'Shock Tyre (mid)',
}
t = 7*60 + 50 #starting time is 7:50
print(t)
beep()
while t >= 0:
seconds = t%60 #for minsec
#when seconds < 10 minsec is e.g. 4:8 instead of 4:08
if seconds < 10:
seconds = str(seconds).rjust(2, '0') #rjust: right justifies to two characters with 0s
#turns secons into minute:seconds
minsec = f'{math.floor(t / 60)}:{seconds}'
#if there is an event print that aswell
if minsec in xy:
if '+2' in xy[minsec]:
t += 2
if '+1' in xy[minsec]:
t += 1
print(f'{minsec} {xy[minsec]}')
beep()
print('\n')
# else:
# print(minsec)
#decrement seconds
t -= 1
time.sleep(1)
#sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment