Skip to content

Instantly share code, notes, and snippets.

@pika1928
Last active October 28, 2018 22:53
Show Gist options
  • Save pika1928/7c69544ee7f978fe0c05048bb148a836 to your computer and use it in GitHub Desktop.
Save pika1928/7c69544ee7f978fe0c05048bb148a836 to your computer and use it in GitHub Desktop.
Overwatch Junkensteins Revenge: A python script that outputs key timings to the console, along with a beep, instructing the players what to do
import time
import math
import winsound
Torb = 'Torb player'
Mccree = 'Mccree pLayer'
Hanzo = 'Hanzo player'
Zen = 'Zen player'
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 +4',
'4:57': 'Shock Tyre (mid)',
'4:43': 'Shock Tyre (top)',
'4:29': 'Shock Tyre (right)',
'4:00': f'(for Hog) {Hanzo} move forward + {Mccree} move back',
'3:50': f'(for Hog) {Torb} ult',
'3:45': 'Junkenstein\'s Monster (mid) +4',
'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) +4',
'2:38': 'Shock Tyre (right)',
'1:55': '(for Junk) Prep ults',
'1:45': 'Dr. Junkenstein (top right platform) +4',
'1:39': f'(for Reap) {Mccree} + {Torb} move to mid',
'1:34': 'The Reaper (mid)',
'0:53': 'Shock Tyre x2 (top then right)',
'0:43': f'(for Reap) {Mccree} + {Torb} move to mid',
'0:33': 'The Reaper (mid)',
'0:30': 'Shock Tyre (mid)',
}
def beep():
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
t = 8*60 + 5 # starting time is 8:05, start at 5s on hero select screen then insta-skip cut scene. The second of cut scene is equal to tab time
print(t)
beep()
while t >= 0:
seconds = str(t%60).rjust(2, '0') # rjust: right justifies to two characters with 0s incase of e.g. 4:8 so that it becomes 4:08
# turns seconds into minute:seconds
minsec = f'{math.floor(t / 60)}:{seconds}'
# if there is an event print that aswell
if minsec in xy:
if '+4' in xy[minsec]:
time.sleep(4)
print(f'{minsec} {xy[minsec]}')
beep()
print('\n')
time.sleep(0.7)
else:
print(minsec)
time.sleep(1)
# decrement seconds
t -= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment