! -------------------------------------------------------------------------------------- ! -------------------------------------Header----------------------------------------- ! -------------------------------------------------------------------------------------- ! Title: CASL Rush ! Writer: James Walker ! Class: Computer Game Design UofM Dearborn ! Professor: Dr. Bruce Maxim ! Date: 10/21/2006 ! Description: Text Based Inform Game of a student making his way to his final math exam and encountering problems along the way. ! -------------------------------------------------------------------------------------- ! -------------------------------------MAP(Paste into Notepad)---------------------- ! -------------------------------------------------------------------------------------- !..XXX.......XXX.......... !..X2X.......X8X.......... !..XXX.......XXX.......... !...|.........|........... !...|.........|........... !..XXX..XXX..XXX..XXX..XXX !..X1X--X4X^^X5X^^X10--X11 !..XXX..XXX..XXX..XXX..XXX !...|.........|........... !...|.........|........... !..XXX.......XXX..XXX..... !..X3X.......X6X--X9X..... !..XXX.......XXX..XXX..... !.............|........... !.............|........... !............XXX.......... !............X7X.......... !............XXX.......... !1. CASL Entry !2. Film Classroom !3. Janitor’s Closet !4. CASL Floor !5. Second Floor Area !6. Eastern Hallway !7. Professor’s Room !8. Girl’s Restroom !9. Mac Lab !10. Third Floor area !11. Math Class ! -------------------------------------------------------------------------------------- ! -------------------------------------Walkthrough----------------------------------- ! -------------------------------------------------------------------------------------- ! n (Go north to Film Room) ! take donut (Take the Donut there) ! s (Go South to the entry) ! s (Go South to the janitor closet) ! give donut (Give the donut to the janitor) ! look (Look Around) ! take pants (Take Pants and get the key) ! n (Go north to the entry) ! e (Go east to the CASL Floor) ! u (Go up the stairs to the second floor area) ! n (Go north into the girl's restroom) ! take flowers (Take the flowers) ! s (Go south to the second floor area) ! take hammer (Take the hammer) ! s (Go south to the eastern hallway) ! open (Attempt to open the scantron machine) ! attack (Attack the scantron machine and get the scantron) ! n (Go north to the second floor area) ! u (Attempt to go up the elevator) ! attack (Attack the elevator with the hammer) ! u (Attempt to go up the elevator) ! s (Go South to the eastern hallway) ! e (Go east into the mac lab) ! take cord (Take the power cord) ! w (Go west into the eastern hallway) ! n (Go north to the second floor area) ! d (Go down to the CASL Floor area) ! give flowers to girl (Give the girl the flowers from the restroom) ! tell girl (Talk to the girl and get her number) ! u (Go up the stairs) ! s (Go South to the eastern hallway) ! s (Go south to Kiyak's classroom) ! take cheat (Take the cheat sheet from Kiyak's classroom) ! n (Go North to the eastern hallway) ! n (Go north to the second floor area) ! u (Go up to the third floor area) ! e (Go east to the math class) ! ------------------------------------------------------------------------------------ ! ----------------------------------Pre---------------------------------------------- ! ------------------------------------------------------------------------------------ Constant Story "^^CASL Rush^"; Constant MAX_SCORE 45; Include "parser"; Include "verblib"; Include "grammar"; ! ------------------------------------------------------------------------------------- ! -------------------------------------Globals And Constants------------------------ ! ------------------------------------------------------------------------------------- Global g_TimeSinceIncrement = 0; Constant h_TimePerIncrement = 30; Constant s_SchoolTimer_Early = 0; Constant s_SchoolTimer_OnTime = 1; Constant s_SchoolTimer_Late = 2; Constant s_SchoolTimer_VeryLate = 3; Constant s_Elevator_Jammed = 0; Constant s_Elevator_Fallen = 1; Constant s_Girl_Sad = 0; Constant s_Girl_Happy = 1; Constant s_Janitor_InCloset = 0; !Janitor Is In His Closet Constant s_Janitor_InCASLFloor = 1; !Janitor is in the CASL Floor ! ------------------------------------------------------------------------------------- ! -------------------------------------Initialization---------------------------------- ! ------------------------------------------------------------------------------------- [ Initialise; location = r_1CASLEntry; print "Today is it, this cold December morning is your final examination in Calculus 3, the last math class you'll take for your degree. While it is your final math test, it is not one you are well prepared for. You are however fully equipped with the materials to take the test and have ample time to get to the test a few minutes early to begin the studying process."; StartDaemon(o_Janitor); StartDaemon(o_Girl); StartTimer(o_SchoolTimer, 0); ]; ! ------------------------------------------------------------------------------------- ! -------------------------------------Rooms----------------------------------------- ! ------------------------------------------------------------------------------------- ! =====================================================================================CASL Entry Object r_1CASLEntry "CASL Entry" has light with name "CASL Entry", initial [; if (r_1CASLEntry hasnt visited) { "^You enter the building and wipe your salty boots on a well worn rug. Disheveled students are moving quietly about, no doubt as tense as you are about their finals."; } ], description "You are in the entry of the CASL Building. You see a film classroom to the north, janitor's closet to the south and the CASL Floor area to the east.", n_to r_2FilmClassroom, s_to r_3JanitorsCloset, e_to r_4CASLFloor; ! =====================================================================================Film Classroom Object r_2FilmClassroom "Film Classroom" has light with name "Film Classroom", initial [; if (r_2FilmClassroom hasnt visited) { "You enter a film room. A recent class has gotten out and you spy a leftover donut on a desk near the back."; } ], description "The film classroom is as expansive as it is empty. Perhaps if you had more time you'd watch a sweet movie like Snakes on a Plane. The only exit is to the south, back to the CASL Entry.", s_to r_1CASLEntry; ! =====================================================================================Janitor's Closet Object r_3JanitorsCloset "Janitors Closet" has light with name "Janitors Closet", initial [; if (r_3JanitorsCloset hasnt visited) { "You've never approached the Janitor's Closet, but you walk towards it now."; } ], describe [; if(o_Janitor in r_4CASLFloor) ! Only allow entry if janitor is not present. "With the Janitor gone you sneak inside his hovel. You notice the usual mops and cleaning utensils here, but you also see that the Janitor has a small television playing a Family Guy DVD, it's currently the one where Brian finds himself. You also see discarded pants"; else "After you knock on the door the Janitor abruptly opens the door and you behold a grumpy and ugly man. He looks bothered that you are there are and is messily eating a pastry. He grunts, 'What do you want?!'"; ], n_to r_1CASLEntry; ! =====================================================================================CASL Floor Object r_4CASLFloor "CASL Floor" has light with name "CASL Floor", initial [; if (r_4CASLFloor hasnt visited) { "You hasten towards the massive CASL Floor area. Looking up you can clearly see your destination, the third floor of the CASL building. On the eastern side of this floor is your math class, where your test awaits you. ^^You trod towards the stairs but before you can scale them a fat chick trips in a yelp and tumbles down the stairs. Luckily her natural cushion prevented harm, but the spinning must have upset her stomach, and she begins to puke all over the area. You remember that you are wearing your boots, so you care not if you walk through. ^^As you step towards those dirty stairs, you begin to feel queezy from the stench. When you get close you begin to wretch and immediately recoil back. ^^A Janitor is needed for you to go upstairs. You look around for one but to no avail."; } ], description "You are in the CASL Area, upstairs is the second floor, and to the west is the entry way.", w_to r_1CASLEntry, u_to [; if(o_Janitor in r_4CASLFloor) ! Only allow entry to second floor if janitor is there. { print "With the Janitor cleaning up the stair case, it is not only free to walk on but carries a lemon fresh scent as well."; return r_5SecondFloorArea; } else "You muster the determination to again attempt to hike up the stairs, but before you can even climb the second stair you add your own bit of puke to the fat girl's mess. Out of the corner of your eye you see that pretty blonde give you a sick looking face."; ]; ! =====================================================================================Second Floor Area Object r_5SecondFloorArea "Second Floor Area" has light with name "Second Floor Area", initial [; if (r_5SecondFloorArea hasnt visited) { "You ignore the second floor area and continue onto the third floor. Before you can notice the cause of the fat girl's tumble you fall for it yourself and step onto an uneven stair. This uneven stairs gives way and causes the rest of the staircase to plummet to the ground. You deftly leap to the second floor area and avoid harm. Luckily the elevator is near."; } ], description "The Second Floor Area has restrooms for both genders to the north and has an eastern hallway oddly placed to the south. The elevators are also right by the restrooms.", d_to r_4CASLFloor, s_to r_6EasternHallway, n_to [; print "You think it best perhaps if you go to the restroom to freshen yourself up before the test, as the dominating Professor Kiyaks does not let the students leave in the middle of the test. Before you can enter the men's room the grungy janitor pushes you aside and advises you to stay away from the little boys room for about an hour. You think about it but decide you can handle anything after that fat chick's lunch, but as you go near the door to the men's room you realize with your nose the demons that the janitor is expelling from his ass. You notice no one is around however, so you attempt to enter the ladies' room instead."; if(o_JanitorKey in player) !Only allow entry if player has key. { print "You ignore the week old sign that bars your entranced and slide the janitor's key inside the lock and easily turn the door."; return r_8GirlsRestroom; } else "The doorknob fails to turn and you see a note dated last week that says the restroom is under quick maintenence. You'll have to find a key to enter this restroom if you wish to freshen up. "; ], u_to [; switch(o_Elevator.state) { s_Elevator_Jammed: ! Initially have the elevator jam. "Being glad that they have an elevator you push the button to call it. As it glides down to you it suddenly stops and after a few moments you hear a few cries for help. It appears the machine is stuck and some students are trapped inside. You notice a level to the side that appears to be the cause of the problem, but you are not strong enough to move it. Perhaps if you had something heavy to hit it with."; s_Elevator_Fallen: if(o_PowerCord in player) ! only allow player to go up if player has the cord and elevator was already attacked. { print "You make a lasso out of the power cord from the Mac Lab and using your experience watching John Wayne movies, you easily lasso a well placed hook in the shaft. Trusting this heavy duty cord you climb up to the third floor."; return r_10ThirdFloorArea; } else "The elevator is out of the way, but you cannot jump up the shaft. You'll need to find a rope or something to get up it."; } ]; ! =====================================================================================Eastern Hallway Object r_6EasternHallway "Eastern Hallway" has light with name "Eastern Hallway", initial [; if (r_6EasternHallway hasnt visited) { "As you stroll down the hallways you are bumped by a classmate who is running out of the Mac Lab. He sees your scantron and grabs it and runs towards Math Class. You recognize him as a CIS student named Carl Saenz. You are currently incapable of taking the test, and you remember what happened last time a student showed up to Kiyak's test without a scantron. She never came to school again. Luckily for you, there's a handy scantron machine in this room."; } ], description "The eastern hallways has the second floor area to the north, a mac lab to the east and Kiyak's office to the south.", n_to r_5SecondFloorArea, s_to [; if(o_Kiyak in r_7KiyaksOffice) !If Kiyak is in room don't let player enter. print "You try the door, but it is locked. As you peer inside you see Kiyak Grumpily working on his finishing touches to your math test. You are sure he keeps the answer key to his math tests inside."; else { print "Now that Kiyak is gone you freely enter the room."; return r_7KiyaksOffice; } ], e_to r_9MacLab; ! =====================================================================================Professor's Office Object r_7KiyaksOffice "Kiyaks Office" has light with name "Kiyaks Office", initial [; if (r_7KiyaksOffice hasnt visited) { "You enter Kiyak's Office and notice the clean and neat organization of it. Your eyes dart around looking for the only object of interest in here, the cheat sheet for the test."; } ], description "Kiyak's office contains one exit to the north.", n_to r_6EasternHallway; ! =====================================================================================Girl's Restrooms Object r_8GirlsRestroom "Girls Restroom" has light with name "Girls Restroom", initial [; if (r_8GirlsRestroom hasnt visited) { "You timidly enter the Girl's Restroom. Gone are the urinals and unkempt stalls, before you lies all the comforts of a luxury bathroom. You see a couch in the corner and beauty mirrors on the walls. You also see a pretty trio of daisies in on the countertop, something girls love."; } ], description "The well cleaned girl's restroom has one exit to the south.", s_to r_5SecondFloorArea; ! =====================================================================================Mac Lab Object r_9MacLab "Mac Lab" has light with name "Mac Lab", initial [; if (r_9MacLab hasnt visited) { "You enter the Mac Lab and hear the familiar buzzing of computers, albiet inferior ones."; } ], description "Long cords supply power to this abominations. Long, thick cords. The only exit is to the west.", w_to r_6EasternHallway; ! =====================================================================================Third Floor Area Object r_10ThirdFloorArea "Third Floor Area" has light with name "Third Floor Area", initial [; if (r_10ThirdFloorArea hasnt visited) { "You finally reach the third floor and triumphantly look to the east where your classroom is."; } ], description "This is your final floor, and there are only two choices, to go forward to the finality of your schooling in mathematics, or to go from whence you came. Looking down the elevator shaft you see that you are still able to climb down to the second or even first floor if you wish.", d_to r_5SecondFloorArea, e_to [; if(o_Scantron in player) !Only allow entry if player has scantron { switch(o_SchoolTimer.state) !Adjusts score and message based on how long it took the player { s_SchoolTimer_Early: print "You stride proudly into a sparsely populated classroom. Looking at the clock you notice you are early. This is excellent and it gives you precious minutes to study for your test. Perhaps it won't end up so bad after all..."; score = score + 20; s_SchoolTimer_OnTime: print "You rush inside just as the Master of Mathematics, Kiyak, comes in as well. You are right on time and that is good because you are sure you will need all the time you can have in finishing your exam."; score = score + 10; s_SchoolTimer_Late: print "Your heart sinks as you see the door is closed and the students are taking the exam. As you quietly open it and attempt to sneak inside you see Kiyak at his desk staring at you. He frowns as he hands you the test and you scurry to your desk."; score = score + 5; s_SchoolTimer_VeryLate: print "You know you're late. You know you won't do well on this test. You go in anyway. You ashamedly stumble inside and see Kiyak sneering at you. He looks all kinds of pissed off as he thrusts the test into your hands. You'll probably be able to only finish half of it before the time is over so you crack it open and rush through it as fast as possible."; } if(o_CheatSheet in player) !If player has cheatsheet, award bonus points. { print "You have one secret in hand, the cheat sheet. This won't give you an instant 100%, but it will guide you to the right direction. Fortunately you're in a seat near the middle back and you can use your acquired tool to the upmost."; score = score + 20; } deadflag = 2; return r_11MathClass; } else print "As you walk towards the door your remember the verbal abuse that girl who forgot her scantron suffered, and you step back in thought. You'll need a scantron before you can enter."; ]; ! ===================================================================================== Math Class Object r_11MathClass "Math Class" has light with name "Math Class", description "", w_to r_10ThirdFloorArea; ! ------------------------------------------------------------------------------------- ! -------------------------------------Objects--------------------------------------- ! ------------------------------------------------------------------------------------- ! =====================================================================================Donut Object o_Donut "Donut" r_2FilmClassroom with name "donut", initial "The donut rests on the table.", description "Examining the donut you see it is a Krispy Kreme chocolate donut with a chocolate glaze and colored sprinkles. You're not hungry but perhaps someone else is."; ! ===================================================================================== Flowers Object o_Flowers "Flowers" r_8GirlsRestroom with name "flowers" "daisy" "daisies", initial "Flowers rest in a vase in this room.", description "The trio of daisies are a days old but still hold their original brilliance. You're not big on flowers yourself but you know women can be."; ! ===================================================================================== Janitor Object o_Janitor "Janitor" r_3JanitorsCloset has animate with name "Janitor", state s_Janitor_InCloset, initial "The Janitor stands here, breathing heavily though he is doing no work.", description "Upon closer examination you see the janitor is as unfit to clean the college as he is dirty himself.", life [; Give: if(noun == o_Donut) ! If the player gives the janitor a donut, move both objects to r_4 { print "The Janitors face breaks into an uneven smile and you see his discolored teeth. The janitor reaches out and snatches the donut happily. 'Sure, I'll get back to work, maybe there's more of these somewhere.'"; move noun to r_4CASLFloor; move self to r_4CASLFloor; self.state = s_Janitor_InCASLFloor; } "."; Tell,Order,Ask,Answer: "The Janitor laughs at your plee and says that he is on break for the next forever. Maybe his disposition would get better if you had a donut."; ], daemon [; if( (player in r_3JanitorsCloset && self in r_3JanitorsCloset) || ! If the janitor and player are together (player in r_4CASLFloor && self in r_4CASLFloor )) { if (random(2) == 2) !50% chance to emote. { switch(self.state) !Change emote based upon where janitor is at. { s_Janitor_InCloset: "The janitor's belly grumbles and erupts in a burp."; s_Janitor_InCASLFLoor: "The janitor long, jagged nails scratch the surface of his gut as he stares at nothing."; } } } ]; ! ===================================================================================== Girl Object o_Girl "Girl" r_4CASLFloor has animate with name "Girl" "blonde" "blondie" "woman", state s_Girl_Sad, initial "A girl sits at a nearby table studying hard in a thick book.", description "You look at the girl and see a pretty but average blonde college girl. She looks distressed by the large book that she has her nose in.", life [; Give: if(noun == o_Flowers) !If the player gives flowers make girl happy. { print "The girl stops her studying and slowly moves her eyes to see the flowers you placed on the table for her. She exclaims that daisies are her favorite and smiles girlishly at you. You are sure that she would be more receptive to you telling her something."; move noun to r_4CASLFloor; self.state = s_Girl_Happy; } "."; Tell,Order,Ask,Answer: if(self.state == s_Girl_Happy) !Only let the girl give number if the player made her happy. { print "After using some smooth talk you read on the internet, you get her to write down her number on some paper and you stuff it into your pocket. Even if you do poorly on your test today, something good came out of your journey to CASL."; score = score + 15; } else print "The girl stops her studying and slowly moves her eyes to meet yours, then frowns and goes back to work. Perhaps if she was happier she wouldn't be such an ice cube."; "."; ], daemon [; if(player in r_4CASLFloor) !Only allow emote if girl is with player { if (random(2) == 2) !50% chance to emote { switch(self.state) !Change emote based on mood { s_Girl_Sad: "The blondie stops writing and slumps her shoulders in a heavy sigh."; s_Girl_Happy: "The blondie stops her writing and smiles at her flowers then turns back to her work feeling renewed."; } } } ]; ! ===================================================================================== Scantron Machine Object o_ScantronMachine "Scantron Machine" r_6EasternHallway with name "Scantron Machine", initial "A dated Scantron Machine rests against the wall, if you could open it you could get a scantron.", description "Looking closer you see the LED for, 'Broked' flashing red. No scantrons will be properly delivered from this machine, but the glass is not thick...", before [; Take: "You can not lift this!"; Open: "You insert 50 cents and it gobbles your money readily. No scantron comes out. You notice a blinking red light next to the text, 'Broked'. If you had something heavy you could break into it and retrieve your goal."; Attack: if(o_Hammer in player) ! If player has a hammer give the player scantron { move o_Scantron to player; "Looking from side to side you see no one. You are a desperate man and can not waste time being delayed by the inadequacies of your university. You deftly swing the hammer at the glass and easily shatter it. Grabbing a scantron you briskly walk away and whistle as if nothing happened."; } else "Looking from side to side you see no one. You are a desperate man and can not waste time being delayed by the inadequacies of your university. You punch the glass and recieve only pain in your hand. You'll need a tool to crack this machine."; ]; ! ===================================================================================== Scantron Object o_Scantron "Scantron" with name "scantron", initial "A scantron rests here.", description "You see the average scantrons and are upset at how stupid of a testing tool they are."; ! ===================================================================================== Cheat Sheet Object o_CheatSheet "Cheat Sheet" r_7KiyaksOffice with name "cheat" "sheet" "answer" "answers", initial "Cheat Sheet Here.", description "The cheat sheet is the key to the scantrons. It has all the answers clearly laid out. Oddly Kiyak requires the evidence that you commited the work, but at least this will help you get the right answers. You can bullbleep the rest."; ! ===================================================================================== Kiyak Object o_Kiyak "Kiyak" r_7KiyaksOffice with name "professor" "kiyak" "teacher", initial "Kiyak sits in his chair here, leaning forward with a tense look on his face.", description "As you look at Kiyak his eyes dart to yours and he mutters some swear words under his breath. You quickly turn away."; ! ===================================================================================== School timer Object o_SchoolTimer with state s_SchoolTimer_Early, time_left 0, time_out [; g_TimeSinceIncrement = g_TimeSinceIncrement + 1; ! Increment time Every turn if(g_TimeSinceIncrement > h_TimePerIncrement) ! If enough time has past since last warning message, give warning message { switch(self.state) { s_SchoolTimer_Early: self.state = s_SchoolTimer_OnTime; print "You glance at your watch and sweat forms in your palms. You realize that your test will start any minute and you need to be in the room immediately."; move o_Kiyak to r_11MathClass; s_SchoolTimer_OnTime: self.state = s_SchoolTimer_Late; print "Your heart sinks as you look at your watch again and know for sure the test has begun and precious test time is drifting away."; s_SchoolTimer_Late: self.state = s_SchoolTimer_VeryLate; print "You force yourself to look at your watch again and you can see how late you are. You should have been well into the test by now but today's events have upset that. Kiyak won't listen to your excuses."; } g_TimeSinceIncrement = 0; } StartTimer(o_SchoolTimer, 0); ]; ! ===================================================================================== Power Cord Object o_PowerCord "Power Cord" r_9MacLab with name "Power" "Power Cord" "Cord" "Wire", initial "A power cord is currently giving life to a mac.", description "This power cord is abnormally long and very strong."; ! ===================================================================================== Elevator Object o_Elevator "Elevator" r_5SecondFloorArea with name "Elevator", state s_Elevator_Jammed, initial "The elevator sits right by you.", description "An elevator is an elevator.", before [; Take: "Can't pick up an elevator"; Attack: if(o_Elevator.state == s_Elevator_Jammed) { if(o_Hammer in player) ! Only allow elevator to fall if player attacks with hammer { self.state = s_Elevator_Fallen; "You grit your teeth as you swing your hammer at the lever. You think you've done the trick for a second as the lever moves into place, but then you hear the screams inside the tin box as it plummets to the ground. It collides with earth and the cables follow it. No one saw you destroy either the elevator nor stairs, but you're still without a way to get to the third floor. Looking up you can see your destination but you'll need some way to climb up it."; } else "You try to kick and pull the lever into place but to no avail. You'll need something heavy to hit it with."; } else "There is nothing but a shaft for you to attack, you've already destroyed the elevator."; ]; ! ===================================================================================== Janitor Key Object o_JanitorKey "Janitor Key" with name "Janitor Key" "Key" "Keys" "Janitor Keys", initial "Janitor Key lies upon the ground.", description "The golden janitor key will surely open any door in the building."; ! ===================================================================================== Janitor Pants Object o_JanitorPants "Janitor Pants" r_3JanitorsCloset has concealed with name "Janitor Pants" "Pants", state s_Janitor_InCloset, initial "The janitor pants lie in a heap on the floor.", description "When you get closer you notice that the pants are dirty and smelly. No wonder he chose not to wear them.", before [; Take: if(o_Janitor in r_3JanitorsCloset) !Only allow player to take pants if janitor is away. { print "As you attempt to enter the room to take the pants, you are stopped by the imposing figure of the janitor."; return; } else { move o_JanitorKey to player; "As you pick up the pants, you hear a familiar jingle. The Janitor Key falls out of the pants and you quickly snatch it up."; } ]; ! ===================================================================================== Hammer Object o_Hammer "Hammer" r_5SecondFloorArea with name "Hammer", initial "A hammer lies abandoned on the floor.", description "The hammer is heavy, old and rusty. It's not pretty but if you need to beat something, this is what will be used.";