-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
134 lines (116 loc) · 5.49 KB
/
main.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#Project Blah Blah hahahahahah
#Kinky Product by RaVeN the menace.... KALPA FERNANDO
from game import *
import os, sys
screen_width = 200
## TITLE SCREEN STUFF ##
def title_select():
opt = ''
while opt.lower() not in ['1', '2', '3', '4']:
opt = input('> ')
if opt == '1':
intro_game()
elif opt == '2':
load()
elif opt == '3':
help_menu()
title_select()
elif opt == '4':
quit()
elif opt == '5':
myPlayer.name = 'Kalpa'
myPlayer.job = 'Hero'
myPlayer.hp = 80
myPlayer.mp = 30
myPlayer.atk = 8
myPlayer.defs = 7
myPlayer.money = 900000
myPlayer.city = 'eden'
myPlayer.location = 'central'
eden_town()
else:
os.system('cls')
print('Your input is not valid bro')
print('Choose between play, load, help and quit')
print(' ')
os.system('pause')
title_screen()
def title_screen():
os.system('cls')
print(' _____________________________________________')
print('| ---TEXT LEGEND--- |')
print('|--------------------------------------------|')
print('| [1]Play- |')
print('| [2]Load- |')
print('| [3]Help- |')
print('| [4]Quit- |')
print('|____________________________________________|')
print(' ')
print(' @RaVeN Projects')
print(' ')
title_select()
def help_menu():
os.system('cls')
print('| ---HELP--- |')
print(' ')
print('* Take it easy, if you want to move movable locations\nwill be displayed in screen.\nJust type it when u want to move\n\n* Type "save" to save (This only works inside the game, cutscene and battles will not work\n\nTHATS ALL FOR NOW')
os.system('pause')
title_screen()
def load():
try:
os.system('cls')
global Quest
list = pickle.load(open("save.dat", "rb"))
myPlayer.name = list[0]
myPlayer.hp = list[1]
myPlayer.mp = list[2]
myPlayer.job = list[3]
myPlayer.atk = list[4]
myPlayer.defs = list[5]
myPlayer.money = list[6]
myPlayer.location = list[7]
myPlayer.city = list[8]
myPlayer.rank = list[9]
if len(Quest) > 0:
Quest.append(list[10])
if list[8] == 'eden':
eden_town()
else:
title_screen()
except FileNotFoundError: # handling situation when save file is not found
print('- Save file not found -')
os.system('pause')
title_screen()
def quit():
print('Are you sure that you want to quit?')
print('-[1]Yes -[2]No')
opt2 = input()
if opt2 == '1':
sys.exit()
elif opt2 == '2':
title_screen()
while opt2.lower() not in ['1', '2']:
os.system('cls')
print('Your input is not valid bro')
print('Choose between yes and no')
print(' ')
os.system('pause')
quit()
def Ani_screen():
print(' ')
print(' ')
print(' ')
print('████████╗███████╗██╗ ██╗████████╗ ██╗ ███████╗ ██████╗ ███████╗███╗ ██╗██████╗')
print('╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝ ██║ ██╔════╝██╔════╝ ██╔════╝████╗ ██║██╔══██╗')
print(' ██║ █████╗ ╚███╔╝ ██║ ██║ █████╗ ██║ ███╗█████╗ ██╔██╗ ██║██║ ██║')
print(' ██║ ██╔══╝ ██╔██╗ ██║ ██║ ██╔══╝ ██║ ██║██╔══╝ ██║╚██╗██║██║ ██║')
print(' ██║ ███████╗██╔╝ ██╗ ██║ ███████╗███████╗╚██████╔╝███████╗██║ ╚████║██████╔╝')
print(' ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚═════╝')
print(' ')
os.system('pause')
os.system('cls')
def main():
Ani_screen()
title_screen()
if __name__ == "__main__":
main()