Constant Story "Dead in the Water"; Constant Headline "^An Inform Adventure^by Nicholas Mezza^"; Constant DEBUG; Constant MAX_SCORE = 3; Include "parser"; Include "verblib"; Include "grammar"; !-- score is predefined as 0. 1 point for medication found, 1 point for escaping !-- the ship, and 1 point for sinking the ship !-- global flags Global magnet_on = 1; !-- is the crane 1 magnet on? Global coffee_mug_filled = 0; !-- is the coffee mug filled with water? Global handle_frozen = 1; !-- is the cargo bay door handle frozen shut Global got_medication = 0; !-- has the player recieved medicine yet ! ---------- Deck 2 - Living Quarters ------------ Object RM_LivingQuarters "Living Quarters" with name "living" "quarter" "quarters", description[; if (ITEM_Light has light && ITEM_Light in self) print "The living quarters are dimly lit by a lone flourescent light hanging over the single door. "; else print "The living quarters are dark, lit only by your flashlight. "; print "Your recently occupied bed sits with blankets thrown off into the middle of the walkway. Normally the day watch would be sleeping now, but not a soul is in sight."; ], s_to RM_Deck2; Object RM_LivingQuarters_door "door" RM_LivingQuarters has scenery door openable with name "door" "doorway" "hallway" "hall" "deck" "2", description "The door leads to the deck 2 hallway.", door_dir s_to, door_to RM_Deck2; Object RM_LivingQuarters_blanket "blanket" RM_LivingQuarters has scenery with name "blanket" "covers" "cover" "blankets" "sheet" "sheets", description "A warm wool blanket for my bed."; Object RM_LivingQuarters_bed "bed" RM_LivingQuarters has static enterable concealed with name "bed" "my" "sheet" "sheets" "cover" "covers", description "My bed. Looks comfortable, its making me tired just by looking at it.", before [; Take: "As much as I like my bed, that could be hard to do since it's bolted down."; Push,Pull: "It's bolted down."; Enter: "Ahhhhh.... So sleepy... BUT NO! I can't sleep now!"; ]; Object RM_LivingQuarters_trunk "trunk" RM_LivingQuarters has static container openable lockable locked !--starts locked and contains batteries with name "trunk" "box" "storage" "chest", description [; print "A trunk containing my personal belongings. "; if (ITEM_TrunkKey notin player) !-- if the player doesnt have the key "Hmm... I must have put my key down somewhere while I was working."; ], with_key ITEM_TrunkKey; !--unlocks with item trunk key ! ---------- Deck 2 - Hallway ------------ Object RM_Deck2 "Deck 2" has light with name "hall" "hallway" "quarters hall" "deck 2", description "You are in the hall on deck 2. Several dead crewmates lay along the corridor. There are 2 doors here, one leading to the living quarters, another to the mess hall. Stairs lead up and down.", initial [; !--- show storyline once if (self hasnt visited) { print "----------------------------------^As you unseal the door from the living quarters, you are taken aback by the sudden stench of death...^^You see the body of one of your crewmates laying against the wall. Before you even reach him, you can tell he's been dead for several hours. As you check to see what could have killed him, you notice yet another body in the corner.^^ Could everyone be dead? you think. ^^ You find no gunshot wounds, no signs of trauma. It couldnt be last night's chef special, could it? No... You ate it too. As your eyes, nose, and throat start to burn, you slowly realize the magnitude of the situation.^^ The chemical weapons container must have leaked. You knew taking that extra cargo was a bad idea! But the captain wouldnt listen to you! A vapour chemical that kills in hours... The living quarters was sealed, that must have protected you from breathing in too much. You drop to your hands and knees as you realize you are next to this horrible fate. But wait, the military contact said there was a vial of medication with the cargo. If you can find it, you'll survive!^^ Then another realization hits you. The engines arent running! We're near land and drifting! What happens when the ship beaches and brings this to the land? You've got to stop that from happening. You stand, ready to keep this disaster from becoming far worse.^ ------Type in ~n~ or ~y~ and press enter to continue------^"; YesOrNo(); !--wait for player to type y or n } ], before [; Go: !--- dont let player go downstairs without a light if (noun == d_to && (ITEM_FLASHLIGHT notin player || ITEM_BATTERIES notin ITEM_FLASHLIGHT)) { print "It's too dark down there. I'll trip and break my neck or something."; rtrue; } !---dont let the player go back to living quarters if the light is out if (noun == n_to && (ITEM_FLASHLIGHT notin player || ITEM_BATTERIES notin ITEM_FLASHLIGHT) && (ITEM_Light notin RM_LivingQuarters || ITEM_Light hasnt light)) { print "It's too dark in there. I'll trip and break my neck or something."; rtrue; } ], n_to RM_LivingQuarters, s_to RM_MessHall, u_to RM_Deck1, d_to RM_Deck3; Object RM_Deck2_body "2 dead bodies" RM_Deck2 has scenery with name "body" "bodies" "dead" "2" "crew" "mates" "crewmates", description "The bodies sit motionless. You can only hope it was a painless death.", before [; Take: "I cant help them."; ]; Object RM_Deck2_door_RM_LivingQuarters "Door to living quarters" RM_Deck2 has scenery door openable with name "door" "doorway" "living" "quarters", description "The door leads to the living quarters", before [; Go: !---dont let the player go back to living quarters if the light is out if ((ITEM_FLASHLIGHT notin player || ITEM_BATTERIES notin ITEM_FLASHLIGHT) && (ITEM_Light notin RM_LivingQuarters || ITEM_Light hasnt light)) { print "It's too dark in there. I'll trip and break my neck or something."; rtrue; } ], door_dir n_to, door_to RM_LivingQuarters; Object RM_Deck2_door_RM_MessHall "Door to the mess hall" RM_Deck2 has scenery door openable with name "door" "doorway" "mess" "hall", description "The door leads to the mess hall", door_dir s_to, door_to RM_MessHall; Object RM_Deck2_stairs_RM_Deck3 "Stairway to Deck 3" RM_Deck2 has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck3" "to" "deck" "3" "down" "three", description "The stairs lead down to deck 3. Seems the lights are out down there, it's pitch black and you cant see a thing.", before [; Go: !--- dont let player go downstairs without a light if (ITEM_FLASHLIGHT notin player || ITEM_BATTERIES notin ITEM_FLASHLIGHT) { print "It's too dark down there. I'll trip and break my neck or something."; rtrue; } ], door_dir d_to, door_to RM_Deck3; Object RM_Deck2_stairs_RM_Deck1 "Stairway to Deck 1" RM_Deck2 has scenery door with name "stair" "stairs" "stairway" "upstairs" "deck1" "to" "deck" "1" "up" "one", description "The stairs lead up to deck 1.", door_dir u_to, door_to RM_Deck1; ! ---------- Deck 2 - Mess hall ------------ Object RM_MessHall "Mess hall" has light with name "mess" "hall" "kitchen" "cafeteria", description "Only the sound of boiling water greets you in the crew's mess hall. There is pot of water left boiling on the stove. Several more of the crew are here, appearently the dayshift was eating their night meal when the vapour took full effect.", n_to RM_Deck2; Object RM_MessHall_body "dead bodies" RM_MessHall has scenery with name "body" "bodies" "dead" "crew" "mates" "crewmates", description "The bodies sit motionless. You can only hope it was a painless death.", before [; Take: "I cant help them."; ]; Object RM_MessHall_Pot "Pot of boiling water" RM_MessHall has scenery with name "pot" "water" "boiling" "pan", description "A massive pot filled with boiling water.", before [; !-- you cant take the big pot have to get the coffee mug Take: "This pot is far too large to carry (and far too hot)"; ]; Object RM_MessHall_stove "Stove" RM_MessHall has scenery with name "stove" "oven" "burner", description "The stove the cook uses to cook our meals. There's a pot of boiling water on the burner."; Object RM_MessHall_door_RM_Deck2 "Door to hallway" RM_MessHall has scenery door openable with name "door" "doorway" "hallway" "deck2" "2" "deck" "hall" "hallway", description "The door leads back to the hallway.", door_dir n_to, door_to RM_Deck2; ! ---------- Deck 3 - Hallway ------------ Object RM_Deck3 "Deck 3" with name "deck3" "deck 3" "hallway", description "You are in the hall on deck 3. For some reason all the lights are blown out. Glass crunches under your feet as you walk.^ There is a door leading to the engine room. Stairs lead up to deck 2.", u_to RM_Deck2, s_to RM_EngineRoom; Object RM_Deck3_stairs_RM_Deck2 "Stairway to Deck 2" RM_Deck3 has scenery door with name "stair" "stairs" "stairway" "upstairs" "deck2" "to" "deck" "2" "two" "up", description "The stairs lead up to deck 2. While it is so dimly lit upstairs, as you look up the light blinds you. It's so dark down here...", door_dir u_to, door_to RM_Deck2; Object RM_Deck3_door_RM_ER "Door to engine room" RM_Deck3 has scenery door with name "door" "doorway" "south" "engine" "room" "engineroom", description "The door leads to the engine room.", door_dir s_to, door_to RM_EngineRoom; ! ---------- Deck 3 - Engine room ------------ Object RM_EngineRoom "Engine room" with name "deck3" "deck 3" "hallway", description "The room is dark, lit only by your flashlight. The large diesel engine lies in ruin. A body lays charred against a circuit breaker. Lucky that the engine didnt explode, even a small explosion would have blown a hole here!^ The single door leads to deck 3.", initial [; !--story sequence is shown once and only if there is light in the room if (self hasnt visited && ITEM_Flashlight in player && ITEM_Flashlight has light) { print "You enter the dark engine room carefully. It seems that the lights are out all through this section of the ship. As you pass the flashlight over the room, you see a charred body laying in a circuit breaker. The poor soul must have collapsed into it, causing the power circuit to overload. The acrid smell of smoke fills your lungs as you examine the engine. The starter has been ruined by the overvoltage.^ There is no way to start the engines back up."; } ], n_to RM_Deck3; Object RM_EngineRoom_door_RM_D3 "Door to deck 3 hallway" RM_EngineRoom has scenery door with name "door" "doorway" "south" "deck" "3" "three" "out" "hall", description "The door leads to the hall on deck 3.", door_dir n_to, door_to RM_Deck3; ! ---------- Deck 1 - Hallway ----------- Object RM_Deck1 "Deck 1" has light with name "deck1" "deck 1" "hallway", description "You are in an enclosed hall on deck 1. Windows look out onto the deck of the ship. You can see faint city lights in the distance.^ There is a door leading outside. Stairs lead down to deck 2 and up to the pilothouse.", u_to RM_Pilothouse, d_to RM_Deck2, s_to RM_AftDeck; Object RM_Deck1_stairs_RM_Deck2 "Stairway to Deck 2" RM_Deck1 has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck2" "to" "two" "deck" "2" "down", description "The stairs lead down to deck 2.", door_dir d_to, door_to RM_Deck2; Object RM_Deck1_stairs_RM_Pilothouse "Stairway to pilothouse" RM_Deck1 has scenery door with name "stair" "stairs" "stairway" "upstairs" "pilothouse" "up", description "The stairs lead up to the pilothouse.", door_dir u_to, door_to RM_Pilothouse; Object RM_Deck1_door_RM_AftDeck "Door to aft deck" RM_Deck1 has scenery door with name "door" "to" "aft" "deck" "out" "outside", description "The door leads out onto the aft deck", door_dir s_to, door_to RM_AftDeck; ! ---------- Pilothouse ----------- Object RM_Pilothouse "Pilothouse" has light with name "pilothouse" "pilot" "house", description [; print "You are in the ship's pilothouse. The captain lies dead near the wheel. "; if (ITEM_CoffeeMug in self) !--- if the coffee mug is still here, talk about it print "His coffee mug has spilled its contents all over the floor. "; print "There are several control screens here - navigation, engines, and cargo status. The radio unfortunately has been broken since yesterday.^Stairs lead down to deck 1."; ], d_to RM_Deck1; Object RM_Pilothouse_radio "Radio" RM_Pilothouse has scenery with name "radio", description "The radio is broken. No use trying to call anyone."; Object RM_Pilothouse_panel_nav "Navigation panel" RM_Pilothouse has scenery with name "navigation" "panel" "screen" "nav" "control", description "The GPS shows that the ship is only a mile or so off the coast. With engines off, the ship will drift to shore within a few hours."; Object RM_Pilothouse_panel_eng "Engine panel" RM_Pilothouse has scenery with name "engine" "engines" "panel" "screen" "control", description "The engine is off, though you cant turn it back on. You dont hear any sound from the engines when you try, maybe the starter isnt working?"; Object RM_Pilothouse_panel_cgo "Cargo panel" RM_Pilothouse has scenery with name "cargo" "container" "info" "status" "panel" "screen" "control", description "You scroll through the cargo manifest to find the weapons container. It isnt listed as a weapon of course... you find the ~baby food~ container is inside the ship on the second cargo deck.^ You also notice that there are some small boxes containing C4 explosive and detonators on Cargo deck 1."; !-- this is where the player learns the location of 2 objectives Object RM_Pilothouse_panel_wheel "Wheel" RM_Pilothouse has scenery with name "rudder" "wheel" "ship", description "The ship's wheel. Turns the rudder. The autopilot is turning hard to the right, but we're just drifting right now anyway."; Object RM_Pilothouse_captain "Captain" RM_pilothouse has scenery with name "captain" "body" "dead" "crew", description "He is beyond help.", before [; !--get rid of the stupid 'fixed in place message' Take: "I cant help him."; ]; Object RM_Pilothouse_stairs_RM_Deck2 "Stairway to Deck 1" RM_Pilothouse has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck1" "to" "one" "deck" "1" "down", description "The stairs lead down to deck 1.", door_dir u_to, door_to RM_Pilothouse; ! -------- Aft Deck ---- Object RM_AftDeck "Aft Deck" has light with name "deck" "aft", description "You are on the aft deck. A door leads into the enclosed deck below the pilothouse. There are too many containers to see the bow from here, but there are walkways around them. There is a life raft here.", n_to RM_Deck1, e_to RM_CenterDeck; Object RM_AftDeck_liferaft "Life raft" RM_AftDeck !--this object ends the game, its the exit has scenery enterable with name "life" "raft" "boat" "liferaft" "in", description "A liferaft. I could use this to escape the boat.", before [; Go,Enter: print "Are you sure you want to leave the ship? (y or n)^"; if(YesOrNo()) !--make sure the player actually wants to leave { score=score+1; !--1 point for exiting ship print "Goals Summary:"; if (got_medication==1) !-- if got antidote { print "You leave the ship with medication. You survive this ordeal... "; deadflag=2; } else !-- no antidote { print "You leave the ship, but since you didn't get medication you die within an hour. "; deadflag=1; } !-- if player placed the explosives properly if (ITEM_C4wTimer in RM_EngineRoom && ITEM_C4wTimer has on) { score=score+1; !-- 1 point for sinking ship print "You sank the ship! The chemical will not reach shore. You have saved hundreds if not thousands of lives."; deadflag=2; } } rtrue; ]; Object RM_AftDeck_door_RM_CenterDeck "Walkway towards bow" RM_AftDeck has scenery door with name "to" "bow" "deck" "center" "walkway" "walkways" "container" "containers", description "The walkway leads towards the bow of the ship", door_dir e_to, door_to RM_CenterDeck; Object RM_AftDeck_door_RM_Deck1 "Door to deck 1 hallway" RM_AftDeck has scenery door with name "door" "to" "deck" "1" "deck1" "hallway" "hall" "pilothouse", description "The door leads into the hallway under the pilothouse.", door_dir n_to, door_to RM_Deck1; ! -------- Center Deck ---- Object RM_CenterDeck "Center Deck" has light with name "deck" "center" "containers", description "As you near the center of the ship, you marvel at the towers and canyons formed by the many cargo containers. Really makes you feel insignificant. Never could get used to that. There are openings leading down into the interior of the ship for the cranes to move cargo around.^ Stairways lead up into Crane 1 and Crane 2. There are walkways to the bow and aft of the ship.", u_to RM_Crane1, n_to RM_Crane2, !--there arent 2 ups w_to RM_AftDeck, e_to RM_BowDeck; Object RM_CenterDeck_door_RM_AftDeck "Walkway towards aft" RM_CenterDeck has scenery door with name "to" "aft" "deck" "walkway" "walkways", description "The walkway leads towards the aft of the ship.", door_dir w_to, door_to RM_AftDeck; Object RM_CenterDeck_door_RM_BowDeck "Walkway towards bow" RM_CenterDeck has scenery door with name "to" "bow" "deck" "walkway" "walkways", description "The walkway leads towards the bow of the ship.", door_dir e_to, door_to RM_BowDeck; Object RM_CenterDeck_stairs_RM_Crane1 "Stairway to Crane 1" RM_CenterDeck has scenery door with name "stair" "stairs" "stairway" "upstairs" "crane1" "to" "one" "crane" "1" "up", description "The stairs lead up to Crane 1.", door_dir u_to, door_to RM_Crane1; Object RM_CenterDeck_stairs_RM_Crane2 "Stairway to Crane 2" RM_CenterDeck has scenery door with name "stair" "stairs" "stairway" "upstairs" "crane2" "to" "two" "crane" "2" "up", description "The stairs lead up to Crane 2.", door_dir n_to, door_to RM_Crane2; ! -------- Bow Deck ---- Object RM_BowDeck "Bow Deck" has light with name "deck" "bow", description "You are on the bow deck. A door leads into a small structure - the stairwell to the cargo holds. Walkways lead towards the aft of the ship.", before [; Go: if(noun==d_to && handle_frozen == 1) !--if you try to go in and the handle is still frozen { print "The handle is covered with ice and frozen tight. So cold out here. I'll have to melt it or something."; rtrue; } ], d_to RM_CargoDeck1, s_to RM_CenterDeck; Object RM_BowDeck_door_RM_Centerdeck "Walkway to towards aft" RM_BowDeck has scenery door with name "aft" "walkway" "walkways" "center" "centerdeck" "deck" "towards", description "The walkways leads towards the aft.", door_dir s_to, door_to RM_CenterDeck; Object RM_BowDeck_stairs_RM_CargoDeck1 "Door down to cargo deck 1" RM_BowDeck has scenery door with name "stair" "stairs" "stairway" "downstairs" "cargo" "deck" "to" "two" "door" "handle" "doorway" "2" "down" "ice" "icy" "frozen", description "The door leads down to cargo deck 1.", before [; Go: if(handle_frozen == 1) !-- if you try to go down before the handle is unfrozen { print "The handle is covered with ice and frozen tight. So cold out here. I'll have to melt it or something."; rtrue; } ], door_dir d_to, door_to RM_CargoDeck1; ! -------- Crane 1 ---- Object RM_Crane1 "Crane 1" has light with name "crane" "crane1" "one" "1", description "You sit down in the crane cab. You feel a little vertigo as you look down at the deck 200 feet below. The only control you know how to use is the big red emergency stop button. Wouldn't want to mess anything else up.^ The only way out is back down the stairs.", d_to RM_CenterDeck; Object RM_Crane1_button "Emergency stop button" RM_Crane1 has scenery, with name "button" "emergency" "stop" "red" "big", description "A big red button on the control panel. It cuts power so that you can quickly stop the crane.", before [; Push,SwitchOn,SwitchOff: !--press the emergency stop button - turn off crane magnet on cargo deck 1 if (magnet_on == 1) { print "You press the emergency stop button. You hear the crane's brakes lock and the hum of the electromagnet subside."; magnet_on = 0; !--turn off crane magnet } else !--cant start the crane again print "The crane is already stopped. I can't start it back up without a special key - no telling where that is."; rtrue; ]; Object RM_Crane1_stairs_RM_CenterDeck "Stairway to center deck" RM_CenterDeck has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck" "center" "centerdeck" "down", description "The stairs lead back down to the main deck.", door_dir d_to, door_to RM_CenterDeck; ! -------- Crane 2 ---- Object RM_Crane2 "Crane 2" has light with name "crane" "crane2" "two" "2", description "As you climb into the crane cab, you are startled as you come face to face with another body. As you check the controls you find that the operator's soda has spilled all over them. None of the buttons seem to do anything and the panel is dark.^The only way out is back down the stairs.", d_to RM_CenterDeck; Object RM_Crane2_stairs_RM_CenterDeck "Stairway to center deck" RM_Crane2 has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck" "center" "centerdeck" "down", description "The stairs lead back down to the main deck.", door_dir d_to, door_to RM_CenterDeck; ! -------- Cargo Deck 1 ---- Object RM_CargoDeck1 "Cargo Deck 1" has light with name "cargo deck 1" "cargo" "deck" "one" "1", description [; print "The large internal cargo bay is full of various containers. The magnet of crane 1 hangs a few feet above the floor. "; if (magnet_on==1) !-- if the magnet is still on talk about it print "You can hear the hum from the electromagnet in the moist air. Seems that it was left on. "; ], u_to RM_BowDeck, d_to RM_CargoDeck2; Object RM_CargoDeck1_magnet "Crane 1 electromagnet" RM_CargoDeck1 has scenery with name "crane" "1" "one" "electromagnet" "magnet" "electro", description [; if (magnet_on == 1) !-- if the magnet is still on then talk about the flashlight print "The magnet is on. Several small metal objects are stuck to it. There's your flashlight! It's been missing since yesterday..."; else print "The magnet is off."; ]; Object RM_CargoDeck1_boxes "boxes" RM_CargoDeck1 has scenery container openable !-- boxes are hidden from player, but can be found by reading with name "box" "boxes" "small", !-- the pilothouse cargo screen description "Small shipping boxes."; !-- C4 is in this Object RM_CargoDeck1_stairs_RM_BowDeck "Stairway to bow deck" RM_CargoDeck1 has scenery door with name "stair" "stairs" "stairway" "upstairs" "deck" "bow" "up", description "The stairs lead up to the bow deck.", door_dir u_to, door_to RM_BowDeck; Object RM_CargoDeck1_stairs_RM_CgoDeck2 "Stairway to cargo deck 2" RM_CargoDeck1 has scenery door with name "stair" "stairs" "stairway" "downstairs" "deck" "cargo" "2" "two" "down", description "The stairs lead down to cargo deck 2.", door_dir d_to, door_to RM_BowDeck; ! -------- Cargo Deck 2 ---- Object RM_CargoDeck2 "Cargo Deck 2" has light with name "cargo deck 2" "cargo" "deck" "two" "2", description "The lower cargo deck is a giant mess. A large number of containers have been knocked over. Some have fallen on lights and shattered them. It looks as if some cleanup was attempted before the chemical took effect.^ The chemical container is here, opened and heavily damaged. Crane 2's magnet sits buzzing right above the container door.", before [; !--- dont let the player enter the container without dropping metal stuff Go: if(noun==w_to && (ITEM_Flashlight in player || ITEM_Batteries in player || ITEM_TrunkKey in player || ITEM_light in player || ITEM_C4 in player || ITEM_AlarmClock in player || ITEM_C4wTimer in player)) { print "As you walk towards the container, you feel the magnet start to pull on the items in your pockets. I'll have to drop anything with metal in it before I walk under that."; rtrue; } !--- if the container is still dark, dont let player enter else if (noun==w_to && RM_ChemContainer hasnt light) { print "The container is too dark inside. The flourescent bulb in the socket near the container was shattered by a falling container. I need some light if I am to find the medication."; rtrue; } ], u_to RM_CargoDeck1, w_to RM_ChemContainer; Object RM_CargoDeck2_magnet "Crane 2 electromagnet" RM_CargoDeck2 has scenery with name "crane" "2" "two" "electromagnet" "magnet" "electro", description "The magnet is hanging directly over the chemical container doorway. The magnet is turned on."; Object RM_CargoDeck2_socket "flourescent light socket" RM_CargoDeck2 has scenery with name "socket" "broken" "shattered" "lights" "near", description [; print "A socket for a flourescent tube light bulb. "; if (RM_ChemContainer has light) !-- if you've put the light bulb in print "Your swapped light bulb gives off a dim glow, but It should be enough light up the inside of the container."; ]; Object RM_CargoDeck2_stairs_RM_CgoDeck1 "Stairway to cargo deck 1" RM_CargoDeck2 has scenery door with name "stair" "stairs" "stairway" "upstairs" "cargo" "deck" "1" "one" "up", description "The stairs lead back up to cargo deck 1.", door_dir u_to, door_to RM_CargoDeck1; Object RM_CargoDeck2_door_RM_Container "Chemical container door" RM_CargoDeck2 has scenery door with name "container" "chemical" "chem" "bio" "weapon" "door" "doorway" "in" "west", description "The container's door.", before [; !--- dont let the player enter the container without dropping metal stuff Go: if(ITEM_Flashlight in player || ITEM_Batteries in player || ITEM_TrunkKey in player || ITEM_light in player) { print "As you walk towards the container, you feel the magnet start to pull on the items in your pockets. I'll have to drop anything with metal in it before I walk under that."; rtrue; } !--- if the container is still dark, dont let player enter else if (RM_ChemContainer hasnt light) { print "The container is too dark inside. The flourescent bulb in the socket near the container was shattered by a falling container. I need some light if I am to find the medication."; rtrue; } ], door_dir w_to, door_to RM_ChemContainer; ! -------- Chemical container ---- Object RM_ChemContainer "Chemical container" with name "container" "chemical" "chem" "weapon" "bio" "damaged", description "The inside of the container is a disaster. The chemical tank has been thrown around and ruptured. Boxes of other supplies lay scattered haphazardly around. The small box of medication is taped to the tank.^ The container has one door leading back out.", initial [; !--only show story if havent taken medicine if (self hasnt visited) { print "You enter the chemical container. Now you see how the chemical was released. The tank containing the chemical has been thrown around and it has ruptured. Other boxes are scattered around the container. One tiny box is taped to the side of the chemical tank.^^ You open it to find the vials of medication. Quickly, you inject one of the vials and breathe a sigh of relief. Now you'll survive.^"; score = score + 1; !--found the goal so add to score got_medication=1; !--set flag print "-== You have completed a goal! ==-"; } ], e_to RM_CargoDeck2; Object RM_ChemContainer_boxes "boxes" RM_ChemContainer has scenery with name "boxes" "supplies" "supply", description "The large supply boxes have been thrown around the container."; Object RM_ChemContainer_medbox "Medication box" RM_ChemContainer has scenery with name "box" "medicine" "vaccine" "medication" "taped" "tape" "of", description "You've already injected yourself with the medication. Probably not a good idea to use more."; Object RM_ChemContainer_tank "Chemical tank" RM_ChemContainer has scenery with name "tank" "chemical" "container", description "The chemical tank takes up a large part of the container. It has been thrown around and ruptured."; Object RM_ChemContainer_door_RM_CD2 "Container door" RM_ChemContainer has scenery door with name "door" "cargo" "deck" "container" "2" "out", description "The door leads back out to cargo deck 2.", door_dir e_to, door_to RM_CargoDeck2; ! ---------- Items / Inventory stuff ------------ Object ITEM_Flashlight "Flashlight" RM_CargoDeck1 has supporter switchable ~on with name "flashlight" "flash" "lantern" "maglite", description [; print "Its a Maglite, awesome. Possibly the only thing that can both light up a room and prop up a car at the same time.^"; if (ITEM_Batteries notin self) !-- if there are no batteries in the flashlight print "Unfortunately, there are no batteries in it.^"; ], before [; !--- dont let it be taken when stuck to the crane magnet Take: if (magnet_on==1) { print "It's stuck to the magnet."; rtrue; } SwitchOn: ! ----- Make sure the light doesnt get turned on with no batteries if (ITEM_Batteries notin self) { print "There are no batteries the flashlight."; rtrue; } ], after [; ! ----- shouldnt get here unless there are batteries in it SwitchOn: give self light; "You turn on the flashlight."; SwitchOff: give self ~light; "You turn off the flashlight."; ]; Object ITEM_Batteries "Package of batteries" RM_LivingQuarters_Trunk with name "batteries" "battery" "cell" "D" "package", description "Some D cell batteries.", before [; PutOn,Insert: if (second == ITEM_Flashlight) !--- let the player put batteries in flashlight when carrying both { move self to ITEM_Flashlight; print "You put the batteries in the flashlight."; rtrue; } Take: if (ITEM_Flashlight has light) !--turn off flashlight if taking out batteries { move self to player; <>; } ]; Object ITEM_TrunkKey "Trunk key" RM_Crane2 with name "key" "trunk key", description "This is the key to my trunk."; Object ITEM_light "flourescent light" RM_LivingQuarters has light concealed with name "light" "flourescent", description "A flourescent tube light. It provides the only light in the room.", before [; Take: ! ---- Make sure the player has a powered flashlight before turning the room dark ---- if (ITEM_FLASHLIGHT in player && ITEM_BATTERIES in ITEM_FLASHLIGHT) { print "You turn on your flashlight and take the flourescent light."; give self ~light; ! --- You pulled it out so get rid of the light move self to player; if (ITEM_Flashlight hasnt on) <>; ! -- turn on the flashlight so player can see } else print "But how would I see with no light?"; rtrue; !--return for both if/else PutOn,Insert: !--put light bulb in cargo deck socket if(second == RM_CargoDeck2_socket && player in RM_CargoDeck2) { print "You put the light bulb in the socket and it blinks on."; give RM_ChemContainer light; !--provide light to the container move ITEM_light to The_Abyss_of_no_return; !-- throw the lightbulb away, quick and dirty rtrue; } ]; Object ITEM_CoffeeMug "Coffee Mug" RM_Pilothouse has concealed with name "coffee" "mug" "cup" "water", description "The captain's trusty coffee mug.", before [; Fill: !--get water from pot only if in mess hall if (player in RM_MessHall) { print "You fill the coffee mug with boiling water."; coffee_mug_filled = 1; rtrue; } PutOn,Insert,Transfer: if (second == RM_MessHall_Pot) !--- get water from pot { print "You fill the coffee mug with boiling water."; coffee_mug_filled = 1; rtrue; } else if (second == RM_BowDeck_stairs_RM_CargoDeck1 && coffee_mug_filled==1 && handle_frozen==1) { !-- melt ice on door handle on bow deck handle_frozen=0; coffee_mug_filled = 0; print "You pour the hot water on the door handle. The handle unsticks easily."; rtrue; } Take: give self ~concealed; !-- if player drops later, make it visible! ]; Object ITEM_C4 "C4 Explosives" RM_CargoDeck1_boxes !-- this can kill the player and end the game has switchable with name "explosive" "explosives" "C4" "bomb" "detonator", description "C4 explosive preassembled with detonator. A switch is hooked to the detonator. There is also a spot to attach a timer or remote detonator.", before [; Tie, PutOn, Insert: if(second == ITEM_AlarmClock) !-- combine the alarm clock and c4 to make a timed c4 { print "You take apart the alarm clock and attach the speaker wires to the detonator hookup. Luckily, you know a little about electronics and dont blow yourself up in the process. You stand back and admire your creation."; move ITEM_C4wTimer to player; !-- give player new item and throw away the old 2 move ITEM_C4 to The_Abyss_of_no_return; move ITEM_AlarmClock to The_Abyss_of_no_return; rtrue; } SwitchOn: !--detonate the bomb if(player in RM_EngineRoom) !-- do a win condition in engine room { print "You close your eyes and close your hand around the detonator. Thinking of the many lives ashore to be saved, you detonate the bomb. The ship sinks as the hole in the engine room floods water into the ship.^ One life for many..."; score=score+1; !-- 1 point for sinking the ship deadflag=2; rtrue; } else { !-- player kills self and loses print "You detonate the bomb... which has no effect other than killing you. Oh ya, you did put a new coat of paint up..."; deadflag=1; rtrue; } ]; Object ITEM_AlarmClock "Alarm clock" RM_LivingQuarters with name "alarm" "clock", description "A digital alarm clock powered by 4 AA batteries.", before[; Tie, PutOn, Insert: if(second == ITEM_C4) !--combine with c4 { print "You take apart the alarm clock and attach the speaker wires to the detonator hookup. Luckily, you know a little about electronics and dont blow yourself up in the process. You stand back and admire your creation."; move ITEM_C4wTimer to player; !-- give player new item and throw away old 2 move ITEM_C4 to The_Abyss_of_no_return; move ITEM_AlarmClock to The_Abyss_of_no_return; rtrue; } ]; Object ITEM_C4wTimer "C4 with Alarm clock timer" has switchable with name "explosive" "explosives" "C4" "bomb" "detonator" "alarm" "clock" "timer", description "C4 explosive preassembled with detonator. You've attached your alarm clock as a timer. The switch now sets the alarm.", before [; SwitchOn: !--set the bomb if(player in RM_EngineRoom) { !--turn on bomb and leave it here print "You put the bomb down."; move self to RM_EngineRoom; } else { !-- bomb wont do anything here print "I should probably put this somewhere where it would do more good."; rtrue; } ]; ! ---------- Special stuff ------------ !--somewhere to put stuff so it doesnt come back Object The_Abyss_of_no_return "eternal ether" with name "abyss"; ! ---------- Initialization ------------ [ Initialise; location = RM_LivingQuarters; !-- set starting location to living quarters !--- initial story sequence print "^^^^^You wake suddenly, feeling uneasy. As your senses return you realize that something is very wrong. Everything is quiet. Too quiet. Not even the familiar rumble of the ship's diesels. Only the rythmic beat of the ocean tides against the hull.^^ The darkness outside the porthole window indicates that you've missed the start of your shift. As you rush to ready yourself, you notice you're alone in the crew quarters. Where are the day watch personnel? What could have happened?^^^"; ];