! "Rotten Robbie" text based adventure game using the Inform Engine ! CIS 587 - Project #2 ! Spring 2000 ! Terry Burrows and Atlal El-Assaad ! See the in-game "help" for a brief program description. Constant Story "Rotten Robbie"; Constant Headline "^An Interactive Adventure^by Terry Burrows and Atlal El-Assaad^"; Constant DEBUG; Constant MAX_CARRIED = 5; Constant MAX_SCORE = 110; ! Possible values for the players health Global health = 100; Include "parser"; Include "verblib"; Include "grammar"; [ Initialise; location = Mouse; move Palm_Pilot to player; print "There is a 12-year-old boy named Robbie that loves to play computer games. Recently he has discovered the joys of playing multiplayer games on the Internet. He started playing the game Diablo online and soon discovered that many players were using unfair cheat codes and programs (called hacks by the players). These hacks would allow a player to be possess any item possible (and some not possible) in the game and also become invincible. Robbie, not having any knowledge about how to download these hacks and install them properly, had a ~real~ programmer install them. Soon Robbie was hunting down and killing players online that were trying to have legitimate (no cheating) games. Of course the other players are very upset at Robbie for ruining their games. Robbie now thinks of himself as the worlds greatest ~hacker~.^ Robbie has spent the entire evening killing players online. Satisfied that he is doing some great hacking, he goes to sleep with a smile on his face. The next day while walking to school he comes across a group of kids blocking his path. The kids look angry. They say to Robbie: We know that your are the one who has been killing are players online and now we are going to make you pay. They proceed to beat the snot out of Robbie. As the kids continue beating on Robbie a glowing portal opens above the kids. The kids run in fright and the portal descends on Robbie, engulfing him. Robbie is transported to a strange place.^^^"; ]; !Location USB Bus Object USB_Bus "USB Bus" has light with name "USB Bus", description [; if (~~(USB_Bus has visited)) { "A person slowly materializes in front of him. Why, it's the founder of Microsoft himself, Bill Gates. Bill says to Robbie: ~So Robert, I hear you are big hacker! Well, we'll see how good you really are. In case you're wondering where you are, you're in my virtual computer world. Right now you are in the cable between the mouse and the computer. My virtual computer will treat like any other computer program so be careful not to get yourself erased! My computer seems to have been hacked just recently. I need you to fix all of the programs and components in my computer that are not working properly. If you completely fix my computer, come to me at the computers Central Processing Unit (CPU). I will proclaim you a true hacker and return you to the real world. Because I am so generous, I am giving you a ~Palm Pilot~ to help you on your quest. Like I said, be careful or else you can be erased before completing your task~. Bill disappears in a puff of smoke, leaving you alone in this strange place."; } else { "You are in the middle of a Silver tunnel. The tunnel continues both to the east and the west.^"; } ], w_to Mouse, e_to IO_Controller; ! The Mouse location is where the player starts the game. Object Mouse "Mouse" has light with name "Mouse", description "You are in a large silver colored tunnel. There are dozens of bright lights moving back and forth along the walls in a random pattern. The tunnel behind Robbie ends in a blank wall. The tunnel in front of Robbie goes off towards the east.", e_to USB_Bus ; !Palm pilot object which is in players inventory at the beginning !of the game. The player is not allowed to drop this item. Object Palm_Pilot "Palm Pilot" has container open with name "Palm" "Pilot" "Palm Pilot", description "A standard Palm Pilot. It is basically a mini-computer used to ~Save~ and ~Run~ computer programs. Valid commands for the Palm Pilot are ~Save~, ~Delete~, and ~Run~ computer programs."; !The IO_Controller location has five 5 tunnels leading out of it. It also !contains a Sign_Post1 and a Saloon1 object Object IO_Controller "IO Controller" has light with name "IO Controller" "IO" "Controller", Description [; "The IO Controller has 5 tunnels leading out of it. You see many programs going in and out of the tunnels. You see a sign post and a large microchip with a sign on it saying ~Atlal's Saloon~. There is a door leading to the ~Atlal's Saloon~."; ], w_to USB_Bus, sw_to Hard_Drive, e_to ISA_Bus, s_to Super_IO, n_to Hub_Interface; !The Sign_Post1 object is in the IO_controller location and !it indicates where tunnels leading out of the IO_Controller go. Object Sign_Post1 "Sign Post" IO_Controller has static concealed with name "Sign Post" "Sign" "Post", Description "North to Hub Interface^ East to ISA Bus^ South to Super IO^ South West to Hard Drive^ West to Mouse (USB Bus)"; !The Saloon1 object is treated like a location inside !the IO_Controller. Once the player "Enters" the saloon !the saloon object behaves like any other location object. Object Saloon1 "Atlal Saloon" IO_Controller has static concealed light enterable container open openable with name "Atlal Saloon" "Saloon" "Atlal", inside_description "The saloon is doing good business. There are programs playing drinking games and getting drunk. There are also programs watching MPEG movies of playboy bunnies and dancing to the sound of tunes coming from a Real Audio jukebox. There is a bartender behind the bar loading drinking programs for the patrons.", description "The ~Atlal Saloon~ must be a jumping joint because of all of the traffic going in and out", before[; Exit: give self open; !before exiting Saloon must open it ], after [; Enter: give self ~open; !close Saloon so outside is not visible <>; !look at Saloon interior ]; !The Bartender object is in the location saloon1. When the player !talks to the bartender he asks the player to play a game. Object Bartender "Bar Tender" saloon1 has static concealed animate with name "Bartender" "Joe", question 1, description [; if (Bartender has visited) { "You see Big Burly Bartender Joe"; } else { give Bartender visited; Game(); !Give player the chance to play the game when he 1st } ! looks at the bartender. ], life [; Talk: !each time the player talks to the bartender Game(); ! the bartender tries to get him to play the game Ask: switch(second) { 'weather': "The weathers fine"; } "~Find your own answer Junior!~"; Tell: "Ah..very interesting"; Attack, Kiss: give parent(self) open; !before exiting saloon must open it print "^You're ~69'd~ buddy!^"; <>; ThrowAt: move noun to parent(bartender); <>; Show, Give: "Hey..what I'm I supposed to do with this? Keep it!"; ]; !Multiple Choice Question Game !Returns TRUE is player is still alive or FALSE if not [Game; print "Step right up to bar lad! Do I have a game for you! If you answer my questions correctly I'll give you some additional Personal Program Memory. If you answer a question incorrectly, I'll take some of your Personal Program Memory. You can only attempt each question once. Do you want to play the game?^"; if (YesorNo()) { .Loop2; switch (self.question) { 1: self.question++; if(Question1()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop2; !ask next question return TRUE; } else return FALSE; 2: self.question++; if(Question2()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop2; !ask next question return TRUE; } else return FALSE; 3: self.question++; if(Question3()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop2; !ask next question return TRUE; } else return FALSE; default: print "Sorry lad..you have already tried all of my questions!^"; return TRUE; !player must still be alive } } else { print "That's too bad! If you want to play later just come back and ~talk~ with me. My name is ~Joe~.^"; return TRUE; !player must still be alive } ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question1; buffer->0 = 60; parse->0 = 1; print "When we discuss displays, what does RGB stand for?^ 1. Red, Green, Blue ^ 2. Really Great Bit ^ 3. Red, Gray, Black ^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "That right!^"; Give_Health(25); return TRUE; '2' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '3' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question2; buffer->0 = 60; parse->0 = 1; print "What original operating system is Linux derived from?^ 1. DOS ^ 2. Windows 95 ^ 3. Unix ^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '2' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '3' : print "That right!^"; Give_Health(25); return TRUE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question3; buffer->0 = 60; parse->0 = 1; print "What port is the mouse connected to on new computers?^ 1. COM 1 ^ 2. USB ^ 3. PS/2 mouse port^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '2' : print "That right!^"; Give_Health(25); return TRUE; '3' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !Location Hard_Drive. If the player issues the command "Run Defrag" !then the hard drive is defragmented and the players score goes up. Object Hard_Drive "Hard Drive" has light with name "Hard Drive" "Hard" "Drive", defragflag 0, Description [; if (~~(Hard_Drive has visited)) Add_score(5); if (self.defragflag == 0) "You see a giant hard drive. A disc is rotating at an incredible speed. You see the read/write head rapidly going back and forth from the center of the disc to the outside edge of the disc. The hard drive doesn't seem to be running to efficiently. The read/write head seems to be moving to much.^"; else "You see a giant hard drive. A disc is rotating at an incredible speed. You see the read/write head going to back and forth from the center of the disc to the outside edge of the disc. The hard drive seems to be operating pretty efficiently because the read/write head is not moving very much.^"; ], before [; Run: if (noun == Disk_Defrag) { self.defragflag = 1; Add_score(15); print "The Defragmenter Program seems to be rearranging data on the hard drive. You watch the Defragmenter Program run from about 1/2 hour. When it finishes you notice the read/write head on the disc drive seems to move far less than before and the programs seem to be executing faster from the hard drive.^"; } ], ne_to IO_Controller; !Location ISA_BUS. There are bugs guarding all tunnels leading !out of this location except to the west. If the player "Runs" !the "Norton" pbject here he can pass safely through those tunnels. Object ISA_Bus "ISA Bus" has light with name "ISA Bus" "ISA", bugflag 0, Description [; if (self.bugflag == 0) { print "You see six tunnels. The tunnels lead north, west, south-east, south-west, east, and north-east. All of the tunnels are blocked by group of Huge Bugs (VIRUSES)^"; } else { print "You see six tunnels. The tunnels lead north, west, south-east, south-west, east, and north-east."; } ], before [; Run: if (noun == Norton) { self.bugflag = 1; Add_score(15); print "You watch the Norton AntiVirus devour the Bug^"; } Go: if ((self.bugflag == 0) && (noun ~= w_obj)) { print "The Bugs grab you and tear off a big piece of your Personal Program Memory!^"; Take_Health(25); rtrue; !do not move below } ], n_to BIOS1, w_to IO_Controller, se_to Empty_ISA1, sw_to Empty_ISA2, e_to Modem, ne_to Empty_ISA3; !Location Modem Object Modem "Modem" has light with name "Modem", Description [; if (~~(Modem has visited)) Add_score(5); "You see an old generic 28.8k modem plugged into an ISA Bus connector. Bill has a crappy modem for being such a rich man.^"; ], w_to ISA_Bus; !Location BIOS1 Object BIOS1 "BIOS" has light with name "BIOS", Description [; if (~~(BIOS1 has visited)) Add_score(5); "The BIOS is just a plain EEPROM. Not very exciting.^"; ], s_to ISA_Bus; !Location Empty_ISA1 Object Empty_ISA1 "Empty ISA Slot" has light with name "Empty" "ISA" "Slot", Description [; print "Bill Gates once again appears out of nowhere. Bill says to ~Robbie I've had such a bad day. The government keeps trying to break up my hard earned monopoly (Microsoft). I think I'll let you suffer with me!!!~ You see 25% of your Personal Program Memory disappear.^^"; if (Take_Health(25)) !punish the player PlayerTo(Mouse); !if player is still alive move him ], ! to the Mouse nw_to ISA_Bus; !Location Empty_ISA2 Object Empty_ISA2 "Empty ISA Slot" has light with name "Empty" "ISA" "Slot", Description "You see an empty ISA Bus style connector.^", ne_to ISA_Bus; !Location Empty_ISA3 Object Empty_ISA3 "Empty ISA Slot" has light with name "Empty" "ISA" "Slot", Description "You see an empty ISA Bus style connector.^", sw_to ISA_Bus; !Location Empty_PCI1 Object Empty_PCI1 "Empty PCI Slot" has light with name "Empty" "PCI" "Slot", Description "You see an empty PCI Bus style connector.^", nw_to PCI_Bus; !Location Empty_PCI2 Object Empty_PCI2 "Empty PCI Slot" has light with name "Empty" "PCI" "Slot", Description "You see an empty PCI Bus style connector.^", ne_to PCI_Bus; !Location PCI_BUS Object PCI_Bus "PCI Bus" has light with name "PCI Bus" "PCI", Description "You see 5 tunnels. The tunnels go to the north-east, west, south-east, south-west, and the east.^", w_to Hub_Interface, e_to CD_ROM, ne_to Sound_Card, se_to Empty_PCI1, sw_to Empty_PCI2; !Location CD_ROM Object CD_ROM "CD ROM" has light with name "CD" "ROM", Description [; if (~~(CD_ROM has visited)) Add_score(5); "There is a SCSI card plugged into this PCI Bus connector. It leads to a 40X CD ROM.^"; ], w_to PCI_Bus; !Location Sound_Card Object Sound_Card "Sound_Card" has light with name "Sound" "Card", Description [; if (~~(Sound_Card has visited)) Add_score(5); "There is a Sound Blaster ~Live~ sound card in this PCI connector.^"; ], sw_to PCI_Bus; !Location Hub_Interface. There is a bug guarding the north tunnel. !If the player "Runs" the "Norton" object then the player can !safely move to the north tunnel. Object Hub_Interface "Hub Interface" has light with name "Hub Interface" "Hub" "Interface", bugflag 0, Description [; if (self.bugflag == 0) { print "You see three tunnels. The tunnels lead to the north, south, and east. The tunnel to the north is blocked by a huge Bug (VIRUS).^"; } else { print "You see three tunnels. The tunnels lead to the north, south, and east.^"; } ], before [; Run: if (noun == Norton) { self.bugflag = 1; Add_score(15); print "You watch the Norton AntiVirus devour the Bug^"; } Go: if ((self.bugflag == 0) && (noun == n_obj)) { print "The Bug grabs you and tears off a big piece of your Personal Program Memory!^"; Take_Health(25); rtrue; !do not continue move north below } ], n_to Memory_Controller, s_to IO_Controller, e_to PCI_Bus; !Location KeyBoard1 Object Keyboard1 "Keyboard" has light with name "Key" "Board", Description [; if (~~(Keyboard1 has visited)) Add_score(5); "You see a generic Windows compatible keyboard.^"; ], sw_to Super_IO; !Location Super_IO Object Super_IO "Super IO" has light with name "Super IO" "Super" "IO", Description "You see tunnels leading to the north, south-east, south, west, and to the north-east.^", n_to IO_Controller, se_to Floppy_Drive, s_to Parallel_Port, w_to Serial_Port, ne_to Keyboard1; !Location Floppy_Drive Object Floppy_Drive "Floppy Drive" has light with name "Floppy" "Drive", Description [; if (~~(Floppy_Drive has visited)) Add_score(5); "This is a standard 3 1/4 floppy drive.^"; ], nw_to Super_IO; !The Norton object is initially in the Floppy_Drive location. !If the user has this object and issues the command "Run Norton", !it will kill "Bugs" at certain location so the user can continue. Object Norton "Norton Antivirus Program" Floppy_Drive with name "Norton" "Antivirus" "Norton Antivirus", Description "The famous ~Norton~ antivirus program.^"; !Location Serial_Port Object Serial_Port "Serial Port" has light with name "Serial" "Port", Description [; if (~~(Serial_Port has visited)) Add_score(5); "You see a standard 9 pin ~D~ connector mounted on the case of the PC.^ "; ], e_to Super_IO; !Location Parallel_Port Object Parallel_Port "Parallel Ports" has light with name "Parallel" "Port", Description "You see two flat ribbon cables, one leading to the east and one leading to the west. The cables attach to standard 25 pin ~D~ connectors mounted on the case of the PC. Who knows what is attached to the connectors on on the outside of the PC!?^ ", n_to Super_IO, e_to Zip_Drive, w_to Printer; !Location Zip_Drive has a Disk_Defrag object. The Disk_Defrag program !is used to defrag the hard drive. Object Zip_Drive "Zip Drive" has light with name "Zip" "Drive", Description [; if (~~(Zip_Drive has visited)) Add_score(5); "You see a standard 100MB Iomega zip drive cartridge.^"; ], w_to Parallel_Port; !The Disk_Defrag object is initially in the Zip_Drive location. !If the user has this object and issues the command "Run Defrag" !at the Hard_Drive location it will defragment the hard drive. Object Disk_Defrag "Disk Defragmenter Program" Zip_Drive with name "Disk Defragmenter" "Defrag", Description "Disk Defragmenter Program.^"; !Location Printer Object Printer "Printer" has light with name "Printer", Description [; if (~~(Printer has visited)) Add_score(5); "You see a Hewlet Packard Deskjet 672C inkjet printer.^"; ], e_to Parallel_Port; !The Memory_Controller location has five 4 tunnels leading out of it. It !also contains a Sign_Post2 and a Saloon2 object. Object Memory_Controller "Memory Controller" has light with name "Memory Controller" "Memory" "Controller", Description "The Memory Controller has 4 tunnels leading out of it. You see many programs going in and out of the tunnels. You see a sign post and a large microchip with a sign on it saying ~Terry's Saloon~. There is a door leading to the ~Terry's Saloon~.", e_to Main_Memory, w_to Graphics_Device, s_to Hub_Interface, n_to Processor; !The Sign_Post2 object is in the Memory_Controller location and !it indicates where tunnels leading out of the Memory_Controller go. Object Sign_Post2 "Sign Post" Memory_Controller has static concealed with name "Sign Post" "Sign" "Post", Description "North to Processor (CPU)^ East to Main Memory^ South to Hub Interface^ West to Graphics Card (AGP Bus)"; !The Saloon2 object is treated like a location inside !the Memory_Controller. Once the player "Enters" the saloon, !the saloon object behaves like any other location object. Object Saloon2 "Terry's Saloon" Memory_Controller has static concealed light enterable container open openable with name "Terry Saloon" "Saloon" "Terry", inside_description "The saloon is doing good business. There are programs playing drinking games and getting drunk. There are also programs watching MPEG movies of playboy bunnies and dancing to the sound of tunes coming from a Real Audio jukebox. There is a bartender behind the bar loading drinking programs for the patrons.", description "~Terry's Saloon~ must be a jumping joint because of all of the traffic going in and out", before[; Exit: give self open; !before exiting Saloon must open it ], after [; Enter: give self ~open; !close Saloon so outside is not visible <>; !look at Saloon interior ]; !The Bartender2 object is in the location saloon2. When the player !talks to the bartender he asks the player to play a game. Object Bartender2 "Bar Tender" saloon2 has static concealed animate with name "Bartender" "Charles", question 1, description [; if (Bartender2 has visited) { "You see meek looking Bartender Charles"; } else { give Bartender2 visited; Game2(); } ], life [; Talk: Game2(); Ask: switch(second) { 'weather': "How should I know?"; } "How should I know?^"; Tell: "So what^."; Attack, Kiss: give parent(self) open; !before exiting saloon must open it print "^My bouncer is going to ~bounce~ you!^"; <>; ThrowAt: move noun to parent(bartender2); <>; Show, Give: "I don't want it. Keep it!"; ]; !Multiple Choice Question Game !Returns TRUE is player is still alive or FALSE if not [Game2; print "Step right up to bar lad! Do I have a game for you! If you answer my questions correctly I'll give you some additional Personal Program Memory. If you answer a question incorrectly, I'll take some of your Personal Program Memory. You can only attempt each question once. Do you want to play the game?^"; if (YesorNo()) { .Loop3; switch (self.question) { 1: self.question++; if(Question4()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop3; !ask next question return TRUE; } else return FALSE; 2: self.question++; if(Question5()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop3; !ask next question return TRUE; } else return FALSE; 3: self.question++; if(Question6()) !ask question and see if player still alive { print "Want to play again?^"; if (YesorNo()) !check for answer jump Loop3; !ask next question return TRUE; } else return FALSE; default: print "Sorry sucker..you have already tried all of my questions!^"; return TRUE; !player must still be alive } } else { print "That's too bad! If you want to play later just come back and ~talk~ with me. My name is ~Charles~.^"; return TRUE; !player must still be alive } ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question4; buffer->0 = 60; parse->0 = 1; print "What port do you usually hook your printer to on the back of your computer?^ 1. Serial Port ^ 2. Parallel Port ^ 3. It doesn't matter ^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '2' : print "That right!^"; Give_Health(25); return TRUE; '3' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question5; buffer->0 = 60; parse->0 = 1; print "What programming language is used most often by ~real~ programmers?^ 1. C ^ 2. Visual Basic ^ 3. JAVA ^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "That right!^"; Give_Health(25); return TRUE; '2' : print "Sorry..your wrong. What were you thinking?!^"; if (Take_Health(25)) return TRUE; else return FALSE; '3' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !If player answers the current question correctly he gets !25 points added to his health. Subtracts 25 from health !if he is wrong. Returns TRUE if player still alive and !FALSE if not. [Question6; buffer->0 = 60; parse->0 = 1; print "Where can your computer execute programs from the quickest?^ 1. The computer's Hard Drive^ 2. The computers CD ROM ^ 3. The computer's RAM^"; .Loop; read buffer 0; !read user input **input starts at array entry 2 switch (buffer->2) { '1' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '2' : print "Sorry..your wrong^"; if (Take_Health(25)) return TRUE; else return FALSE; '3' : print "That right!^"; Give_Health(25); return TRUE; default: print "Only choose 1, 2, or 3^"; jump Loop; }!end switch ]; !Location Main_Memory Object Main_Memory "Main_Memory" has light with name "Main" "Memory", Description [; if (~~(Main_Memory has visited)) Add_score(5); "You see a 128MB RAM SIMM mounted into the motherboard of the PC.^"; ], w_to Memory_Controller; !Location Graphics_Device Object Graphics_Device "Graphics Card - AGP Bus" has light with name "Graphics" "Device", Description [; if (~~(Graphics_Device has visited)) Add_score(5); "My, what a great Graphics Card Bill's computer has! It looks like a NVdivia GeForce 2 GTS with 64MB of video RAM. This thing can push out a 1.6 GigaTexel fill rate!^"; ], e_to Memory_Controller, s_to Display; !Location Display Object Display "Display" has light with name "Display", Description [; if (~~(Display has visited)) Add_score(5); "Bill has a fairly nice Viewsonic 19~ monitor. When you look out of the display you see Bill working furiously, pounding the keyboard with gusto. What a surprise..who would of thought Bill could actually use a computer!^"; ], n_to Graphics_Device; !The Processor location is where the player wins the game if has !a score >= 100. If he doesn't have a winning score then Bill !punishes the player. Object Processor "Processor" has light with name "Processor", Description [; if (score < 100) { print "Bill Gates appears again. He says ~I'm highly disappointed in you for wasting my time. It takes a lot of effort to take over the world!~^^"; if (Take_Health(25)) !punish the player PlayerTo(Mouse); !.. } else !the player wins the game { print "Well Robbie, I guess you have what it takes to be a real ~hacker~. If you make it to Seattle I might give you a job. I could always use another programmer.^"; deadflag = 2; } ], s_to Memory_Controller; ! ---------------------------------------------------------------------------- ! Menu-driven help (not really a part of the game itself) ! ---------------------------------------------------------------------------- [ HelpMenu; if (menu_item==0) { item_width=8; item_name="About ~Rotten Robbie~"; return 5; } if (menu_item==1) { item_width=8; item_name="Objective"; } if (menu_item==2) { item_width=8; item_name="Movement";} if (menu_item==3) { item_width=8; item_name="Interaction";} if (menu_item==4) { item_width=8; item_name="Commands"; } if (menu_item==5) { item_width=8; item_name="Scoring"; } ]; [ HelpInfo; if (menu_item==1) { print "You're basic objective is to fix Bill Gates PC. You must visit various components in the PC and fix problems encountered. When you have brought the computer efficiency up to or above 100% (score >= 100), then visit Bill in the CPU.^^"; } if (menu_item==2) { print "To move, try commands like ~enter,~ ~east,~ ~west,~ ~north,~ ~south,~ ~up,~ ~down,~ ~enter building,~ ~exit building,~ ~leave building,~ etc. You can use abreviations for directions such as ~n~ for north and ~sw~ for southwest.^^"; } if (menu_item==3) { print "There are certain characters in the game that you can interact with, such as the ~Bartender~. The valid interaction commands include ~look at~, ~talk~, ~tell~, ~ask~, ~show~, ~give~, ~throw~, ~kiss~, and ~attack~.^^"; } if (menu_item==4) { print "Many commands have abbreviations. For example, you can type ~i~ in place of ~inventory,~ ~x object~ instead of ~examine object,~ etc.^^"; print "There are a few special objects, like computer programs, which can be found at certain PC locations. If you still have the ~Palm Pilot~ in your inventory, you can ~Save~, ~Run~, and ~Delete~ programs on you Palm Pilot. Running programs have different effects in different locations.^^"; print "Common commands not previously mentioned are ~look~ to see your surroundings, ~look at~ to see descriptions of certain objects, ~get~ or ~take~ to put an object into your inventory, ~drop~ to take an object out of your inventory and leave it at your current location, and ~inv~ to check your inventory.^^"; print "If you want to end your adventure early, type ~quit~. To suspend your adventure such that you can continue later, type ~save,~ and to resume a saved game, type ~restore.~ To see how well you're doing, type ~score~.^^"; } if (menu_item==5) { print "You can increase your score by visiting PC component locations and by fixing PC components. Your ~Personal Program Memory~ (health) starts at 100% and if it decreases to 0 you are dead and must restart the game. Health may be increased by answering questions correctly in the ~Bartender~ game in both the ~Atlal Saloon~ and the ~Terry Saloon~. Of course, if you answer the questions incorrectly, you lose Health. Remember, you can only attempt a question once per game.^^"; } ]; [ HelpSub; pretty_flag = 1; DoMenu("Help Contents:^ ^ Game Objective and Winning ^ Player Movement ^ Interacting with Game Characters ^ Common Commands ^ Scoring and the Player's ~Personal Program Memory~(Health)", HelpMenu, HelpInfo); ]; !If return value is TRUE then Robbie is still alive !If return value is FALSE the Robbie is dead [Take_Health x; health = health - x; if (health <= 0) { Death_message(); deadflag = 1; return FALSE; } else { print "You current ~Personal Program Memory~ is: ", health, "%^"; return TRUE; } ]; [Give_Health x; if (health >= 100) print "What are you, greedy or something? You already have 100% of your ~Personal Program Memory~!^"; else { health = health + x; print "You current ~Personal Program Memory~ is: ", health, "%^"; } ]; [Death_Message; print "You look down at your body and see the remainder of your ~Personal Program Memory~ fading away. You look up and see your surroundings fading to black.^"; ]; [Add_Score x; score = score + x; ]; Verb "help" * -> Help; Verb 'talk' * 'to' noun -> Talk; Verb 'run' * noun -> Run; [RunSub; if (noun==player) return L__M(##Run,1,noun); if (RunLife(noun,##Run)~=0) rfalse; L__M(##Run,2,noun); rfalse; ]; [TalkSub; if (noun==player) return L__M(##Talk,1,noun); if (RunLife(noun,##Talk)~=0) rfalse; L__M(##Talk,2,noun); rfalse; ]; [GetSub; ];