screen 9 COLOR 7 newgame$ = "y" 'StartScreen setup variable Ghost$ = "on" 'Ghost on/off c1=2'command line c2=0'box background c3=4'boxes c4=0 c5=2 c6=0 c11=2 c12=0 c7=8 'Ghost and item box c9=4 'Compass Normal c10=5 'Compass Direction Positives sp = 0 'Commands Spell-checker flag rv = 1 'ViewRoom oldf$ = "ZORKEMU1.SAV" ' Default save & load file name 'Room titles -- Overworld, Underworld DATA "","": REM Room 1 DATA "","": REM Room 2 DATA "","": REM Room 3 DATA "","": REM Room 4 DATA "","": REM Room 5 DATA "","": REM Room 6 DATA "","": REM Room 7 DATA "","": REM Room 8 DATA "","": REM Room 9 DATA "","": REM Room 10 DATA "","": REM Room 11 DATA "","": REM Room 12 DATA "","": REM Room 13 DATA "","": REM Room 14 DATA "","": REM Room 15 DATA "","": REM Room 16 DATA "","": REM Room 17 DATA "","": REM Room 18 DATA "","": REM Room 19 DATA "","": REM Room 20 DATA "","": REM Room 21 DATA "","": REM Room 22 DATA "","": REM Room 23 DATA "","": REM Room 24 DATA "","": REM Room 25 DATA "","": REM Room 26 DATA "","": REM Room 27 DATA "","": REM Room 28 DATA "","": REM Room 29 DATA "","": REM Room 30 DATA "Outdoors","": REM Room 31 DATA "","": REM Room 32 DATA "","": REM Room 33 DATA "","": REM Room 34 DATA "","": REM Room 35 DATA "","": REM Room 36 DATA "","": REM Room 37 DATA "","": REM Room 38 DATA "","": REM Room 39 DATA "","": REM Room 40 DATA "Stairway to Underworld","Stairway to Outdoors": REM Room 41 DATA "Outdoors","": REM Room 42 DATA "Foyer","": REM Room 43 DATA "Stairs","Stairs": REM Room 44 DATA "Interactive Room","": REM Room 45 DATA "Stairs","Stairs": REM Room 46 DATA "","": REM Room 47 DATA "","": REM Room 48 DATA "","": REM Room 49 DATA "","": REM Room 50 DATA "Outdoors","": REM Room 51 DATA "","Narrow Maze": REM Room 52 DATA "","Narrow Maze": REM Room 53 DATA "","Narrow Maze": REM Room 54 DATA "Starting point","4 Corners Room": REM Room 55 DATA "","Narrow Maze Entry": REM Room 56 DATA "","Gallery": REM Room 57 DATA "","": REM Room 58 DATA "","": REM Room 59 DATA "","": REM Room 60 DATA "","": REM Room 61 DATA "","Narrow Maze": REM Room 62 DATA "","": REM Room 63 DATA "Stairs","Stairs": REM Room 64 DATA "Dead End","Narrow Maze": REM Room 65 DATA "Stairs","Stairs": REM Room 66 DATA "","": REM Room 67 DATA "","": REM Room 68 DATA "","": REM Room 69 DATA "","": REM Room 70 DATA "","": REM Room 71 DATA "","Narrow Maze": REM Room 72 DATA "","": REM Room 73 DATA "","": REM Room 74 DATA "Passageway","End of Maze": REM Room 75 DATA "T Intersection","": REM Room 76 DATA "","": REM Room 77 DATA "","": REM Room 78 DATA "","": REM Room 79 DATA "","": REM Room 80 DATA "","": REM Room 81 DATA "","Narrow Maze": REM Room 82 DATA "","Narrow Maze": REM Room 83 DATA "","Narrow Maze": REM Room 84 DATA "","Narrow Maze": REM Room 85 DATA "","": REM Room 86 DATA "","": REM Room 87 DATA "","": REM Room 88 DATA "","": REM Room 89 DATA "","": REM Room 90 DATA "","": REM Room 91 DATA "","": REM Room 92 DATA "","": REM Room 93 DATA "","": REM Room 94 DATA "","": REM Room 95 DATA "","": REM Room 96 DATA "","": REM Room 97 DATA "","": REM Room 98 DATA "","": REM Room 99 DATA "","": REM Room 100 'Room text -- Overworld, Underworld DATA "","": REM Room 1 DATA "","": REM Room 2 DATA "","": REM Room 3 DATA "","": REM Room 4 DATA "","": REM Room 5 DATA "","": REM Room 6 DATA "","": REM Room 7 DATA "","": REM Room 8 DATA "","": REM Room 9 DATA "","": REM Room 10 DATA "","": REM Room 11 DATA "","": REM Room 12 DATA "","": REM Room 13 DATA "","": REM Room 14 DATA "","": REM Room 15 DATA "","": REM Room 16 DATA "","": REM Room 17 DATA "","": REM Room 18 DATA "","": REM Room 19 DATA "","": REM Room 20 DATA "","": REM Room 21 DATA "","": REM Room 22 DATA "","": REM Room 23 DATA "","": REM Room 24 DATA "","": REM Room 25 DATA "","": REM Room 26 DATA "","": REM Room 27 DATA "","": REM Room 28 DATA "","": REM Room 29 DATA "","": REM Room 30 DATA "outside. Trees are all around you, their tops 20 feet above you.","": REM Room 31 DATA "","": REM Room 32 DATA "","": REM Room 33 DATA "","": REM Room 34 DATA "","": REM Room 35 DATA "","": REM Room 36 DATA "","": REM Room 37 DATA "","": REM Room 38 DATA "","": REM Room 39 DATA "","": REM Room 40 DATA "outside. You see a stairway descending into darkness.","at the stairs to the outdoors. Above you, there is a bright hole.": REM Room 41 DATA "outside. To the east, you can see a one way door.","": REM Room 42 DATA "in the foyer of room 43. You see a one way door to the east.","": REM Room 43 DATA "in a room with stairs leading downwards and a door to the southeast.","in a room with stairs leading upwards and 2 doors leading to other rooms.": REM Room 44 DATA "in an Interactive Room. A sign reads 'Type Lisa to get a surprise.'","": REM Room 45 DATA "in a room with stairs leading down-wards and 3 doors to other places.","in a large room. There is a staircase (to the Overworld) in the center of the room.": REM Room 46 DATA "","": REM Room 47 DATA "","": REM Room 48 DATA "","": REM Room 49 DATA "","": REM Room 50 DATA "outdoors. You see a sign that reads 'Bergren Programming!'","": REM Room 51 DATA "","in the Narrow Maze.": REM Room 52 DATA "","in the Narrow Maze.": REM Room 53 DATA "","in the Narrow Maze.": REM Room 54 DATA "at the start of the game. A sign on the wall says 'Welcome!'","at the 4 Corners Room. There are doors in the 4 corners.": REM Room 55 DATA "","at the Narrow Maze Entrance. A sign on the wall says 'Narrow Maze--go southwest.'": REM Room 56 DATA "","in an art gallery. Beautiful pictures line the walls.": REM Room 57 DATA "","": REM Room 58 DATA "","": REM Room 59 DATA "","": REM Room 60 DATA "","": REM Room 61 DATA "","in the Narrow Maze. There is a one way door on the south wall.": REM Room 62 DATA "","": REM Room 63 DATA "in a room with stairs leading downwards.","in a room with stairs leading upwards.": REM Room 64 DATA "at a Dead End.","in the Narrow Maze. A sign on the wall says 'Go northwest!'": REM Room 65 DATA "in a room with a wide staircase leading downwards.","in a room with a wide staircase leading upwards.": REM Room 66 DATA "","": REM Room 67 DATA "","": REM Room 68 DATA "","": REM Room 69 DATA "","": REM Room 70 DATA "","": REM Room 71 DATA "","in the Narrow Maze. There is a one way door on the south wall.": REM Room 72 DATA "","": REM Room 73 DATA "","": REM Room 74 DATA "","in the Narrow Maze. A sign on the wall says 'To exit, go north and northeast.'": REM Room 75 DATA "at an intersection. A plaque on the wall says 'Dedicated to Bergen Programming.'","": REM Room 76 DATA "","": REM Room 77 DATA "","": REM Room 78 DATA "","": REM Room 79 DATA "","": REM Room 80 DATA "","": REM Room 81 DATA "","in the Narrow Maze. There is a one way door on the east wall.": REM Room 82 DATA "","in the Narrow Maze. There is a one way door on the east wall.": REM Room 83 DATA "","in the Narrow Maze. There is a one way door on the east wall.": REM Room 84 DATA "","in the Narrow Maze. There is a one way door on the north wall.": REM Room 85 DATA "","": REM Room 86 DATA "","": REM Room 87 DATA "","": REM Room 88 DATA "","": REM Room 89 DATA "","": REM Room 90 DATA "","": REM Room 91 DATA "","": REM Room 92 DATA "","": REM Room 93 DATA "","": REM Room 94 DATA "","": REM Room 95 DATA "","": REM Room 96 DATA "","": REM Room 97 DATA "","": REM Room 98 DATA "","": REM Room 99 DATA "","": REM Room 100 'Overworld travel -- N,S,E,W,NE,NW,SE,SW,D DATA 0,0,0,0,0,0,0,0,0: REM Room 1 DATA 0,0,0,0,0,0,0,0,0: REM Room 2 DATA 0,0,0,0,0,0,0,0,0: REM Room 3 DATA 0,0,0,0,0,0,0,0,0: REM Room 4 DATA 0,0,0,0,0,0,0,0,0: REM Room 5 DATA 0,0,0,0,0,0,0,0,0: REM Room 6 DATA 0,0,0,0,0,0,0,0,0: REM Room 7 DATA 0,0,0,0,0,0,0,0,0: REM Room 8 DATA 0,0,0,0,0,0,0,0,0: REM Room 9 DATA 0,0,0,0,0,0,0,0,0: REM Room 10 DATA 0,0,0,0,0,0,0,0,0: REM Room 11 DATA 0,0,0,0,0,0,0,0,0: REM Room 12 DATA 0,0,0,0,0,0,0,0,0: REM Room 13 DATA 0,0,0,0,0,0,0,0,0: REM Room 14 DATA 0,0,0,0,0,0,0,0,0: REM Room 15 DATA 0,0,0,0,0,0,0,0,0: REM Room 16 DATA 0,0,0,0,0,0,0,0,0: REM Room 17 DATA 0,0,0,0,0,0,0,0,0: REM Room 18 DATA 0,0,0,0,0,0,0,0,0: REM Room 19 DATA 0,0,0,0,0,0,0,0,0: REM Room 20 DATA 0,0,0,0,0,0,0,0,0: REM Room 21 DATA 0,0,0,0,0,0,0,0,0: REM Room 22 DATA 0,0,0,0,0,0,0,0,0: REM Room 23 DATA 0,0,0,0,0,0,0,0,0: REM Room 24 DATA 0,0,0,0,0,0,0,0,0: REM Room 25 DATA 0,0,0,0,0,0,0,0,0: REM Room 26 DATA 0,0,0,0,0,0,0,0,0: REM Room 27 DATA 0,0,0,0,0,0,0,0,0: REM Room 28 DATA 0,0,0,0,0,0,0,0,0: REM Room 29 DATA 0,0,0,0,0,0,0,0,0: REM Room 30 DATA 0,1,0,0,0,0,1,0,0: REM Room 31 DATA 0,0,0,0,0,0,0,0,0: REM Room 32 DATA 0,0,0,0,0,0,0,0,0: REM Room 33 DATA 0,0,0,0,0,0,0,0,0: REM Room 34 DATA 0,0,0,0,0,0,0,0,0: REM Room 35 DATA 0,0,0,0,0,0,0,0,0: REM Room 36 DATA 0,0,0,0,0,0,0,0,0: REM Room 37 DATA 0,0,0,0,0,0,0,0,0: REM Room 38 DATA 0,0,0,0,0,0,0,0,0: REM Room 39 DATA 0,0,0,0,0,0,0,0,0: REM Room 40 DATA 1,1,1,0,0,0,0,0,1: REM Room 41 DATA 0,0,1,1,0,1,0,1,0: REM Room 42 DATA 0,0,1,0,0,0,0,0,0: REM Room 43 DATA 0,0,0,0,0,0,1,0,1: REM Room 44 DATA 0,1,1,0,0,0,1,0,0: REM Room 45 DATA 0,1,0,1,0,0,0,1,1: REM Room 46 DATA 0,0,0,0,0,0,0,0,0: REM Room 47 DATA 0,0,0,0,0,0,0,0,0: REM Room 48 DATA 0,0,0,0,0,0,0,0,0: REM Room 49 DATA 0,0,0,0,0,0,0,0,0: REM Room 50 DATA 1,0,0,0,1,0,0,0,0: REM Room 51 DATA 0,0,0,0,0,0,0,0,0: REM Room 52 DATA 0,0,0,0,0,0,0,0,0: REM Room 53 DATA 0,0,0,0,0,0,0,0,0: REM Room 54 DATA 1,0,0,0,1,1,1,1,0: REM Room 55 DATA 1,1,0,0,0,1,0,0,0: REM Room 56 DATA 0,0,0,0,0,0,0,0,0: REM Room 57 DATA 0,0,0,0,0,0,0,0,0: REM Room 58 DATA 0,0,0,0,0,0,0,0,0: REM Room 59 DATA 0,0,0,0,0,0,0,0,0: REM Room 60 DATA 0,0,0,0,0,0,0,0,0: REM Room 61 DATA 0,0,0,0,0,0,0,0,0: REM Room 62 DATA 0,0,0,0,0,0,0,0,0: REM Room 63 DATA 0,0,0,0,1,0,0,0,1: REM Room 64 DATA 0,1,0,0,0,0,0,0,0: REM Room 65 DATA 1,1,0,0,0,1,0,0,0: REM Room 66 DATA 0,0,0,0,0,0,0,0,0: REM Room 67 DATA 0,0,0,0,0,0,0,0,0: REM Room 68 DATA 0,0,0,0,0,0,0,0,0: REM Room 69 DATA 0,0,0,0,0,0,0,0,0: REM Room 70 DATA 0,0,0,0,0,0,0,0,0: REM Room 71 DATA 0,0,0,0,0,0,0,0,0: REM Room 72 DATA 0,0,0,0,0,0,0,0,0: REM Room 73 DATA 0,0,0,0,0,0,0,0,0: REM Room 74 DATA 1,0,0,0,0,0,0,0,0: REM Room 75 DATA 1,1,0,1,0,0,0,0,0: REM Room 76 DATA 0,0,0,0,0,0,0,0,0: REM Room 77 DATA 0,0,0,0,0,0,0,0,0: REM Room 78 DATA 0,0,0,0,0,0,0,0,0: REM Room 79 DATA 0,0,0,0,0,0,0,0,0: REM Room 80 DATA 0,0,0,0,0,0,0,0,0: REM Room 81 DATA 0,0,0,0,0,0,0,0,0: REM Room 82 DATA 0,0,0,0,0,0,0,0,0: REM Room 83 DATA 0,0,0,0,0,0,0,0,0: REM Room 84 DATA 0,0,0,0,0,0,0,0,0: REM Room 85 DATA 0,0,0,0,0,0,0,0,0: REM Room 86 DATA 0,0,0,0,0,0,0,0,0: REM Room 87 DATA 0,0,0,0,0,0,0,0,0: REM Room 88 DATA 0,0,0,0,0,0,0,0,0: REM Room 89 DATA 0,0,0,0,0,0,0,0,0: REM Room 90 DATA 0,0,0,0,0,0,0,0,0: REM Room 91 DATA 0,0,0,0,0,0,0,0,0: REM Room 92 DATA 0,0,0,0,0,0,0,0,0: REM Room 93 DATA 0,0,0,0,0,0,0,0,0: REM Room 94 DATA 0,0,0,0,0,0,0,0,0: REM Room 95 DATA 0,0,0,0,0,0,0,0,0: REM Room 96 DATA 0,0,0,0,0,0,0,0,0: REM Room 97 DATA 0,0,0,0,0,0,0,0,0: REM Room 98 DATA 0,0,0,0,0,0,0,0,0: REM Room 99 DATA 0,0,0,0,0,0,0,0,0: REM Room 100 'Underworld travel -- N,S,E,W,NE,NW,SE,SW,U DATA 0,0,0,0,0,0,0,0,0: REM Room 1 DATA 0,0,0,0,0,0,0,0,0: REM Room 2 DATA 0,0,0,0,0,0,0,0,0: REM Room 3 DATA 0,0,0,0,0,0,0,0,0: REM Room 4 DATA 0,0,0,0,0,0,0,0,0: REM Room 5 DATA 0,0,0,0,0,0,0,0,0: REM Room 6 DATA 0,0,0,0,0,0,0,0,0: REM Room 7 DATA 0,0,0,0,0,0,0,0,0: REM Room 8 DATA 0,0,0,0,0,0,0,0,0: REM Room 9 DATA 0,0,0,0,0,0,0,0,0: REM Room 10 DATA 0,0,0,0,0,0,0,0,0: REM Room 11 DATA 0,0,0,0,0,0,0,0,0: REM Room 12 DATA 0,0,0,0,0,0,0,0,0: REM Room 13 DATA 0,0,0,0,0,0,0,0,0: REM Room 14 DATA 0,0,0,0,0,0,0,0,0: REM Room 15 DATA 0,0,0,0,0,0,0,0,0: REM Room 16 DATA 0,0,0,0,0,0,0,0,0: REM Room 17 DATA 0,0,0,0,0,0,0,0,0: REM Room 18 DATA 0,0,0,0,0,0,0,0,0: REM Room 19 DATA 0,0,0,0,0,0,0,0,0: REM Room 20 DATA 0,0,0,0,0,0,0,0,0: REM Room 21 DATA 0,0,0,0,0,0,0,0,0: REM Room 22 DATA 0,0,0,0,0,0,0,0,0: REM Room 23 DATA 0,0,0,0,0,0,0,0,0: REM Room 24 DATA 0,0,0,0,0,0,0,0,0: REM Room 25 DATA 0,0,0,0,0,0,0,0,0: REM Room 26 DATA 0,0,0,0,0,0,0,0,0: REM Room 27 DATA 0,0,0,0,0,0,0,0,0: REM Room 28 DATA 0,0,0,0,0,0,0,0,0: REM Room 29 DATA 0,0,0,0,0,0,0,0,0: REM Room 30 DATA 0,0,0,0,0,0,0,0,0: REM Room 31 DATA 0,0,0,0,0,0,0,0,0: REM Room 32 DATA 0,0,0,0,0,0,0,0,0: REM Room 33 DATA 0,0,0,0,0,0,0,0,0: REM Room 34 DATA 0,1,0,0,0,0,0,0,0: REM Room 35 DATA 0,0,0,0,0,0,0,0,0: REM Room 36 DATA 0,0,0,0,0,0,0,0,0: REM Room 37 DATA 0,0,0,0,0,0,0,0,0: REM Room 38 DATA 0,0,0,0,0,0,0,0,0: REM Room 39 DATA 0,0,0,0,0,0,0,0,0: REM Room 40 DATA 0,0,0,0,0,0,1,0,1: REM Room 41 DATA 0,0,0,0,0,0,0,0,0: REM Room 42 DATA 0,0,0,0,0,0,0,0,0: REM Room 43 DATA 0,0,1,0,0,0,1,0,1: REM Room 44 --CONTINUE HERE DATA 1,0,0,1,0,0,0,0,0: REM Room 45 DATA 0,1,1,0,0,0,1,1,1: REM Room 46 DATA 0,1,0,1,0,0,0,0,0: REM Room 47 DATA 0,0,0,0,0,0,0,0,0: REM Room 48 DATA 0,0,0,0,0,0,0,0,0: REM Room 49 DATA 0,0,0,0,0,0,0,0,0: REM Room 50 DATA 0,0,0,0,0,0,0,0,0: REM Room 51 DATA 0,1,1,0,0,1,0,0,0: REM Room 52 DATA 0,0,1,1,0,0,0,0,0: REM Room 53 DATA 0,0,0,1,0,0,1,0,0: REM Room 54 DATA 0,0,0,0,1,1,1,1,0: REM Room 55 DATA 1,0,0,0,0,0,0,1,0: REM Room 56 DATA 1,0,0,0,0,1,0,0,0: REM Room 57 DATA 0,0,0,0,0,0,0,0,0: REM Room 58 DATA 0,0,0,0,0,0,0,0,0: REM Room 59 DATA 0,0,0,0,0,0,0,0,0: REM Room 60 DATA 0,0,0,0,0,0,0,0,0: REM Room 61 DATA 1,1,0,0,0,0,0,0,0: REM Room 62 DATA 0,1,1,0,0,0,1,0,0: REM Room 63 DATA 0,1,0,1,1,0,0,1,1: REM Room 64 DATA 0,1,0,0,1,1,0,0,0: REM Room 65 DATA 0,1,1,0,0,1,1,0,1: REM Room 66 DATA 0,1,0,1,0,0,0,1,0: REM Room 67 DATA 0,0,0,0,0,0,0,0,0: REM Room 68 DATA 0,0,0,0,0,0,0,0,0: REM Room 69 DATA 0,0,0,0,0,0,0,0,0: REM Room 70 DATA 0,0,0,0,0,0,0,0,0: REM Room 71 DATA 0,1,0,0,0,0,0,0,0: REM Room 72 DATA 1,0,1,0,1,0,0,0,0: REM Room 73 DATA 1,0,0,1,0,1,0,0,0: REM Room 74 DATA 1,0,0,0,0,0,0,0,0: REM Room 75 DATA 1,0,1,0,1,0,0,0,0: REM Room 76 DATA 1,0,0,1,0,1,0,0,0: REM Room 77 DATA 0,0,0,0,0,0,0,0,0: REM Room 78 DATA 0,0,0,0,0,0,0,0,0: REM Room 79 DATA 0,0,0,0,0,0,0,0,0: REM Room 80 DATA 0,0,0,0,0,0,0,0,0: REM Room 81 DATA 0,0,1,0,0,0,0,0,0: REM Room 82 DATA 0,0,1,0,0,0,0,0,0: REM Room 83 DATA 0,0,1,0,0,0,0,0,0: REM Room 84 DATA 1,0,0,0,0,0,0,0,0: REM Room 85 DATA 0,0,0,0,0,0,0,0,0: REM Room 86 DATA 0,0,0,0,0,0,0,0,0: REM Room 87 DATA 0,0,0,0,0,0,0,0,0: REM Room 88 DATA 0,0,0,0,0,0,0,0,0: REM Room 89 DATA 0,0,0,0,0,0,0,0,0: REM Room 90 DATA 0,0,0,0,0,0,0,0,0: REM Room 91 DATA 0,0,0,0,0,0,0,0,0: REM Room 92 DATA 0,0,0,0,0,0,0,0,0: REM Room 93 DATA 0,0,0,0,0,0,0,0,0: REM Room 94 DATA 0,0,0,0,0,0,0,0,0: REM Room 95 DATA 0,0,0,0,0,0,0,0,0: REM Room 96 DATA 0,0,0,0,0,0,0,0,0: REM Room 97 DATA 0,0,0,0,0,0,0,0,0: REM Room 98 DATA 0,0,0,0,0,0,0,0,0: REM Room 99 DATA 0,0,0,0,0,0,0,0,0: REM Room 100 'Objects (By fives); 999 = in inventory, 0 = nowhere, 001-100 = room it is in. 'floor,room data 1,55,0,0,0,0,0,0,0,0 :rem 1-5 data 0,0,0,0,0,0,0,0,0,0 :rem 6-10 data 0,0,0,0,0,0,0,0,0,0 :rem 11-15 data 0,0,0,0,0,0,0,0,0,0 :rem 16-20 data 0,0,0,0,0,0,0,0,0,0 :rem 21-25 data 0,0,0,0,0,0,0,0,0,0 :rem 26-30 data 0,0,0,0,0,0,0,0,0,0 :rem 31-35 data 0,0,0,0,0,0,0,0,0,0 :rem 36-40 data 0,0,0,0,0,0,0,0,0,0 :rem 41-45 data 0,0,0,0,0,0,0,0,0,0 :rem 46-50 'Object Names (By fives) data "Test","","","","" :rem 1-5 data "","","","","" :rem 6-10 data "","","","","" :rem 11-15 data "","","","","" :rem 16-20 data "","","","","" :rem 21-25 data "","","","","" :rem 26-30 data "","","","","" :rem 31-35 data "","","","","" :rem 36-40 data "","","","","" :rem 41-45 data "","","","","" :rem 46-50 TitleScreen: REM zork emulator CLS PRINT "ZORK EMULATOR ***CHANGE NAME!!!" PRINT PRINT "By Brandon Bergren" PRINT locate 5,1:color c1,c2:PRINT "Loading"; InitProgram: DIM rtit$(1:100, 1):'Room titles DIM text$(1:100, 1):'Room names DIM dir(1,1:100, 1:9):'travel direction attribs dim ObjRoomNumber(1:50):'Object Room Numbers or 999 if in inventory dim ObjFloor(1:50):'Floor Objects are on. dim ObjName$(1:50):'Object names DIM smap(200):'Score Tracker FOR t = 1 TO 100 READ rtit$(t, 1) READ rtit$(t, 0) NEXT t PRINT "."; FOR t = 1 TO 100 READ text$(t, 1) READ text$(t, 0) NEXT t PRINT "."; FOR t = 1 TO 100 if t = 50 then print "."; READ dir(1,t, 1) READ dir(1,t, 2) READ dir(1,t, 3) READ dir(1,t, 4) READ dir(1,t, 5) READ dir(1,t, 6) READ dir(1,t, 7) READ dir(1,t, 8) READ dir(1,t, 9) NEXT t PRINT "."; FOR t = 1 TO 100 if t = 50 then print "."; READ dir(0,t, 1) READ dir(0,t, 2) READ dir(0,t, 3) READ dir(0,t, 4) READ dir(0,t, 5) READ dir(0,t, 6) READ dir(0,t, 7) READ dir(0,t, 8) READ dir(0,t, 9) NEXT t PRINT "."; for t = 1 to 50 READ ObjFloor(t) READ ObjRoomNumber(t) next t print "."; for t = 1 to 50 READ ObjName$(t) next t print "." color 7:locate 5,1:print "Loading........" PRINT "Press any key to start" a$ = INPUT$(1) BEEP: a$ = "" StartScreen: color c3 IF Newgame$ <> "" THEN room = 55: level = 1: h = 5: v = 5:Newgame$ = "" CLS PRINT "ÉÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" PRINT "ºo n oºRoom #888 ºMoves:8888 ºScore:### / 200º º ÉÍÍÍMAPÍÍÍÍ» º" PRINT "º ÌÍÍËÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍͼ º º º" PRINT "ºw + eºupºÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º º" PRINT "º ºdnº³ ³ º º º" PRINT "ºo s oÌÍͼÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ º º º" PRINT "ÌÍÍÍÍͼ ³You are ³ º º º" PRINT "º TEST ³ ³ º º º" PRINT "ºVERSION ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ º º º" PRINT "º ³ ³ º º º" PRINT "º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º º" PRINT "ºto the North: ÚÄÄÄÄÄ¿ º º º" PRINT "ºto the South: ³ ³ ÈÍÍÍÍÍÍÍÍÍͼ º" PRINT "ºto the East: ³ ³ º" PRINT "ºto the West: ³ ³ º" PRINT "ºto the Northeast: ÀÄÄÄÄÄÙ º" PRINT "ºto the Northwest: DOORS º" PRINT "ºto the Southeast: º" PRINT "ºto the Southwest: º" PRINT "º º" PRINT "ÌObjects in room:ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹" PRINT "º º" PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" MainInterfaceLoop: color c3 'flush screen if rv = 0 then locate 12,49: print " "; if rv = 0 then locate 13,49: print " "; if rv = 0 then locate 14,49: print " "; if rv = 0 then locate 15,59: print " "; if rv = 0 then locate 16,59: print " "; if rv = 0 then locate 17,59: print " "; IF Ghost$ = "off" THEN LOCATE 12, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 13, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 14, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 15, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 16, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 17, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 18, 2: PRINT " " IF Ghost$ = "off" THEN LOCATE 19, 2: PRINT " " LOCATE 2, 14: PRINT " " LOCATE 2, 25: PRINT " " LOCATE 2, 39: PRINT "###" color c9 LOCATE 2, 4: PRINT "n" LOCATE 6, 4: PRINT "s" LOCATE 4, 6: PRINT "e" LOCATE 4, 2: PRINT "w" LOCATE 2, 6: PRINT "o" LOCATE 2, 2: PRINT "o" LOCATE 6, 6: PRINT "o" LOCATE 6, 2: PRINT "o" LOCATE 4, 8: PRINT "up" LOCATE 5, 8: PRINT "dn" color c3 LOCATE 7, 20: PRINT " " LOCATE 8, 12: PRINT " " LOCATE 3, 65: PRINT " " LOCATE 4, 65: PRINT " " LOCATE 5, 65: PRINT " " LOCATE 6, 65: PRINT " " LOCATE 7, 65: PRINT " " LOCATE 8, 65: PRINT " " LOCATE 9, 65: PRINT " " LOCATE 10, 65: PRINT " " LOCATE 11, 65: PRINT " " LOCATE 12, 65: PRINT " " LOCATE 5, 12: PRINT " " LOCATE 10, 12: PRINT " " LOCATE 20, 2: PRINT " " locate 22,2:print " " 'Ghost LOCATE 12, 16: PRINT " " LOCATE 13, 16: PRINT " " LOCATE 14, 15: PRINT " " LOCATE 15, 15: PRINT " " LOCATE 16, 20: PRINT " " LOCATE 17, 20: PRINT " " LOCATE 18, 20: PRINT " " LOCATE 19, 20: PRINT " " 'RoomView if rv = 1 then locate 12,49: print "ÚÄÄÄÄÄ¿"; if rv = 1 then locate 13,49: print "³ ³"; if rv = 1 then locate 14,49: print "³ ³"; if rv = 1 then locate 15,49: print "³ ³"; if rv = 1 then locate 16,49: print "ÀÄÄÄÄÄÙ"; if rv = 1 then locate 17,49: print " DOORS "; 'Top Line Restore LOCATE 2, 14: PRINT room LOCATE 2, 25: PRINT move LOCATE 2, 39: PRINT sc 'Compass Printer color c10 IF dir(level,room, 1) = 1 THEN LOCATE 2, 4: PRINT "N" IF dir(level,room, 2) = 1 THEN LOCATE 6, 4: PRINT "S" IF dir(level,room, 3) = 1 THEN LOCATE 4, 6: PRINT "E" IF dir(level,room, 4) = 1 THEN LOCATE 4, 2: PRINT "W" IF dir(level,room, 5) = 1 THEN LOCATE 2, 6: PRINT "O"'NE IF dir(level,room, 6) = 1 THEN LOCATE 2, 2: PRINT "O"'NW IF dir(level,room, 7) = 1 THEN LOCATE 6, 6: PRINT "O"'SE IF dir(level,room, 8) = 1 THEN LOCATE 6, 2: PRINT "O"'SW IF level = 1 then if dir(1,room, 9) = 1 THEN LOCATE 5, 8: PRINT "DN" if level = 0 then if dir(0,room, 9) = 1 then locate 4,8: print "UP" IF level = 1 THEN LOCATE 2, 49: PRINT "Overworld " IF level = 0 THEN LOCATE 2, 49: PRINT "Underworld" color c3 LOCATE 5, 12: PRINT rtit$(room, level) topline$ = "": botline$ = "" IF text$(room, level) = "" THEN GOTO 15 IF LEN(text$(room, level)) < 40 THEN topline$ = text$(room, level): GOTO 15 FOR t = 1 TO LEN(text$(room, level)) y$ = MID$(text$(room, level), t, 1) x$ = x$ + y$ IF t = 40 THEN topline$ = x$: x$ = "" NEXT t botline$ = x$ x$ = "" y$ = "" 15 LOCATE 7, 20: PRINT topline$ LOCATE 8, 12: PRINT botline$ locate 2+v,64+h:print "Û" if rv = 1 then if dir(level,room,1) = 1 then locate 12,52: print "³"; if rv = 1 then if dir(level,room,2) = 1 then locate 16,52: print "³"; if rv = 1 then if dir(level,room,3) = 1 then locate 14,55: print "Ä"; if rv = 1 then if dir(level,room,4) = 1 then locate 14,49: print "Ä"; if rv = 1 then if dir(level,room,5) = 1 then locate 12,55: print "/"; if rv = 1 then if dir(level,room,6) = 1 then locate 12,49: print "\"; if rv = 1 then if dir(level,room,7) = 1 then locate 16,55: print "\"; if rv = 1 then if dir(level,room,8) = 1 then locate 16,49: print "/"; if rv = 1 then if dir(level,room,9) = 1 then locate 14,52: print "Û"; IF Ghost$ = "on" THEN GOSUB Ghost locate 22,2 for t = 1 to 50 if ObjFloor(t) = level then if ObjRoomNumber(t) = room then print ObjName$(t);" "; next t 'Accept Command LOCATE 10, 12 color c1,c2 LINE INPUT "Command>"; d$ IF d$ = "" THEN GOTO MainInterfaceLoop move = move + 1 d$ = LCASE$(d$) IF NOT d$ = "g" THEN c$ = d$ d$ = "" 'Command Formatter IF c$ = "north" THEN c$ = "n" IF c$ = "south" THEN c$ = "s" IF c$ = "east" THEN c$ = "e" IF c$ = "west" THEN c$ = "w" IF c$ = "northeast" THEN c$ = "ne" IF c$ = "northwest" THEN c$ = "nw" IF c$ = "southeast" THEN c$ = "se" IF c$ = "southwest" THEN c$ = "sw" IF c$ = "down" THEN c$ = "d" IF c$ = "up" THEN c$ = "u" IF c$ = "go north" THEN c$ = "n" IF c$ = "go south" THEN c$ = "s" IF c$ = "go east" THEN c$ = "e" IF c$ = "go west" THEN c$ = "w" IF c$ = "go northeast" THEN c$ = "ne" IF c$ = "go northwest" THEN c$ = "nw" IF c$ = "go southeast" THEN c$ = "se" IF c$ = "go southwest" THEN c$ = "sw" IF c$ = "go down" THEN c$ = "d" IF c$ = "go up" THEN c$ = "u" IF c$ = "go n" THEN c$ = "n" IF c$ = "go s" THEN c$ = "s" IF c$ = "go e" THEN c$ = "e" IF c$ = "go w" THEN c$ = "w" IF c$ = "go ne" THEN c$ = "ne" IF c$ = "go nw" THEN c$ = "nw" IF c$ = "go se" THEN c$ = "se" IF c$ = "go sw" THEN c$ = "sw" IF c$ = "go d" THEN c$ = "d" IF c$ = "go u" THEN c$ = "u" if c$ = "dn" then c$ = "d" if c$ = "go dn" then c$ = "u" if c$ = "exit" then c$ = "quit" if c$ = "script on" then c$ = "script" if c$ = "script off" then c$ = "noscript" if c$ = "noghost" then c$ = "ghost off" if c$ = "view" then c$ = "view on" if c$ = "noview" then c$ = "view off" if mid$(c$,1,4) = "take" then c$ = "get"+mid$(c$,5) if c$ = "inventory" then c$ = "i" if c$ = "save game" then c$ = "save" if c$ = "load game" then c$ = "load" if c$ = "again" then c$ = "g" if c$ = "warp" then locate 10,12:input d: room = d:sp=1 'Command Interpreter IF c$ = "u" THEN IF level = 1 THEN GOSUB Bump: GOTO MAIN IF c$ = "d" THEN IF level = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "quit" THEN GOTO QuitQuery IF c$ = "script" THEN Script = 1: GOSUB StartScript: sp = 1 IF c$ = "noscript" THEN Script = 0: GOSUB EndScript: sp = 1 IF c$ = "ghost on" THEN Ghost$ = "on": GOTO StartScreen IF c$ = "ghost off" THEN Ghost$ = "off": sp = 1 IF c$ = "lisa" THEN IF level = 1 THEN IF room = 45 THEN GOTO Lisa if c$ = "map" then gosub mapgame : sp = 1 if c$ = "view on" then rv = 1: goto StartScreen if c$ = "view off" then rv = 0: goto StartScreen if mid$(c$,1,3) = "get" then gosub Take :sp = 1 if mid$(c$,1,4) = "drop" then gosub Drop :sp = 1 if c$ = "i" then goto Inventory if c$ = "save" then goto FileSave if c$ = "load" then goto FileLoad IF Script = 1 THEN GOSUB Script 'Moving IF c$ = "n" THEN IF dir(level,room, 1) = 1 THEN room = room - 10: v = v - 1:GOTO MAIN IF c$ = "n" THEN IF dir(level,room, 1) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "s" THEN IF dir(level,room, 2) = 1 THEN room = room + 10: v = v + 1:GOTO MAIN IF c$ = "s" THEN IF dir(level,room, 2) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "e" THEN IF dir(level,room, 3) = 1 THEN room = room + 1: h = h + 1:GOTO MAIN IF c$ = "e" THEN IF dir(level,room, 3) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "w" THEN IF dir(level,room, 4) = 1 THEN room = room - 1: h = h - 1:GOTO MAIN IF c$ = "w" THEN IF dir(level,room, 4) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "ne" THEN IF dir(level,room, 5) = 1 THEN room = room - 9: v = v - 1:h = h + 1:GOTO MAIN IF c$ = "ne" THEN IF dir(level,room, 5) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "nw" THEN IF dir(level,room, 6) = 1 THEN room = room - 11: v = v - 1:h = h - 1:GOTO MAIN IF c$ = "nw" THEN IF dir(level,room, 6) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "se" THEN IF dir(level,room, 7) = 1 THEN room = room + 11: v = v + 1:h = h + 1:GOTO MAIN IF c$ = "se" THEN IF dir(level,room, 7) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "sw" THEN IF dir(level,room, 8) = 1 THEN room = room + 9: v = v + 1:h = h - 1:GOTO MAIN IF c$ = "sw" THEN IF dir(level,room, 8) = 0 THEN GOSUB Bump: GOTO MAIN IF c$ = "d" THEN IF level = 1 then if dir(0,room, 9) = 1 THEN level = 0: GOTO MAIN IF c$ = "d" THEN IF level = 1 then if dir(0,room, 9) = 0 THEN GOSUB Bump: GOTO MAIN if c$ = "u" then if level = 0 then if dir(1,room, 9) = 1 then level = 1: goto main if c$ = "u" then if level = 0 then if dir(1,room, 9) = 0 then gosub Bump: goto Main IF NOT sp = 1 THEN GOSUB Oops sp = 0 MAIN: IF LEN(c$) > 39 THEN GOTO StartScreen: 'Repair text box if user overfilled it. GOTO MainInterfaceLoop Ghost: 'Routine to print Room Names of room N,S,E,W,NE,etc. LOCATE 12, 16:if dir(level,room,1) = 1 then color c6,c7 PRINT rtit$(room - 10, level):color c7 LOCATE 13, 16:if dir(level,room,2) = 1 then color c6,c7 PRINT rtit$(room + 10, level):color c7 LOCATE 14, 15:if dir(level,room,3) = 1 then color c6,c7 PRINT rtit$(room + 1, level):color c7 LOCATE 15, 15:if dir(level,room,4) = 1 then color c6,c7 PRINT rtit$(room - 1, level):color c7 LOCATE 16, 20:if dir(level,room,5) = 1 then color c6,c7 PRINT rtit$(room - 9, level):color c7 LOCATE 17, 20:if dir(level,room,6) = 1 then color c6,c7 PRINT rtit$(room - 11, level):color c7 LOCATE 18, 20:if dir(level,room,7) = 1 then color c6,c7 PRINT rtit$(room + 11, level):color c7 LOCATE 19, 20:if dir(level,room,8) = 1 then color c6,c7 if level = 0 then if udir(room,8) = 1 then color c6,c7 PRINT rtit$(room + 9, level):color c7 RETURN Bump: 'You tried to go into a wall. LOCATE 20, 2 'room specific messages here. COLOR c5 : PRINT "You can't go that way!": COLOR 7 BEEP delay 4 move = move - 1 RETURN QuitQuery: CLS : PRINT "Are you sure you want to quit? (y or n)" r$ = INPUT$(1): r$ = LCASE$(r$) IF r$ = "n" THEN r$ = "": CLS : move = move - 1: GOTO StartScreen IF r$ = "y" THEN CLEAR : CLS : END BEEP: GOTO QuitQuery Script: LPRINT "Room # "; room; " "; rtit$(room, level); " "; IF level = 1 THEN LPRINT "(Overworld)" IF level = 0 THEN LPRINT "(Underworld)" LPRINT "You are "; text$(room, level) LPRINT "Command> "; c$ LPRINT RETURN StartScript: LPRINT "Transcription of ZorkEmulator." LPRINT LPRINT RETURN EndScript: LPRINT LPRINT "End of transcription." LPRINT CHR$(12) RETURN Oops: 'Typing error BEEP: LOCATE 20, 2 COLOR c11, c12: PRINT "What?": COLOR c3 if Script = 1 then lprint "What?":lprint delay 4: move = move - 1 RETURN Lisa: 'Room 45 Level 1 Surprise cls color c3,c4 PRINT " ---A LETTER FROM BERGREN PROGRAMMING---" PRINT PRINT " You have just accessed the Commands list. This useful list" PRINT "tells you some of the commands you can type. If you still need" PRINT "help, use the Manual." PRINT PRINT "ghost off ghost on script noscript quit" PRINT "north south east west northeast" PRINT "northwest southeast southwest g n" PRINT "s e w ne nw" PRINT "se sw map view on view off" print if smap(1) = 0 then color c1,c2: print "You got a POINT!":color c3 if smap(1) = 0 then sc = sc + 1: smap(1) = 1 PRINT "Press any key to return to game." p$ = INPUT$(1): p$ = "": move = move - 1 GOTO StartScreen Mapgame: if Script = 1 then lprint chr$(12) lprint "Rooms are arranged like this:" lprint lprint "01 02 03 04 05 06 07 08 09 10" lprint lprint "11 12 13 14 15 16 17 18 19 20" lprint lprint "21 22 23 24 25 26 27 28 29 30" lprint lprint "31 32 33 34 35 36 37 38 39 40" lprint lprint "41 42 43 44 45 46 47 48 49 50" lprint lprint "51 52 53 54 55 56 57 58 59 60" lprint lprint "61 62 63 64 65 66 67 68 69 70" lprint lprint "71 72 73 74 75 76 77 78 79 80" lprint lprint "81 82 83 84 85 86 87 88 89 90" lprint lprint "91 92 93 94 95 96 97 98 99 100" lprint lprint "Overworld room names and passages" for m = 1 to 100 lprint "Room ";m;":";rtit$(m,1);" : "; if dir(1,m,1) = 1 then lprint "N "; if dir(1,m,2) = 1 then lprint "S "; if dir(1,m,3) = 1 then lprint "E "; if dir(1,m,4) = 1 then lprint "W "; if dir(1,m,5) = 1 then lprint "NE "; if dir(1,m,6) = 1 then lprint "NW "; if dir(1,m,7) = 1 then lprint "SE "; if dir(1,m,8) = 1 then lprint "SW "; if dir(1,m,9) = 1 then lprint "D"; lprint "" next m lprint "Underworld room names and passages" for m = 1 to 100 lprint "Room ";m;":";rtit$(m,0);" : "; if dir(0,m,1) = 1 then lprint "N "; if dir(0,m,2) = 1 then lprint "S "; if dir(0,m,3) = 1 then lprint "E "; if dir(0,m,4) = 1 then lprint "W "; if dir(0,m,5) = 1 then lprint "NE "; if dir(0,m,6) = 1 then lprint "NW "; if dir(0,m,7) = 1 then lprint "SE "; if dir(0,m,8) = 1 then lprint "SW "; if dir(0,m,9) = 1 then lprint "U "; lprint "" next m m = 0 sc = sc - 1 return Take: for t = 1 to 50 if mid$(c$,5) = lcase$(ObjName$(t)) then if ObjFloor(t) = level then if ObjRoomNumber(t) = room then ObjRoomNumber(t) = 999:g = 1 next t if g = 0 then beep:locate 20,2:color 16,7: print "I don't see a ";mid$(c$,5);" here!":delay 4: move = move - 1:color 7 g = 0 return Drop: for t = 1 to 50 if lcase$(ObjName$(t)) = mid$(c$,6) then if ObjRoomNumber(t) = 999 then ObjRoomNumber(t) = room next t return Inventory: cls for t = 1 to 50 if ObjRoomNumber(t) = 999 then print ObjName$(t);" "; next t print print "Press a key... dum$ = input$(1) dum$ = "" goto StartScreen FileLoad: cls print "File Name to load? (Default = ";oldf$;") > "; line input "";f$ if f$ = "" then f$ = oldf$ oldf$ = f$ open f$ for random as #1 len = 4 field #1, 3 as vf$, 1 as sc$ for t = 1 to 51 get #1, t if not t = 51 then ObjRoomNumber(t) = val(vf$) if t = 51 then room = val(vf$) next t for t = 1 to 200 get #1,t smap(t) = val(sc$) next t close #1 f$ = "":vf$ = "":sc$ = "" goto StartScreen FileSave: cls print "File name to Save As? (Default = ";oldf$;") > "; line input "";f$ if f$ = "" then f$ = oldf$ oldf$ = f$ open f$ for random as #1 len = 4 field #1, 3 as vf$, 1 as sc$ for t = 1 to 200 vf$ = str$(ObjRoomNumber(t)) if t = 51 then vf$ = str$(room) sc$ = str$(smap(t)) put #1,t next t close #1 f$ = "": vf$ = "":sc$ = "" goto StartScreen