!/*****************************************************************************/ !/* Assignment: Interactive Fiction Game */ !/* */ !/* Course: CIS 487, Fall 2005 */ !/* */ !/* Author: Robert Rak */ !/* */ !/* Description: An adventure game in which the player assumes the role */ !/* of an elite special forces soldier who is sent to */ !/* a secret remote military base in order to retrieve */ !/* a new prototype vessel called the Aqua Flyer. */ !/*****************************************************************************/ !/*****************************************************************************/ !/* Walkthrough */ !/* */ !/* south (Beach) */ !/* south (Beach - Bushes) */ !/* examine bushes */ !/* open backpack */ !/* take pda */ !/* take knife */ !/* north (Beach) */ !/* east (Jungle - Wood Boards) */ !/* take wood board */ !/* east (Jungle - Ground Crack - North) */ !/* put wood board on ground crack */ !/* east (Jungle - Equipment Box) */ !/* turn on pda */ !/* unlock equipment box with pda */ !/* take laptop */ !/* take pistol */ !/* take ammunition */ !/* put ammunition in pistol */ !/* south (Jungle) */ !/* west (Jungle - Main Gate) */ !/* south (Military Base) */ !/* turn on laptop */ !/* unlock elevator terminal with laptop */ !/* south (Elevator Up) */ !/* down (Elevator Down) */ !/* north (Main Hall) */ !/* west (West Corridor) */ !/* open supply room door */ !/* north (Supply Room) */ !/* open locker */ !/* look in locker */ !/* take power cell */ !/* south (West Corridor) */ !/* open generator room door */ !/* west (Generator Room) */ !/* examine power generator */ !/* put power cell in power generator */ !/* east (West Corridor) */ !/* east (Main Hall) */ !/* east (East Corridor) */ !/* open computer room door */ !/* north (Computer Room) */ !/* turn on main computer */ !/* south (East Corridor) */ !/* open server room door */ !/* east (Server Room) */ !/* turn on laptop */ !/* put laptop in server terminal */ !/* west (East Corridor) */ !/* west (Main Hall) */ !/* north (North Corridor) */ !/* open control room door */ !/* east (Hangar Control Room) */ !/* turn on control terminal */ !/* west (North Corridor) */ !/* open hangar door */ !/* north (Hangar) */ !/* turn on hangar terminal */ !/* open aqua flyer */ !/* enter aqua flyer */ !/* WIN! */ !/* */ !/*****************************************************************************/ !/*****************************************************************************/ !/* Constants */ !/*****************************************************************************/ Constant Story "Aqua Flyer"; Constant Headline "^An Adventure Game written by Robert Rak^"; Constant DEBUG; !/*****************************************************************************/ !/* Libraries */ !/*****************************************************************************/ Include "parser"; Include "verblib"; Include "grammar"; !/*****************************************************************************/ !/* Globals */ !/*****************************************************************************/ Global Backpack_Visible = 0; Global Equipment_Box_Code = 0; Global Jungle_5_NW = 0; Global Jungle_5_SE = 0; Global Jungle_6_NW = 0; Global Jungle_6_SE = 0; Global Crack_Covered_5 = 0; Global Crack_Covered_6 = 0; Global Pistol_Loaded = 0; Global Generator_Repaired = 0; Global Power_Restored = 0; Global Data_Retrieved = 0; !/*****************************************************************************/ !/* Locations */ !/*****************************************************************************/ !/----------------------------------Jungle 1-----------------------------------/ Object Jungle_1 "Beach - Landing Site" has light with name "beach" "landing" "site", description "After looking around you didn't notice anything significant on the beach. You don't see any other objects besides your parachute. ^You notice that the beach stretches to the south of where you are now.", s_to Jungle_2; !/----------------------------------Jungle 2-----------------------------------/ Object Jungle_2 "Beach" has light with name "beach", description "You see a lot of sand all around you but nothing else of any significance. ^In the distance to the north you can see the place where you landed. To the south you can see a lot of palm trees, and other dense vegetation. To your south you see dense concentration of strange looking bushes.", n_to Jungle_1, s_to Jungle_3, e_to Jungle_4; !/----------------------------------Jungle 3-----------------------------------/ Object Jungle_3 "Beach - Bushes" has light with name "beach", describe [; print "This area has a lot of dense vegetation. There isn't much sand here and the ground is covered with some thick grass. In the distance you can see many strange looking bushes. They seem to have many broken branches. "; if (Backpack_Visible ~= 1) { "The damage seems to be fresh but you don't know what caused it."; } else { "The damage was caused by your falling backpack."; } ], n_to Jungle_2, e_to [; Jungle_5_NW = 1; Jungle_5_SE = 0; Jungle_6_NW = 0; Jungle_6_SE = 0; return Jungle_5; ]; !/----------------------------------Jungle 4-----------------------------------/ Object Jungle_4 "Jungle - Wood Boards" has light with name "jungle", description "This part of the island doesn't resemble the nice environment of the beach on which you have landed. It rather resembles a jungle than a tropical island. You can see many trees and heavy vegetation all around you. To the east and south you can that this jungle is clearing just a little bit. After looking around you also notice some wooden boards lying around in the northern corner of the area. They don't look very interesting, but you wonder how and why did they get here.", w_to Jungle_2, s_to [; Jungle_5_NW = 1; Jungle_5_SE = 0; Jungle_6_NW = 0; Jungle_6_SE = 0; return Jungle_5; ], e_to [; Jungle_5_NW = 0; Jungle_5_SE = 0; Jungle_6_NW = 1; Jungle_6_SE = 0; return Jungle_6; ]; !/----------------------------------Jungle 5-----------------------------------/ Object Jungle_5 "Jungle - Ground Crack - South" has light with name "jungle", describe [; if (Jungle_5_NW == 1) { print "You find yourself in the north-west corner of this area."; } else { print "You find yourself in the south-east corner of this area."; } print "You notice a wide crack in the in the ground stretching all the way from north-east to the south-west corner."; if (Crack_Covered_5 == 1) { print "However, you notice the wooden board you have placed over the crack in the ground, so you can easily go to the other side."; } else { print "At first you think that you can jump over it, but when you get closer you notice that it is way wider then you first thought."; } "After further looking around, to the west you see dense concentration of strange looking bushes. To the north you can see many palm trees and other dense vegetation, which resembles a jungle. To the east you see a clearing in the plant life and some strange shapes which resemble outlines of some kind of building..."; ], n_to [; if (Jungle_5_SE == 1 && Crack_Covered_5 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get thru."; } else { return Jungle_4; } ], w_to [; if (Jungle_5_SE == 1 && Crack_Covered_5 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get thru."; } else { return Jungle_3; } ], e_to [; if (Jungle_5_NW == 1 && Crack_Covered_5 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get throught."; } else { return Jungle_7; } ]; !/----------------------------------Jungle 6-----------------------------------/ Object Jungle_6 "Jungle - Ground Crack - North" has light with name "jungle", describe [; if (Jungle_6_NW == 1) { print "You find yourself in the north-west corner of this area."; } else { print "You find yourself in the south-east corner of this area."; } print "You notice a wide crack in the in the ground stretching all the way from north-east to the south-west corner."; if (Crack_Covered_6 == 1) { print "However, you notice the wooden board you have placed over the crack in the ground, so you can easily go to the other side."; } else { print "At first you think that you can jump over it, but when you get closer you notice that it is way wider then you first thought."; } "After further looking around, to the west you see many palm trees and other dense vegetation, which resembles a jungle. To the east you see a clearing in the plant life and also some knocked down trees, which is somewhat unusual for this place. To the south you see a clearing in the plant life and some strange shapes which resemble outlines of some kind of building..."; ], w_to [; if (Jungle_6_SE == 1 && Crack_Covered_6 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get thru."; } else { return Jungle_4; } ], s_to [; if (Jungle_6_NW == 1 && Crack_Covered_6 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get thru."; } else { return Jungle_7; } ], e_to [; if (Jungle_6_NW == 1 && Crack_Covered_6 == 0) { "You can't jump over the crack in the ground. It's too wide. Maybe you should look for something to put over the crack in order to get thru."; } else { return Jungle_8; } ]; !/----------------------------------Jungle 7-----------------------------------/ Object Jungle_7 "Jungle - Main Gate" has light with name "jungle", description "As you enter this section of the island you notice that you were right about thinking that some kind of building is located here. Now you can clearly see that you have found the entrance to the military base you are suppose to infiltrate. You notice that someone has already tried to get inside the base as the main gate has been partially destroyed. You can thus get to the military base yard by going thru the gate which is to the south.", n_to [; Jungle_5_NW = 0; Jungle_5_SE = 0; Jungle_6_NW = 0; Jungle_6_SE = 1; return Jungle_6; ], w_to [; Jungle_5_NW = 0; Jungle_5_SE = 1; Jungle_6_NW = 0; Jungle_6_SE = 0; return Jungle_5; ], e_to Jungle_9, s_to Military_Base; !/----------------------------------Jungle 8-----------------------------------/ Object Jungle_8 "Jungle - Equipment Box" has light with name "jungle", description "As you enter the area you figure out what knocked down all those trees. It was your equipment box!!! It landed on the opposite side of the island. You look around, but besides your equipment box you don't see anything else of interest.", w_to [; Jungle_5_NW = 1; Jungle_5_SE = 0; Jungle_6_NW = 0; Jungle_6_SE = 1; return Jungle_6; ], s_to Jungle_9; !/----------------------------------Jungle 9-----------------------------------/ Object Jungle_9 "Jungle" has light with name "jungle", description "You see a lot of thick and dense vegetation, however it is not very high and doesn't obstruct your view of the surroundings. Unfortunately after looking around you don't see anything out of the ordinary. ^In the distance to the north you see a clearing in the plant life and also some knocked down trees, which is somewhat unusual for this place. To the west you see a clearing in the plant life and some strange shapes which resemble outlines of some kind of building...", n_to Jungle_8, w_to Jungle_7; !/----------------------------------Military Base------------------------------/ Object Military_Base "Military Base" has light with name "base" "military", description "You are inside the military base compound. There is not much here. The only thing you can see is a cube shaped structure with a door leading to the underground section of the base and a computer terminal used for gaining access to the elevator", n_to Jungle_7, s_to Elevator_Door_Up; !/----------------------------------Elevator Door Up---------------------------/ Object Elevator_Door_Up "Elevator Door Up" has static door openable lockable locked ~open scenery, with name "door" "elevator", description "The door of the elevator, which leads to the underground section of the base.", found_in Military_Base Elevator_Up, door_to [; if (self in Elevator_Up) return Military_Base; return Elevator_Up; ], door_dir [; if (self in Elevator_Up) return n_to; return s_to; ]; !/----------------------------------Elevator Up--------------------------------/ Object Elevator_Up "Elevator Up" has light with name "elevator", description "You are in the elevator on the top level of the base. To your north is the exit to the military base yard. You can also go down to the underground section of the base.", d_to Elevator_Down, n_to Elevator_Door_Up; !/----------------------------------Elevator Down------------------------------/ Object Elevator_Down "Elevator Down" has light with name "elevator", description "You are in the elevator on the bottom level of the base. To the north you see the main hall of the underground complex. The elevator can also take you to the up to the military base yard.", u_to Elevator_Up, n_to Elevator_Door_Down; !/----------------------------------Elevator Door Down-------------------------/ Object Elevator_Door_Down "Elevator Door" has static door openable open scenery, with name "door" "elevator", description "", found_in Main_Hall Elevator_Down, door_to [; if (self in Elevator_Down) return Main_Hall; return Elevator_Down; ], door_dir [; if (self in Elevator_Down) return n_to; return s_to; ]; !/----------------------------------Main Hall----------------------------------/ Object Main_Hall "Main Hall" has light with name "hall" "main", description "This is the main hall of the underground part of the base. You notice that it is quite dark in here and realize that the main power has been turned off and the base is running on emergency power only. On the floor you can faintly see three colored lined: red, green, and blue. You also see a text on the wall: ^RED: Generator Room ^GREEN: Hangar ^BLUE: Computer Room ^You also notice that the red line leads to the west, green to the north, and blue to the east of the main hall.", n_to North_Corridor, e_to East_Corridor, w_to West_Corridor, s_to Elevator_Down; !/----------------------------------West Corridor------------------------------/ Object West_Corridor "West Corridor" has light with name "corridor" "west", description "This is the west corridor of the base. You can see only two doors here. As the labels indicate the door to the north leads to the Supply Room and the door to the west leads to the Generator Room, which is where the red line on the floor ends. The Main Hall is to the east of the corridor.", n_to Supply_Room_Door, w_to Generator_Room_Door, e_to Main_Hall; !/----------------------------------East Corridor------------------------------/ Object East_Corridor "East Corridor" has light with name "corridor" "east", description "This is the east corridor of the base. You can see only two doors here. As the labels indicate the door to the east leads to the Server Room and the door to the north leads to the Computer Room, which is where the blue line on the floor ends. The Main Hall is to the west of the corridor.", n_to Computer_Room_Door, e_to Server_Room_Door, w_to Main_Hall; !/----------------------------------North Corridor-----------------------------/ Object North_Corridor "North Corridor" has light with name "corridor" "north", description "This is the north corridor of the base. you can see three doors here. As the labels indicate the door to the west leads to the Laboratory, the door to the east leads to the Hangar Control Room, and the door to the north leads to the Hangar, which is where the green line on the floor ends. The Main Hall is to the south of the corridor.", n_to Hangar_Door, e_to Hangar_Control_Room_Door, w_to Laboratory_Door, s_to Main_Hall; !/----------------------------------Generator Room-----------------------------/ Object Generator_Room "Generator Room" has light with name "generator" "room", description "This is the Generator Room. Just in front of you there is a very large power generator. Besides the generator you can see many controls and gauges, but you have no idea what they are for and how to use them. The exit to the west corridor is to the east.", e_to Generator_Room_Door; !/----------------------------------Generator Room Door------------------------/ Object Generator_Room_Door "Generator Room Door" has static door openable ~open scenery, with name "generator" "room" "door", description "", found_in Generator_Room West_Corridor, door_to [; if (self in Generator_Room) return West_Corridor; return Generator_Room; ], door_dir [; if (self in Generator_Room) return e_to; return w_to; ]; !/----------------------------------Supply Room--------------------------------/ Object Supply_Room "Supply Room" has light with name "supply" "room", description "This is the Supply Room. You would think that everything should be organized in here, but there is a huge mess. All of the different supplies are on the floor and you can barely get deeper inside. The only thing that has caught your attention is the huge metal locker located in the far corner of the room. The exit to the west corridor is to the south.", s_to Supply_Room_Door; !/----------------------------------Supply Room Door---------------------------/ Object Supply_Room_Door "Supply Room Door" has static door openable ~open scenery, with name "supply" "room" "door", description "", found_in Supply_Room West_Corridor, door_to [; if (self in Supply_Room) return West_Corridor; return Supply_Room; ], door_dir [; if (self in Supply_Room) return s_to; return n_to; ]; !/----------------------------------Computer Room------------------------------/ Object Computer_Room "Computer Room" has light with name "computer" "room", description "This is the Computer Room. You notice that there is only one workstation present labeled Main Computer, to which several display panels are connected. It looks as if almost all subsystems in the base were controlled or managed from this place. The exit to the east corridor is to the south.", s_to Computer_Room_Door; !/----------------------------------Computer Room Door-------------------------/ Object Computer_Room_Door "Computer Room Door" has static door openable ~open scenery, with name "computer" "room" "door", description "", found_in Computer_Room East_Corridor, door_to [; if (self in Computer_Room) return East_Corridor; return Computer_Room; ], door_dir [; if (self in Computer_Room) return s_to; return n_to; ]; !/----------------------------------Server Room--------------------------------/ Object Server_Room "Server Room" has light with name "server" "room", description "This is the Server Room. You can see only two pieces of hardware in this room. One of them is of course the large server located just opposite of the door and the other is a terminal access point used most likely for maintenance reasons. The exit to the east corridor is to the west.", w_to Server_Room_Door; !/----------------------------------Server Room Door---------------------------/ Object Server_Room_Door "Server Room Door" has static door openable ~open scenery, with name "server" "room" "door", description "", before [; Open: if (Power_Restored == 0) { "This door is locked and can't be opened without the main power back on."; } ], found_in Server_Room East_Corridor, door_to [; if (self in Server_Room) return East_Corridor; return Server_Room; ], door_dir [; if (self in Server_Room) return w_to; return e_to; ]; !/----------------------------------Laboratory---------------------------------/ Object Laboratory "Laboratory" has light with name "laboratory" "lab", description "This is the base Laboratory. All tests, construction and development took place here. You can see many different parts lying on the tables to your left, but they don't seem to much use to you. On the right side of the room you can see multiple workstations used most likely in the design of Aqua Flyer. The exit to the north corridor is to the east.", e_to Laboratory_Door; !/----------------------------------Laboratory Door----------------------------/ Object Laboratory_Door "Laboratory Door" has static door openable ~open scenery, with name "laboratory" "lab" "door", description "", found_in Laboratory North_Corridor, door_to [; if (self in Laboratory) return North_Corridor; return Laboratory; ], door_dir [; if (self in Laboratory) return e_to; return w_to; ]; !/----------------------------------Hangar-------------------------------------/ Object Hangar "Hangar" has light with name "hangar", description "This is the main Hangar of the base where the Aqua Flyer is being stored. Right in front of you there is the ship you have been sent here to retrieve. From what you can see it is placed on some kind of docking station of some sort. To the left of the ship you can see a small terminal station. Just in front of the Aqua Flyer you can see the hangar door. The exit to the north corridor is to the south.", s_to Hangar_Door; !/----------------------------------Hangar Door--------------------------------/ Object Hangar_Door "Hangar Door" has static door openable ~open scenery, with name "hangar" "door", description "", before [; Open: if (Power_Restored == 0) { "This door is locked and can't be opened without the main power back on."; } ], found_in Hangar North_Corridor, door_to [; if (self in Hangar) return North_Corridor; return Hangar; ], door_dir [; if (self in Hangar) return s_to; return n_to; ]; !/----------------------------------Hangar Control Room------------------------/ Object Hangar_Control_Room "Hangar Control Room" has light with name "control" "room", description "This is the Hangar Control Room. You can see a large window on one wall through which you can see the main hangar and the Aqua Flyer. Just in front of the window there is a rather large control panel used for coordinating the operations in the hangar.", w_to Hangar_Control_Room_Door; !/----------------------------------Hangar Control Room Door-------------------/ Object Hangar_Control_Room_Door "Hangar Control Room Door" has static door openable ~open scenery, with name "control" "room" "door", description "", found_in Hangar_Control_Room North_Corridor, door_to [; if (self in Hangar_Control_Room) return North_Corridor; return Hangar_Control_Room; ], door_dir [; if (self in Hangar_Control_Room) return w_to; return e_to; ]; !/*****************************************************************************/ !/* Objects */ !/*****************************************************************************/ !/----------------------------------Parachute----------------------------------/ Object Parachute "Parachute" Jungle_1 has concealed static, with name "parachute", description "This is your parachute. It seems to be all tangled up. It looks like you wouldn't have much use for it now.", before [; Take: "The parachute is tangled up and you wouldn't have much use for it right now."; ]; !/----------------------------------Bushes-------------------------------------/ Object Bushes "Bushes" Jungle_3 has concealed scenery container pluralname, with name "bushes" "bush", before [; Examine: Backpack_Visible = 1; give Backpack ~concealed; "When you approach the bushes, you notice that they have been damaged by some kind of falling object. You start looking through the dense growing plants and to your surprise you notice the backpack you lost after jumping of the airplane..."; ]; !/----------------------------------Backpack-----------------------------------/ Object Backpack "Backpack" Bushes has concealed openable ~open container, with name "backpack", before [; Examine: if (Backpack_Visible == 1) { "This is the backpack you lost after jumping out of the plane. It looks to be torn in many places due to the impact but some of the gear might be still in there..."; } else { "You don't see anything like that."; } Open, Close: if (Backpack_Visible ~= 1) { "You don't see anything like that."; } Take: if (Backpack_Visible ~= 1) { "You don't see anything like that."; } else { "The backpack is torn in many places and looks like it wouldn't be much of a use to you."; } Search: if (Backpack_Visible == 1 && Backpack has open) { give PDA ~concealed; give Knife ~concealed; "Inside of the backpack you can see your military PDA and a knife. You don't see any other objects."; } ], after [; Open: "Inside of the backpack you can see your military PDA and a knife. You don't see any other objects."; ], found_in Bushes; !/----------------------------------PDA----------------------------------------/ Object PDA "PDA" Backpack has concealed switchable, with name "pda", before [; Examine: if (Backpack_Visible == 1 && Backpack has open) { print "It is a military PDA. It is a very sturdy piece of equipment and it doesn't seem to be damaged after the fall. You remember storing the access code to the equipment box in this PDA."; if (PDA has on) { "^The PDA is currently turned on and displays a five digit code: 89372."; } else { "^The PDA is currently turned off."; } } else { "You don't see anything like that."; } Take: if (Backpack_Visible == 1 && Backpack has open) { move PDA to player; "You have taken the PDA out of the backpack."; } else { "You don't see anything like that."; } SwitchOn, SwitchOff: if (Backpack_Visible ~= 1 && Backpack hasnt open) { "You don't see anything like that."; } else if (PDA notin player) { "You need to take the PDA out of the backpack in order to use it."; } ], after [; SwitchOn: Equipment_Box_Code = 1; "You power on the PDA. It displays a combination of five digits - 89372. You remember that this is the code required to open the equipment box you threw off the plane before it crashed."; SwitchOff: "You power off the PDA."; ]; !/----------------------------------Knife--------------------------------------/ Object Knife "Knife" Backpack has concealed, with name "knife", before [; Examine: if (Backpack_Visible == 1 && Backpack has open) { "It is a standard issue military knife. The blade is about 10 inches long and looks very sharp. It might come in handy when you go deeper into the jungle."; } else { "You don't see anything like that."; } Take: if (Backpack_Visible == 1 && Backpack has open) { move Knife to player; "You have taken the knife out of the backpack."; } else { "You don't see anything like that."; } ]; !/----------------------------------Ground Crack-------------------------------/ Object Ground_Crack "Wide Ground Crack" has scenery supporter, with name "ground" "crack", before [; Examine: "It's a wide and deep crack in the ground. It stretches from the north-east to the south-west corner of your current location. You shouldn't jump over it, as this may be very dangerous."; JumpOver: "You shouldn't try to do that, as you might not make it to the other side and fall in to the opening. That might be lethal. Try to look for something that you could use to get to the other side more safely."; ], found_in Jungle_5 Jungle_6; !/----------------------------------Wood Boards--------------------------------/ Object Wood_Boards "Wood Boards" Jungle_4 has concealed pluralname, with name "wood" "board" "boards", description "These are wooden boards. They seem to be quite long but not very wide. However they look very sturdy.", before [; Take: move Wood_Boards to player; "You have grabbed one of the wooden boards with both hands. You can drag it somewhere now but you won't be able to pick up anything else while you are dragging this board."; PutOn: if (Wood_Boards in player) { if (player in Jungle_5) { Crack_Covered_5 = 1; } else { Crack_Covered_6 = 1; } move Wood_Boards to Ground_Crack; "You have successfully put a wooden board over the crack. You can now safely get to the other side."; } ]; !/----------------------------------Equipment Box------------------------------/ Object Equipment_Box "Equipment Box" Jungle_8 has scenery concealed openable lockable locked container, with name "equipment" "box", description "This is the equipment box you have thrown out of the plane before you jumped out. It doesn't seem to be damaged and the locking mechanism is fully functional.", with_key PDA, before [; Open: if (self has locked) { "You need to unlock the equipment box with a code in order to gain access to it."; } Take: "The equipment box is too heavy for you to carry it with you."; Unlock: if (PDA in player && Equipment_Box_Code == 1) { give self ~locked ~lockable open; give Laptop ~concealed; give Pistol ~concealed; give Ammunition ~concealed; print "You have successfully unlocked the equipment box with the code you have found in the PDA.^"; rtrue; } else { print "The equipment box is secured with an access code. In order to unlock it you must know the code.^"; rfalse; } Search: if (self has open) { give Laptop ~concealed; give Pistol ~concealed; give Ammunition ~concealed; "Inside of the equipment box you can see a laptop, a pistol, and ammunition."; } ], after [; Open, Unlock: "Inside of the equipment box you can see a laptop, a pistol, and ammunition."; ]; !/----------------------------------Laptop-------------------------------------/ Object Laptop "Laptop" Equipment_Box has concealed switchable, with name "laptop", before [; Examine: if (Equipment_Box has open) { print "It is a military laptop. It has a very sturdy case and can resist many types of damage."; if (PDA has on) { "^The laptop is currently turned on and you can see a code breaking program running in the foreground."; } else { "^The laptop is currently turned off."; } } else { "You don't see anything like that."; } Take: if (Equipment_Box has open) { move Laptop to player; "You have taken the laptop out of the equipment box."; } else { "You don't see anything like that."; } SwitchOn, SwitchOff: if (Equipment_Box hasnt open) { print "You don't see anything like that."; rfalse; } else if (Laptop notin player) { print "You need to take the laptop out of the equipment box in order to use it."; rfalse; } ], after [; SwitchOn: "You turn on the laptop. It starts up the operating system and launches a sophisticated code breaking application, which you think might prove useful in the milirary base."; SwitchOff: "You power off the laptop."; ]; !/----------------------------------Pistol-------------------------------------/ Object Pistol "Pistol" Equipment_Box has concealed container, with name "pistol" "gun", before [; Examine: if (Equipment_Box has open) { print "This is a standard issue special forces pistol."; } else { "You don't see anything like that."; } Take: if (Equipment_Box has open) { move Pistol to player; "You have taken the pistol out of the equipment box."; } else { "You don't see anything like that."; } ]; !/----------------------------------Ammunition---------------------------------/ Object Ammunition "Ammunition" Equipment_Box has concealed, with name "ammunition" "ammo", before [; Examine: if (Equipment_Box has open) { print "This is the ammunition for the pistol found in the equipment box."; } else { "You don't see anything like that."; } Take: move Ammunition to player; "You have taken the ammunition out of the equipment box."; Insert: if (Pistol in player && Ammunition in player && second == Pistol) { Pistol_Loaded = 1; remove Ammunition; "You have successfully loaded the pistol with the ammunition found in the equipment box."; } ]; !/----------------------------------Elevator Terminal--------------------------/ Object Elevator_Terminal "Elevator Terminal" Military_Base has scenery concealed lockable locked, with name "terminal" "elevator terminal", description "The access terminal consists of a numeric keypad used for entering the appropriate code for gaining access to the elevator and a computer hookup socket used for maintenance tasks.", before [; Unlock: if (Laptop in player && second == Laptop) { if (Laptop has on) { give self ~locked ~lockable; give Elevator_Door_Up ~locked ~lockable open; "You have successfully hooked up your laptop to the elevator terminal and found the access code using the software on your machine. You now can use the elevator to get inside of the base."; } else { "You need to turn on your laptop before you try to use it."; } } ]; !/----------------------------------Locker-------------------------------------/ Object Locker "Locker" Supply_Room has scenery openable ~open container, with name "locker", before [; Examine: "It is a rather large metal locker. It looks very sturdy and heavy. It doesn't have any markings whatsoever. It also doesn't seem to have any kind of locking mechanism."; Take: "The locker is way to heavy for you to carry. You probably wouldn't be able to move it from place."; Search: if (self hasnt open) { "The locker seems to be closed. You must open it in order to look inside."; } else { if (Power_Cell in Locker) { give Power_Cell ~concealed; "You look through the locker and amongst other things you notice a rather large, cubic shaped power cell!"; } else { "You don't see anything interesting in the locker besides some supplies."; } } ]; !/----------------------------------Power Cell---------------------------------/ Object Power_Cell "Power Cell" Locker has concealed, with name "power" "cell", before [; Examine: if (Power_Cell hasnt concealed) { "It is a large, cubic shaped power cell. It has some markings on top and on the sides but they only contain some technical details about the specifications of the device."; } else { "You don't see anything like that."; } Take: if (Power_Cell hasnt concealed) { move Power_Cell to player; "The power cell is heavy, but you manage to pick it up from the shelf of the metal locker. You need to use your both hands to carry it around."; } else { "You don't see anything like that."; } Insert: if (Power_Cell hasnt concealed && Power_Cell in player && second == Power_Generator) { Generator_Repaired = 1; remove Power_Cell; "You have successfully connected the power cell to the generator."; } else { "You can't perform this task."; } ]; !/----------------------------------Power Generator----------------------------/ Object Power_Generator "Power Generator" Generator_Room has scenery concealed container, with name "power" "generator", before [; Examine: if (Power_Restored == 1) { "The power generator seems to be online and operating normally."; } else if (Generator_Repaired == 1 && Power_Restored == 0) { "The power generator still seems to be offline even after you installed the power cell. You wonder if it maybe needs to be started from a different location within the base."; } else { "The power generator seems to be offline. After close examination you notice that the power cell required for normal operation has been disconnected and is missing."; } ]; !/----------------------------------Computer-----------------------------------/ Object Computer "Computer" Computer_Room has scenery concealed switchable, with name "main" "computer", before [; Examine: print "The label states: Main Computer. The computer looks very high-tech. It is connected to many display screens. It also looks like it is connected with many of the base systems."; if (Computer has on) { "^The computer is currently running. You can see some diagnostic programs running in the background."; } else { "^The computer is currently turned off"; } SwitchOn: if (Generator_Repaired == 0) { "The computer doesn't give any signs of life. There is no power."; } SwitchOff: if (Power_Restored ==1) { "If you shut down the main computer right now, the power to the base will be lost and it is uncertain if you will be able to restore it again."; } ], after [; SwitchOn: Power_Restored = 1; "The computer starts up and goes through the boot process. You then watch how diagnostic programs are being executed automatically. After few minutes the lights in the base turn on and a message is displayed on the computer screen: ^All diagnostic tests completed successfully. ^Power restored. ^All systems functioning correctly."; ]; !/----------------------------------Server-------------------------------------/ Object Server "Server" Server_Room has scenery concealed, with name "main" "server", description "The main server is currently running. It seems that after the main power has been restored to the base the server came back online automatically. The server itself doesn't have any access ports and isn't very useful to you."; !/----------------------------------Server Terminal----------------------------/ Object Server_Terminal "Server Terminal" Server_Room has scenery concealed container, with name "server" "terminal", description "This server terminal access point is most likely used for performing maintenance operations on the server. It looks like it requires a separate computer or a laptop to be connected in order to perform any tasks.", before [; Insert: if (Laptop in player && second == Laptop) { if (Laptop has on) { Data_Retrieved = 1; move Laptop to player; "You have successfully connected your laptop to the terminal station. After several seconds you were prompted for a password and you executed the code breaking software on your machine. It took some time but you gained access to the system and managed to download and then destroy all data concerning the Aqua Flyer project."; } else { "You need to turn on your laptop before you try to use it."; } } ]; !/----------------------------------Control Terminal---------------------------/ Object Control_Terminal "Control Terminal" Hangar_Control_Room has scenery concealed switchable, with name "control" "terminal", before [; Examine: print "The control terminal looks somewhat complicated. There are many switches and gauges. There is also a display screen with a keyboard attached to the terminal."; if (Control_Terminal has on) { "^The control terminal is currently operational. You can see that all diagnostic lamps are green, meaning that everything is functioning correctly."; } else { "^The control terminal is not operating currently."; } SwitchOn: if (Power_Restored == 0) { "The control terminal won't start up on right now as there is no power."; } ], after [; SwitchOn: "The control terminal is now operational. You see as slowly all red diagnostic lamps change their state to green indicating that a given system has passed diagnostics and is fully functional. After few minutes you notice that all lamps across the terminal are green."; ]; !/----------------------------------Hangar Terminal----------------------------/ Object Hangar_Terminal "Hangar Terminal" Hangar has scenery concealed switchable, with name "hangar" "terminal", before [; Examine: print "The hangar terminal looks very simple. There is only one switch and some indicator lights. The switch has only ON and OFF positions. From the instructions you deduce that turning the terminal ON allows the hangar doors to be open from within the Aqua Flyer."; if (Control_Terminal has on) { "^The hangar terminal is currantly operational."; } else { "^The hangar terminal is currently offline. From the instructions you come to the conclusion that the terminal in the Hangar Control Room must be turned on for this terminal to function correctly."; } SwitchOn: if (Control_Terminal hasnt on) { "The hangar terminal doesn't respond when you try to turn it on."; } ]; !/----------------------------------Aqua Flyer---------------------------------/ Object Aqua_Flyer "Aqua Flyer" Hangar has static concealed enterable openable ~open, with name "aqua" "flyer", before [; Examine: print "The Aqua Flyer looks very futuristic. It has an almost triangular shape and looks quite flat as seen from the side. You can notice that all lines are very aerodynamic. As you approach the vessel, you notice that its plating isn't smooth but quite rough. This unique advanced design allows the Flyer to spread any radar or sonar beams."; if (Control_Terminal has on) { "^When you look inside the cockpit, you notice that non of the gauges or onboard computers seem to be functioning, as if there was no power supplied to the vessel."; } else { "^When you look inside the cockpit, you notice that many gauges and the onboard computers are lit up and functional. The vessel is completely powered up."; } Go, GoIn, Enter: if (Aqua_Flyer has open) { if (Control_Terminal has on && Hangar_Terminal has on) { deadflag = 2; give Aqua_Flyer ~open; "You climb onboard the Aqua Flyer and execute the pre-launch procedures. The cockpit closes and the main hangar door slowly open. The vessel is then moved to the outer hangar bay, the main hangar door close behind you and the compartment is completely filled with water. After few minutes the outer hangar doors open and the docking clamps are released. You successfully navigate out of the base and past terrorist lines to safety."; } else if (Control_Terminal has on && Hangar_Terminal hasnt on) { "You climb onboard the Aqua Flyer and try to execute the pre-launch procedures, but the computer displays an error message indicating that the main hangar door can't be open remotely because they haven't been turned on."; } else { "You climb onboard the Aqua Flyer but you notice that all of the gauges and computers aren't functional and don't respond to any of your commands. You believe that the power to the ship hasn't been automatically restored and must be done manually somewhere else."; } } else { "You should first open the Aqua Flyer before you try to get on board."; } ]; !/*****************************************************************************/ !/* Initialise */ !/*****************************************************************************/ [ Initialise; location = Jungle_1; print "^^The year is 2036. The terrorist attacks all around the World have been increasing in magnitude and frequency for many years. The terrorist groups became more organized and their attacks more wide spread. Thanks to the enormous funds these organizations have gathered, they were able to create an enormous army consisting of newest planes, tanks, and boats. These forces allowed them to coordinate massive attacks on various targets from air, ground, and water. ^^In order to effectively fight off the terrorist threat, the forces of NATO coalition for the past few years have been developing a new type of multi-purpose vessel, which could be used not only as an aircraft but also as a submarine. ^^This vessel was being developed under a project called ~Aqua Flyer~. In the past few months the project reached its final stages and the new vessel was ready for deployment and mass production. Unfortunately the terrorists discovered the location of the secret base in the Pacific Ocean where the Aqua Flyer was being developed and managed to create a blockade of the island. Before this happened NATO forces managed to evacuate all the scientists and other military personnel from the base. However, the Aqua Flyer could not be retrieved. ^^Currently the NATO forces are trying to hold off the terrorists from accessing the island and the prototype vessel but this is becoming harder with each day. The option to destroy the base on the island and the Aqua Flyer along with it is out of the question. Thus a plan was developed to infiltrate the island by someone who is capable of piloting the vessel in order to retrieve this advanced prototype. ^^As a special forces soldier with many hours of flying experience you were selected for this mission. Your objectives are simple. You are to infiltrate the military complex located on the island and retrieve the prototype Aqua Flyer along with any information about the vessel stored in the base computers. ^^The mission plan assumed you would parachute from a plane along with all your equipment. Unfortunately, the plane was fired upon by terrorists and crashed in the ocean. However, you managed to throw all your equipment and jump from the plane just before it crashed. ^^You woke up on a beach, disoriented and without any equipment. You did not even have your backpack, which contained a PDA with access codes to the equipment box. However, you suspect that both should be near by, somewhere on the island...^^"; ];