×
Python Adventure Game Script
import simpleaudio as sa
from time import sleep
import random
import functions
# Variables & Constants (A few of them)
QUOTE = '"'
morals = 0
money = 0
disgustingness = 20
# Start
intro = sa.WaveObject.from_wave_file("Doom.wav")
play_intro = intro.play()
print("\033[1mWelcome to MetalGuy 6\033[0m.")
sleep(4.7)
print("Look, Star Wars didn't follow chronological order, neither should I")
sleep(4.5)
input("Press \033[1mEnter\033[0m to start")
play_intro.stop()
sleep(3)
functions.loading()
sleep(1)
playlist = sa.WaveObject.from_wave_file("Background_Music.wav")
play_playlist = playlist.play()
# Intro
print("\n\nTIME: MORNING.", end='')
input()
sleep(0.5)
print("You wake up on the floor and look around.", end='')
input()
sleep(0.5)
print("You are in a dirty room that smells like beer.", end='')
input()
sleep(0.5)
print("Then you slowly start to remember.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Damn, must've drank too much last night at the after-show party{QUOTE} You say out loud to no one.", end='')
input()
sleep(1)
print("You head to the bathroom to take a shower.", end='')
input()
sleep(0.5)
print("You turn on the shower, but the water doesn’t run.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Damn it, I need to pay my bills again{QUOTE} You say out loud to no one again.", end='')
input()
sleep(0.5)
print("Luckily, you just did a show last night.", end='')
input()
sleep(0.5)
print("You go to check your cash drawer for yesterday’s paycheck.", end='')
input()
sleep(0.5)
print(f"{QUOTE}WHAT!? How much beer did I buy last night?{QUOTE} You exclaimed to an empty cash drawer.", end='')
input()
sleep(0.5)
print("You look at all the beer bottles on the ground that you only just noticed.", end='')
input()
sleep(0.5)
print("You bought a lot of beer.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Band practice is this afternoon.{QUOTE} You think to yourself,", end='')
input()
sleep(0.5)
print(f"{QUOTE}If the other guys got as drunk as I did I could probably convince them they agreed to split the beer money, that should get my water back at least{QUOTE}", end='')
input()
sleep(1)
functions.transition()
# Band Practice
print("\n\nTIME: AFTERNOON", end='')
input()
sleep(0.5)
print("You arrive at your band's rehearsal space", end='')
input()
sleep(0.5)
print("You see Oliver (the bassist)'s car pull up", end='')
input()
sleep(0.5)
print("Oliver steps out of his car", end='')
input()
sleep(0.5)
loop = True
while loop is True:
name = input("Input Your Name: ")
if name != "":
loop = False
sleep(0.5)
print(f"{QUOTE}Yo, {name}, what's up dude{QUOTE} Says Oliver to you.", end='')
input()
sleep(0.5)
# Lie to Oliver for money
lie_oliver = input("Do you lie to Oliver about the beer money? (yes/no) ")
sleep(0.5)
if lie_oliver == "yes":
print(f"{QUOTE}Afternoon dude, last night's party was wild man. Listen, we drank a load of beer last night, I paid for it all but we agreed to split today."
f"\nI got rent to pay soon, give me 100 bucks to cover your bit and we're good{QUOTE} You tell Oliver.", end='')
input()
sleep(0.5)
print("Oliver agrees", end='')
input()
sleep(0.5)
print("Your morals don't change.", end='')
input()
sleep(0.5)
print("It is absolutely ok to lie to bassists to get their money, they deserve it.", end='')
money = money+100
input()
sleep(0.5)
print("Your money increases by 100", end='')
elif lie_oliver == 'no':
print("You didn't really have to, he's a bassist after all.", end='')
input()
sleep(0.5)
morals = morals + 5
print("Your morals increase by 5", end='')
else:
print(f"{name} unfortunately passed from Wontfollowinstructionsitis")
play_playlist.stop()
functions.play_song("Fade_To_Black.wav")
exit()
input()
sleep(0.5)
print("\nYou walk into the rehearsal room with Oliver", end='')
input()
sleep(0.5)
print("You see Aaron (The drummer) and Nils (The rhythm guitarist and vocalist) waiting for you two", end='')
input()
sleep(0.5)
print(f"{QUOTE}Glad you two are finally here{QUOTE} Remarks Nils.", end='')
input()
sleep(0.5)
# Lie to Aaron and Nils for money
lie_aaron_nils = input("Do you lie to Aaron and Nils about the beer money? (yes/no) ")
if lie_aaron_nils == "yes":
print(f"{QUOTE}[Smart lying]{QUOTE} You tell Aaron and Nils.", end='')
input()
sleep(0.5)
money = money+100
morals = morals-10
print("Your money increases by 100")
print("Your morals decrease by 10", end='')
elif lie_aaron_nils == 'no':
print("You're a good person, keep it up.", end='')
input()
sleep(0.5)
morals = morals + 10
print("Your morals increase by 10", end='')
else:
print(f"{name} unfortunately passed from Wontfollowinstructionsitis")
play_playlist.stop()
functions.play_song("Fade_To_Black.wav")
exit()
input()
sleep(1)
functions.transition()
print("You spend an afternoon practicing with your band.", end='')
input()
sleep(1)
functions.transition()
# Old lady encounter (given or stolen money)
print("\n\nTIME: NIGHT", end='')
input()
sleep(0.5)
# Grocery store scenario
if money > 0:
print("You are shopping in the grocery store for some blood oranges (The most metal fruit).", end='')
input()
sleep(0.5)
print("You see an old lady in front of you fall to the ground.", end='')
input()
sleep(0.5)
help_old_lady = input("Do you help her up? (yes/no) ")
sleep(0.5)
if help_old_lady == "yes":
print(f"{QUOTE}Thank you young man{QUOTE} The old lady tells you.", end='')
input()
morals = morals+5
print("Your morals increase by 5", end='')
input()
sleep(0.5)
old_lady_money = random.randint(0, 2)
if old_lady_money == 1:
print(f"{QUOTE}Here, have some money for helping me{QUOTE} The old lady says to you.", end='')
input()
money = money+20
print("Your money increases by 20", end='')
input()
sleep(0.5)
print("You checkout your blood oranges.", end='')
input()
money = money-10
print("Your money decreases by 10", end='')
elif old_lady_money == 0:
print("The old lady walks away.", end='')
input()
sleep(0.5)
print("At checkout you notice your pocket is empty.", end='')
input()
sleep(0.5)
print("The old lady pickpocketed you.", end='')
input()
if money >= 20:
money = money-20
print("Your money decreases by 20", end='')
else:
money = 0
sleep(0.5)
print("The old lady took all your money.", end='')
elif old_lady_money == 2:
print("The old lady walks away.", end='')
input()
sleep(0.5)
print("You checkout your blood oranges.", end='')
input()
money = money-10
print("Your money decreases by 10", end='')
elif help_old_lady == "no":
print("You won't help an old lady?", end='')
input()
sleep(0.5)
print("You're a terrible person.", end='')
input()
morals = morals - 10
print("Your morals decrease by 10", end='')
else:
print(f"{name} unfortunately passed from Wontfollowinstructionsitis")
play_playlist.stop()
functions.play_song("Fade_To_Black.wav")
# Streets scenario
else:
print("You are taking a stroll around the block.", end='')
input()
sleep(0.5)
print("You see an old lady in front of you fall to the ground.", end='')
input()
sleep(0.5)
help_old_lady = input("Do you help her up? (yes/no) ")
sleep(0.5)
if help_old_lady == "yes":
print(f"{QUOTE}Thank you young man{QUOTE} The old lady tells you.", end='')
input()
morals = morals + 5
print("Your morals increase by 5", end='')
input()
sleep(0.5)
old_lady_money = random.randint(0, 2)
if old_lady_money == 1:
print(f"{QUOTE}Here, have some money for helping me{QUOTE} The old lady says to you.", end='')
input()
money = money + 20
print("Your money increases by 20", end='')
elif old_lady_money == 0:
print("The old lady walks away.", end='')
input()
sleep(0.5)
print("At checkout you notice your pocket is empty.", end='')
input()
sleep(0.5)
print("The old lady pickpocketed you.", end='')
input()
if money >= 20:
money = money - 20
print("Your money decreases by 20", end='')
else:
money = 0
sleep(0.5)
print("The old lady took all your money.", end='')
elif old_lady_money == 2:
print("The old lady walks away.", end='')
elif help_old_lady == "no":
print("You won't help an old lady?", end='')
input()
sleep(0.5)
print("You're a terrible person.", end='')
input()
morals = morals - 10
print("Your morals decrease by 10", end='')
else:
print(f"{name} unfortunately passed from Wontfollowinstructionsitis")
play_playlist.stop()
functions.play_song("Fade_To_Black.wav")
input()
sleep(1)
functions.transition()
# Deposit to ATM
if money > 0:
print("You go to an ATM to deposit all your money into your debit card", end='')
input()
sleep(1)
functions.transition()
# Pay bills and shower
print("You are back in your apartment", end='')
input()
sleep(0.5)
print("You go to your computer to pay your bills", end='')
input()
sleep(0.5)
if money >= 20:
money = money-20
print("Your money decreases by 20", end='')
input()
sleep(0.5)
print("You have water again.", end='')
input()
sleep(0.5)
print("You take a shower.", end='')
input()
disgustingness = disgustingness-20
print("Your disgustingness decreases by 20.", end='')
else:
print("You have not acquired enough money.", end='')
input()
sleep(0.5)
print("You cannot take a shower.", end='')
input()
disgustingness = disgustingness+20
print("Your disgustingness increases by 20.", end='')
input()
sleep(1)
functions.transition()
# Pay Rent
print("You hear a knocking on the door.", end='')
input()
sleep(0.5)
print("You open the door to find your landlord.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Where's my money, {name}?{QUOTE} He asks,"
f"\n{QUOTE}You owe me 500 bucks{QUOTE}.", end='')
input()
sleep(0.5)
print("You forgot to pay rent.", end='')
input()
sleep(0.5)
# Murmaider boss fight
if money < 500:
print("You don't have money to pay rent.", end='')
input()
sleep(0.5)
print(f"{QUOTE}You know our agreement, {name}. If you don't pay your rent, I throw you into a gladiator ring to fight a Murmaider{QUOTE} Says your landlord.", end='')
input()
sleep(0.5)
print("Your landlord knocks you unconscious.", end='')
input()
sleep(1)
play_playlist.stop()
functions.transition()
boss_fight_music = sa.WaveObject.from_wave_file("Murmaider.wav")
play_boss_fight_music = boss_fight_music.play()
print("You wake up in an underwater gladiator ring.", end='')
input()
sleep(0.5)
print("In front of you is a mermaid holding a trident.", end='')
input()
sleep(0.5)
print("It looks hideous, its eyes filled with hatred.", end='')
input()
sleep(0.5)
print("It is a Murmaider.", end='')
input()
sleep(0.5)
print("You see a guitar and a Marshall JVM410H fullstack next to you.", end='')
input()
sleep(0.5)
print("You know what you must do.", end='')
input()
sleep(0.5)
boss_fight = functions.boss_fight("the Murmaider", "trident", 100, 5, 25, 100, 10, 20)
# Won Murmaider boss fight
if boss_fight == "Win":
functions.transition()
print("Your landlord acknowledges your victory and lets you live rent free from now on..", end='')
input()
sleep(0.5)
print("You go back to living you're life.", end='')
input()
sleep(0.5)
exit()
# Lost Murmaider boss fight
elif boss_fight == "Lose":
play_boss_fight_music.stop()
death_song = sa.WaveObject.from_wave_file("Fade_To_Black.wav")
play_death_song = death_song.play()
functions.transition()
print("You wake up in a green forest.", end='')
input()
sleep(0.5)
print("You see the Grim Reaper in front of you.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Am I dead?{QUOTE} You ask the Grim Reaper.", end='')
input()
sleep(0.5)
print(f"{QUOTE}Yes my child{QUOTE} It replies.", end='')
input()
sleep(0.5)
print(f"{QUOTE}I will now judge your past actions to determine where you will be going{QUOTE} The Grim Reaper continues.", end='')
input()
sleep(1)
functions.transition()
functions.transition()
functions.transition()
functions.transition()
functions.transition()
functions.transition()
if morals >= 20:
print(f"{QUOTE}You have been an excellent person{QUOTE} It tells you after thinking for a while.", end='')
input()
sleep(0.5)
print(f"{QUOTE}You will be going to heaven{QUOTE}.", end='')
play_death_song.stop()
functions.play_song("Stairway_To_Heaven.wav")
elif morals >= 5:
print(f"{QUOTE}You have been an decent enough person{QUOTE} It tells you after thinking for a while.", end='')
input()
sleep(0.5)
print(f"{QUOTE}You will be staying on Earth to have fun and haunt people{QUOTE}.", end='')
else:
print(f"{QUOTE}You have been a terrible person{QUOTE} It tells you after thinking for a while.", end='')
input()
sleep(0.5)
print(f"{QUOTE}You will be going to hell{QUOTE}.", end='')
input()
sleep(0.5)
print(f"{QUOTE}What!{QUOTE} You exclaim.", end='')
input()
sleep(0.5)
hell_choice = input("You have three options:"
"\nA. Accept your fate and go to hell, it's pretty metal anyway"
"\nB. Try to convince the Grim Reaper to let you into heaven instead"
"\nC. Fight the grim reaper"
"\n(A/B/C) ")
sleep(0.5)
if hell_choice == "A":
play_death_song.stop()
functions.play_song("Highway_To_Hell.wav")
elif hell_choice == "B":
if disgustingness > 0:
play_death_song.stop()
functions.play_song("Highway_To_Hell.wav")
print(f"{QUOTE}No, you are disgusting! Don't even try to persuade me{QUOTE} The Grim Reaper says.", end='')
else:
print(f"{QUOTE}[Really convincing persuasion]{QUOTE} You tell the Grim Reaper.", end='')
input()
sleep(0.5)
persuasion_probability = ("No", "No", "No", "Yes")
persuasion = random.choice(persuasion_probability)
if persuasion == "No":
print("You failed")
play_death_song.stop()
functions.play_song("Highway_To_Hell.wav")
if persuasion == "Yes":
print("Success!")
play_death_song.stop()
functions.play_song("Stairway_To_Heaven.wav")
elif hell_choice == "C":
play_death_song.stop()
grim_reaper_fight_music = sa.WaveObject.from_wave_file("Highway_To_Hell.wav")
play_grim_reaper_fight_music = grim_reaper_fight_music.play()
grim_reaper_boss_fight = functions.boss_fight("the Grim Reaper", "scythe", 100, 10, 25, 100, 10, 20)
if grim_reaper_boss_fight == "Win":
play_grim_reaper_fight_music.stop()
print("You go to heaven after defeating the Grim Reaper.")
functions.play_song("Stairway_To_Heaven.wav")
elif grim_reaper_boss_fight == "Lose":
print("The Grim Reaper sends you straight to hell.")
play_grim_reaper_fight_music.wait_done()
else:
print(f"{name} unfortunately passed from Wontfollowinstructionsitis")
# Peaceful Ending
else:
print(f"{QUOTE}Here it is{QUOTE} You reply, handing him your credit card.", end='')
input()
money = money-500
print("Your money decreases by 500.", end='')
input()
sleep(0.5)
print("Demo Ends Here")
sleep(1)
print("End Of MetalGuy 6")