-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.py
93 lines (88 loc) · 3.06 KB
/
start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# The ARAM Generator Launcher 'start.py'
from typrint import typrint
import main
import time
import sys
import os
import urllib
typrint('Checking Latest Versions...')
urllib.urlretrieve('https://rawgit.com/MostafaAyesh/vgaramgen/master/ver.txt', 'ver.txt')
import data
if data.dver != data.dver_:
typrint('Update Found Downloading...')
urllib.urlretrieve('https://rawgit.com/MostafaAyesh/vgaramgen/master/data.txt', 'data.txt')
else:
typrint('No Update Found')
time.sleep(0.5)
os.system('cls')
typrint('Hello! This is a Python Based Vainglory ARAM Generator')
typrint('You can type help at any point to see available commands')
typrint('==========================================')
heroch = ['all','melee','range','free']
typrint('Which type of heroes would you like?')
print 'Available choices are:',heroch
chflag = True
while chflag:
choice = raw_input('Your Choice is: ')
hlp = False
if choice.lower() == 'help':
print 'Available choices are:',
print(heroch)
hlp = True
for i in range(len(heroch)):
if choice.lower() == heroch[i]:
typrint('==========================================')
nstart = main.aramgen(data.heroes[i])
chflag = False
hlp = True
if not hlp:
try:
nstart
except NameError:
typrint('Wrong choice please try again or type help too see available choices')
nstart.roll()
typrint('================ Team A ==================')
for i in range(3):
typrint('%s Plays %s' %(nstart.team_a[i],nstart.hero_a[i]))
typrint('================ Team B ==================')
for i in range(3):
typrint('%s Plays %s' %(nstart.team_b[i],nstart.hero_b[i]))
typrint('==========================================')
flag = True
rollch = []
for i in range(3):
rollch.append('reroll %s' %(nstart.team_a[i]))
for i in range(3):
rollch.append('reroll %s' %(nstart.team_b[i]))
rollch.append('restart')
rollch.append('quit')
while flag:
choice = raw_input('What would you like to do?: ')
hlp = False
if choice.lower() == 'help':
print 'Available choices are:',
print(rollch)
hlp = True
for i in range(3):
if choice.lower() == rollch[i]:
hlp = True
nstart.reroll('a',i)
typrint('==========================================')
typrint('%s Plays %s' %(nstart.team_a[i],nstart.hero_a[i]))
typrint('==========================================')
for i in range(3,6):
if choice.lower() == rollch[i]:
hlp = True
nstart.reroll('b',i-3)
typrint('==========================================')
typrint('%s Plays %s' %(nstart.team_b[i-3],nstart.hero_a[i-3]))
typrint('==========================================')
if choice.lower() == 'restart':
hlp = True
os.system('cls')
import start
if choice.lower() == 'quit':
hlp = True
exit()
if not hlp:
typrint('Wrong choice please try again or type help too see available choices')