Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from time import sleep
- import os, sys, time
- import random
- name = ''
- role = ''
- hp = 0
- ap = 0
- inventory = ''
- boosts = 0
- gameOver = False
- # Title Screen
- def title_screen():
- print('#########################')
- print('# Welcome to the EOS RPG#')
- print('#########################')
- print(' -Play- ')
- print(' -Help- ')
- print('####By Gautam Singh #### ')
- title_screen()
- def print_slow(str):
- for letter in str:
- sys.stdout.write(letter)
- sys.stdout.flush()
- time.sleep(0.09)
- def main_game_intro():
- print_slow('Hello, What is your name\n')
- player_name = input('> ')
- print_slow('What role do you want to play as in the game?\n')
- print_slow('You can play as a warrior, mage, priest or assassin.\n')
- player_role = input('> ')
- # Player stats
- if player_role.lower() == 'warrior':
- hp = 200
- ap = 50
- if player_role.lower() == 'mage':
- hp = 100
- ap = 100
- if player_role.lower() == 'priest':
- hp = 250
- ap = 40
- if player_role.lower() == 'assassin':
- hp = 150
- ap = 125
- # If player enters invalid player_role
- if player_role.lower() not in ['warrior', 'mage', 'priest', 'assassin']:
- print('Choose a valid role')
- # making it look nice
- print_slow('Healt = ', hp)
- print_slow('Attack = ', hp)
- print_slow('Welcome ' + player_name + ' the ' + player_role + "\n")
- print_slow('Welcome to this fantasy world!')
- print_slow('I hope you enjoy it')
- print_slow('Remember, you can collect items throuhout the game.')
- def title_screen_selection():
- option = input('> ')
- if option.lower() == 'play':
- main_game_intro()
- if option.lower() == "help":
- print(' -use you inventory wisely- ')
- print(' -type an sction to do it- ')
- print(' -Always type in lowercase- ')
- print(' -Good luck and have fun-/n/n')
- title_screen()
- title_screen_selection()
- # Finnaly we start
- #Lets start the intro of main game#
- main_game_intro()
- # Lets start the story #
- def main_game():
- print_slow('The story starts now\n\n')
- print_slow('Your eyes open. You find yourself in a tavern.\n')
- print_slow('Bartender: Want something to drink?')
- print('Ask where you are or I will have a drink. ask/drink')
- choice = input('> ')
- # If
- if choice1.lower() == 'ask':
- print_slow("Bartender: You are in Timmy's Tavern")
- print_slow('You get up and leave')
- elif choice1.lower() == 'drink':
- print_slow('The bartender brings you a drink')
- print_slow('You: Where am I?')
- print_slow("Bartender: You are in Timmy's Tavern")
- print('You get up and leave')
- print_slow('You are now in a street full of people')
- print_slow('You ask someone what city you are in. He says Alphiem')
- print_slow('You continue walking down the street')
- print_slow('You see some guards. Want to ask them the way out of the city. yes/no')
- choice2 = input('> ')
- if choice2 == "yes":
- print_slow('You ask them the way out of town')
- print_slow('\nGuard: Who are you?')
- print_slow('You: I am ' , player_name)
- print_slow('\nGuard: Where are you from?')
- print_slow('\nGuard: You look like someone on the wanted board.')
- print_slow('\nGuard: We will be taking you into custody')
- main_game()
Add Comment
Please, Sign In to add comment