#!/usr/bin/perl ############################################################################### # ch2-help.pl # ############################################################################### # Help file for Chapter 2 of Artemis Fowl # # =========================================================================== # # This is a help file in Perl, for my Artemis Fowl game. The game should # # be included in this package. # # =========================================================================== # # Disclaimer: # # This game is based on the book series Artemis Fowl by Eoin Colfer. No # # profit is being made from this and all is done purely for the sake of # # entertainment. No claim is being made to the ownership of Artemis Fowl. # # The rights to this series and all fictional elements associated with it go # # to Eoin Colfer, Puffin Books, Penguin Books, Hyperion and Miramax Books. # # No infringement of any international copyright law is intended here. # # # # The ASCII art in the game was obtained from an Internet ASCII generator # # (http://www.network-science.de/ascii/) based on FIGlet. # # HTML-Frontend (c) 1996-2004 by Jorg Seyfferth # # FIGlet (http://www.figlet.org/) # # (c) 1991, 1993, 1994 Glenn Chappell and Ian Chai # # Credits for the 140-150 fonts are listed in the font database # # (http://www.figlet.org/fontdb.cgi) # # =========================================================================== # # This work is licensed under the # # Creative Commons Attribution-NonCommercial-NoDerivs2.5 License. # # To view a copy of this license, visit # # http://creativecommons.org/licenses/by-nc-nd/2.5/ # # or send a letter to Creative Commons, 543 Howard Street, # # 5th Floor, San Francisco, California, 94105, USA. # # =========================================================================== # # Thanks to: The White Lily for all her help during alpha testing # # =========================================================================== # # Version: 0.5beta # # Released: August 29, 2006. # # Programmed by: Gus (gussiki@gmail.com) # ############################################################################### use strict; use Text::Wrap qw(wrap $columns $huge); my $columns = 80; my $huge = "wrap"; sub BEGIN { # This subroutine is only in place for the publicly-available versions # It does not appear in the original old releases print " # =========================================================================== # # Disclaimer: # # This game is based on the book series Artemis Fowl by Eoin Colfer. No # # profit is being made from this and all is done purely for the sake of # # entertainment. No claim is being made to the ownership of Artemis Fowl. # # The rights to this series and all fictional elements associated with it go # # to Eoin Colfer, Puffin Books, Penguin Books, Hyperion and Miramax Books. # # No infringement of any international copyright law is intended here. # # # # The ASCII art in the game was obtained from an Internet ASCII generator # # (http://www.network-science.de/ascii/) based on FIGlet. # # HTML-Frontend (c) 1996-2004 by Jörg Seyfferth # # FIGlet (http://www.figlet.org/) # # (c) 1991, 1993, 1994 Glenn Chappell and Ian Chai # # Credits for the 140-150 fonts are listed in the font database # # (http://www.figlet.org/fontdb.cgi) # # =========================================================================== # ===Please Hit Enter to Continue==="; ; print " # =========================================================================== # # This work is licensed under the # # Creative Commons Attribution-NonCommercial-NoDerivs2.5 License. # # # # To view a copy of this license, visit # # http://creativecommons.org/licenses/by-nc-nd/2.5/ # # or send a letter to Creative Commons, 543 Howard Street, # # 5th Floor, San Francisco, California, 94105, USA. # # =========================================================================== # ===Please Hit Enter to Begin===\n"; ; } ### Actual help file begins here. ### begin: # Declare the variables here my ($invalid, $quit, $choice, $output, $help, $help2); # Define the variables $invalid = "\nSorry, but that is an invalid option.\n"; ### Subroutines ### # The "put" subroutine, stealing a command from Turing sub put { $output = $_[0]; $output =~ s/( ){3,}//g; $output =~ s/\t//g; print wrap("", "", $output); } # The "quit" subroutine sub quit { quit: &put("\nAre you sure you want to exit? Y/N > "); $quit = ; chomp($quit); if ($quit =~ /^(y|yes)$/i) { die "\nBye bye!\n"; } elsif ($quit =~ /^(n|no)$/i) { &put("You have chosen to stay. ===Please Hit Enter to Continue===\n"); ; } else { print $invalid; $quit = ""; goto quit; } } # The "help" subroutine sub help { $help = " === Help Screen === This is the help/hints file for the game. If you are viewing this, you probably have difficulties playing the game. This program will give tips and hints, without revealing too much of the story. Please note that a walkthrough would make the whole game pointless. Simply navigate your way around this file with numbers and letters. To exit, type in the letter \"x\". To obtain this screen again, type the letter \"h\". ===Please Hit Enter to Continue==\n"; $help =~ s/( ){3,}//g; print wrap("", "", $help); ; } # The "choice" subroutine sub choice { &put("\n\nWhat would you like to do? > "); $choice = ; chomp($choice); if ($choice =~ /^(h|help)$/i) { &help; } elsif ($choice =~ /^(x|exit)$/i) { &quit; } } ## Yay! The help file actually begins! print " _____ _ _ _____ _ | _ |___| |_ ___ _____|_|___ | __|___ _ _ _| | | | _| _| -_| | |_ -| | __| . | | | | | |__|__|_| |_| |___|_|_|_|_|___| |__| |___|_____|_| _____ _ _ ___ | | |_ ___ ___| |_ ___ ___ |_ | | --| | .'| . | _| -_| _| | _| |_____|_|_|__,| _|_| |___|_| |___| |_| _____ _ _____ _ _ | | |___| |___ | __|_| |___ | | -_| | . | | __| | | -_| |__|__|___|_| _| |__| |_|_|___| |_| Programmed by Gus ===Please Hit Enter to Begin===\n"; ; &help; # Print out the file for the first time. # Main screen. The "crossroads." main: &put("\nThese are your options: 1. Any general hints or tips for me? 2. Help me! What do I do? 3. How do I unlock the attic door? 4. I've talked to Angline, but Juliet doesn't give me another task! 5. Where are the pills? [1-5: view hint] [m: more hints] [h: help] [x: exit]"); &choice; if ($choice =~ /^1$/) { $help2 = "\nBASIC COMMANDS Here are some basic commands. Please note that there are more options not listed here. look = Shows information about your surroundings go = Specify where you want to go with full or abbreviated compass directions. Room names are also accepted. i/inv/inventory = Shows your inventory who/whoami = Tells you which character you're currently playing as talk/talk to = Talk to a person for advice or clues examine/look at = Examine an object for clues get/take = Get an object to use later on in the game type = Type text into a computer help = Access this screen restart = Restart game exit/quit = Exit the game ===Please Hit Enter to Continue==\n"; $help2 =~ s/( ){3,}//g; print wrap("", "", $help2); ; &put("\nWHY ISN'T MY COMMAND ACCEPTED? There can be several reasons why your command isn't accepted. The most obvious reason would be because you can't do it. It gets more problematic with other reasons. Note that although it is case insensitive (ie \"get\" is the same as \"gET\"), punctuation will not be accepted. It would also be a good idea to rephrase your command. A lot of times this will be the problem. ===Please Hit Enter to Continue==="); ; &put("\nHINTS AND TIPS THAT I WILL WILLINGLY DIVULGE Well, the problem that most people seem to be encountering is phrasing the commands properly. It might help to keep track of what commands work or don't work. If you see an object that you can pick up, it might be best to pick it up. Unless there's a very good reason not to. There's a reason it can be picked up (whether for good or for ill, it's for you to decide.) Sometimes a lot of things are hidden, so it's a good idea to walk around and examine everything you can. It's also a good idea to continue talking to people -- sometimes they have more to say. ===Please Hit Enter to Continue==="); ; &put("\nHINTS AND TIPS THAT I WILL WILLINGLY DIVULGE - CONTINUED This level is also a bit more complex than the first one. In this level, there is movement. You can literally walk around (parts of) Fowl Manor. There's no time limit, but try not to get lost. Also, your progress in this game isn't saved. So making a record of your progress would be helpful (if your memory isn't too good...). But most of all, have patience and don't give up. Text-based games are daunting if you haven't played them before, but with time you'll learn the tricks of the trade. Have fun! ===Please Hit Enter to Continue==="); ; } elsif ($choice =~ /^2$/) { goto objective; } elsif ($choice =~ /^3$/) { goto unlockdoor; } elsif ($choice =~ /^4$/) { goto curtains; } elsif ($choice =~ /^5$/) { goto wherepills; } elsif ($choice =~ /^(m|more)$/i) { goto main2; } else { print $invalid; $choice = ""; } goto main; # Objective - What's my reason in life? AKA What do I do in this game? objective: &put("\nWHAT DO I DO IN THIS GAME? You have to translate the Book. Of course, you have to complete a few other tasks before you do that... [m: more - What tasks do you speak of?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { objective2: &put("\nMORE ABOUT THE TASKS THAT MUST BE COMPLETED. Talk to Juliet! She'll tell you what to do... vaguely. And when you're finished, talk to Juliet again! ===Please Hit Enter to Continue==="); ; goto main; } else { print $invalid; $choice = ""; } goto objective; # Unlockdoor - Brute force isn't the answer here. unlockdoor: &put("\nHOW DO I UNLOCK THE DOOR? Read it carefully. You and Butler just arrived to Fowl Manor, so neither of you could have done it. Who else could have locked it? [m: more - I KNOW who locked it, but how do I UNLOCK the door?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { unlockdoor2: &put("\nHOW TO UNLOCK THE DOOR. Haven't you tried talking to the culprit? [m: more - I have the key, now what do I do with it?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { unlockdoor3: &put("\nHOW TO UNLOCK THE DOOR WHEN YOU HAVE THE KEY. Isn't UNLOCK DOOR simple enough for you? ===Please Hit Enter to Continue==="); ; goto main; } else { print $invalid; $choice = ""; } goto unlockdoor2; } else { print $invalid; $choice = ""; } goto unlockdoor; # Curtains - The task Angeline gives you curtains: &put("\nJULIET DOESN'T GIVE ME A TASK! You talked to Angeline, right? What did she say? Did you do as she asked? I mean, it's quite rude to not help your own mother... [m: more - What am I supposed to do?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { curtains2: &put("\nANGELINE'S TASK. Angeline asked you to CLOSE CURTAINS. Why didn't you do it? ===Please Hit Enter to Continue==="); ; goto main; } else { print $invalid; $choice = ""; } goto curtains2; # Wherepills - Where can the pills be found? wherepills: &put("\nWHERE ARE THE PILLS? Well... Juliet may have blonde hair, but she's not a dumb blonde. Why don't you talk to her? I'm sure she'll remember where she last saw the pills. [m: more - Where did she see them?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { wherepills2: &put("\nWHERE DOES JULIET THINK THE PILLS ARE? Talk to Juliet! She'll tell you that she had them while she was making breakfast. [m: more - Where does she make breakfast?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { goto wherepills3; } else { print $invalid; $choice = ""; } goto wherepills2; } else { print $invalid; $choice = ""; } goto wherepills; wherepills3: #More pills &put("\nWHERE DO YOU MAKE BREAKFAST? I'm a computer program. I don't make breakfast. But the logical places would be the kitchen or the pantry. [m: more - Just tell me the room.] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { wherepills4: &put("\nTHE ROOM THE PILLS ARE IN They're in the pantry. Look around. Something's wrong. [m: more - What's wrong?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { goto wherepills5; } else { print $invalid; $choice = ""; } goto wherepills4; } else { print $invalid; $choice = ""; } goto wherepills3; wherepills5: #Even more pills &put("\nWHAT'S WRONG There is an upturned pot. Fix it. [m: more - I give up. How do I fix it?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main; } elsif ($choice =~ /^(m|more)$/i) { wherepills6: &put("\nHOW TO FIX AN UPTURNED POT It's easy. You just FLIP POT. Then something happens. And I think that's enough hints for this paticular task. ===Please Hit Enter to Continue==="); ; goto main2; } else { print $invalid; $choice = ""; } goto wherepills5; # Main screen. The "crossroads." Part 2 main2: &put("\nThese are your options: 1. I can't give the pills to Juliet! 2. Where's the package? 3. Why doesn't my computer work? 4. What's the password? 5. I'm finished the game. [1-5: view hint] [h: help] [x: exit]"); &choice; if ($choice =~ /^1$/) { &put("\nWHY CAN'T I GIVE THE PILLS TO JULIET? She still has stuff to say. Keep talking to her. She'll see the pills and take them from you. Eventually. ===Please Hit Enter to Continue==="); ; goto main2; } elsif ($choice =~ /^2$/) { &put("\nWHERE'S THE PACKAGE? Outside. Yes, you can go outside now. You had to give the pills to Juliet to go out. ===Please Hit Enter to Continue==="); ; goto main2; } elsif ($choice =~ /^3$/) { goto fixcomputer; } elsif ($choice =~ /^4$/) { goto password; } elsif ($choice =~ /^5$/) { &put("\nI'M FINISHED THE GAME That's not even a question. And I couldn't care less. I'm just a help file! Oh, you want to know what to now? Well, you can get on with your life, or you can continue playing this game. Yeah, you've beaten the game, but have you found all the easter eggs and cool things that you can do? Or you could simply wait for the next installment, which will probably take months. It's your choice. (I recommend getting on with your life.) ===Please Hit Enter to Continue==="); ; goto main2; } else { print $invalid; $choice = ""; } goto main; # Fixcomputer - What's wrong with the computer? fixcomputer: &put("\nWHY DOESN'T THE COMPUTER WORK? Examine your computer. It's not turned on. [m: more - I turned it on and nothing happened.] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main2; } elsif ($choice =~ /^(m|more)$/i) { fixcomputer2: &put("\nI TURNED THE COMPUTER ON AND NOTHING HAPPENED. Examine it again! It's not plugged in. [m: more - I give up. What do I say?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main2; } elsif ($choice =~ /^(m|more)$/i) { fixcomputer3: &put("\nWHAT TO SAY TO FIX THE COMPUTER. How about PLUG COMPUTER? The catch is that you need a certain item before this will work... ===Please Hit Enter to Continue==="); ; goto main2; } else { print $invalid; $choice = ""; } goto fixcomputer2; } else { print $invalid; $choice = ""; } goto fixcomputer; # Password - Password? password: &put("\nWHAT'S THE PASSWORD? Well... telling you right now would be spoiling it. But read carefully. It's the family motto. Before you ask me what the family motto is, I'll tell you that it's somewhere in the manor. You just have to find it. [m: more - Where can I find this \"motto\"?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main2; } elsif ($choice =~ /^(m|more)$/i) { password2: &put("\nWHERE CAN I FIND THE MOTTO? You should have found it at the very beginning. At any rate, it's in the foyer. [m: more - I give up. What's the password?] [b: back] [h: help] [x: exit]"); &choice; if ($choice =~ /^(b|back)$/i) { goto main2; } elsif ($choice =~ /^(m|more)$/i) { password3: &put("\nWHAT'S THE PASSWORD? Try AURUM POTESTAS EST. \"Aurum est Potestas\" is improper Latin, no matter what the American publishers think. ===Please Hit Enter to Continue==="); ; goto main2; } else { print $invalid; $choice = ""; } goto password2; } else { print $invalid; $choice = ""; } goto password;