REM ///////////////////// REM /// Final Program /// REM /// Written by: /// REM /// Bryan Enes /// REM ///////////////////// start: SCREEN 12 CLS REM ///////////////// REM /// Main Menu /// REM ///////////////// menu: CLS REM The background music PLAY "MB" PLAY "L8" PLAY "<" PLAY "<" PLAY "<" FOR x = 1 TO 8 PLAY "b" PLAY "g-" PLAY "a" PLAY "b" PLAY ">d" PLAY "d" PLAY " 3 THEN xvalue = 1 LOOP REM //////////////// REM /// The Game /// REM //////////////// play1: CLS COLOR 15 REM the graphics REM the story line LOCATE 1, 1 PRINT "You are being sent out on a quest to find" PRINT "the Shield of Terry. Then you must return" PRINT " It to the King of Rebald. There will be " PRINT "many challenges that you must overcome to" PRINT " find the Shield of Terry, but you have " PRINT "been trained well, and you will pass this" PRINT " with flying colors. So, good luck. " SLEEP 20 GOTO thefirstpage thefirstpage: CLS REM the first page LOCATE 15, 30 PRINT "Quest for the Sheild" SLEEP 3 CLS money = 500 REM Draw The screen LINE (0, 100)-(640, 480), 2, BF LINE (0, 0)-(640, 100), 15, B LINE (101, 100)-(150, 300), 1, BF REM Print the users information LOCATE 2, 3 PRINT "Name :"; nam$ LOCATE 3, 3 PRINT "Money :"; money REM First Level loop x = 10 y = 110 REM Start the main loop DO REM Draw the people on the level CIRCLE (70, 300), 4, 0 LINE (70, 305)-(70, 315), 0 LINE (70, 315)-(65, 325), 0 LINE (70, 315)-(75, 325), 0 LINE (70, 305)-(63, 317), 0 LINE (70, 305)-(77, 317), 0 CIRCLE (300, 120), 4, 0 LINE (300, 125)-(300, 135), 0 LINE (300, 135)-(305, 145), 0 LINE (300, 135)-(295, 145), 0 LINE (300, 125)-(293, 137), 0 LINE (300, 125)-(307, 137), 0 CIRCLE (350, 400), 4, 0 LINE (350, 405)-(350, 415), 0 LINE (350, 415)-(355, 425), 0 LINE (350, 415)-(345, 425), 0 LINE (350, 405)-(343, 417), 0 LINE (350, 405)-(357, 417), 0 REM Draw the river LINE (101, 100)-(150, 300), 1, BF REM Draw the trees LINE (290, 330)-(310, 350), 6, BF CIRCLE (300, 300), 30, 0 PAINT (300, 300), 2, 0 LINE (190, 430)-(210, 450), 6, BF CIRCLE (200, 400), 30, 0 PAINT (200, 400), 2, 0 LINE (430, 380)-(450, 410), 6, BF CIRCLE (440, 350), 30, 0 PAINT (440, 350), 2, 0 LINE (490, 230)-(510, 250), 6, BF CIRCLE (500, 200), 30, 0 PAINT (500, 200), 2, 0 REM Set the object colision for the people IF x > 60 AND y > 275 AND y < 330 AND x < 100 THEN GOSUB firstperson: x = 60 IF x > 280 AND y > 100 AND y < 165 AND x < 327 THEN GOSUB thirdperson: x = 279 IF x > 330 AND y > 380 AND y < 455 AND x < 375 THEN GOSUB secondperson: x = 329 REM Keep the top screen up to date COLOR 15 LOCATE 3, 3 PRINT "Money :"; money LOCATE 4, 4 IF sword = 1 THEN PRINT CHR$(184) LOCATE 4, 8 IF sheild = 1 THEN PRINT CHR$(6) REM Draw The character CIRCLE (x, y), 4, 0 LINE (x, y + 5)-(x, y + 15), 0 LINE (x, y + 15)-(x + 5, y + 25), 0 LINE (x, y + 15)-(x - 5, y + 25), 0 LINE (x, y + 5)-(x - 7, y + 17), 0 LINE (x, y + 5)-(x + 7, y + 17), 0 REM The controls a$ = INKEY$ IF RIGHT$(a$, 1) = "P" THEN LINE (x, y + 5)-(x - 7, y + 17), 2: LINE (x, y + 5)-(x + 7, y + 17), 2: CIRCLE (x, y), 4, 2: LINE (x, y + 5)-(x, y + 15), 2: LINE (x, y + 15)-(x + 5, y + 25), 2: LINE (x, y + 15)-(x - 5, y + 25), 2: y = y + 1 IF RIGHT$(a$, 1) = "H" THEN LINE (x, y + 5)-(x - 7, y + 17), 2: LINE (x, y + 5)-(x + 7, y + 17), 2: CIRCLE (x, y), 4, 2: LINE (x, y + 5)-(x, y + 15), 2: LINE (x, y + 15)-(x + 5, y + 25), 2: LINE (x, y + 15)-(x - 5, y + 25), 2: y = y - 1 IF RIGHT$(a$, 1) = "K" THEN LINE (x, y + 5)-(x - 7, y + 17), 2: LINE (x, y + 5)-(x + 7, y + 17), 2: CIRCLE (x, y), 4, 2: LINE (x, y + 5)-(x, y + 15), 2: LINE (x, y + 15)-(x + 5, y + 25), 2: LINE (x, y + 15)-(x - 5, y + 25), 2: x = x - 1 IF RIGHT$(a$, 1) = "M" THEN LINE (x, y + 5)-(x - 7, y + 17), 2: LINE (x, y + 5)-(x + 7, y + 17), 2: CIRCLE (x, y), 4, 2: LINE (x, y + 5)-(x, y + 15), 2: LINE (x, y + 15)-(x + 5, y + 25), 2: LINE (x, y + 15)-(x - 5, y + 25), 2: x = x + 1 IF a$ = "v" THEN GOTO bottom IF y < 105 THEN y = 105 REM Object Colision for the river IF x > 95 AND y < 300 AND x < 150 THEN x = 95 IF x < 155 AND y < 300 AND x > 105 THEN x = 155 IF x < 155 AND x > 95 AND y < 307 THEN y = 307 REM castle and object colision IF fight = 1 THEN LINE (500, 400)-(580, 460), 8, BF IF fight = 1 AND x > 500 AND x < 580 AND y > 400 AND y < 460 THEN GOSUB terry LOOP GOTO menu REM The gosub for first person firstperson: COLOR 15 LOCATE 2, 30 PRINT "Hello, I am Joe the Traveler" SLEEP 2 LOCATE 2, 30 COLOR 0 PRINT "Hello I am Joe the Travelerr" COLOR 15 LOCATE 2, 30 PRINT "I have a task for you..." SLEEP 1 LOCATE 3, 30 PRINT "If you can sort these names into" LOCATE 4, 30 PRINT "alphabetical order then I will give" LOCATE 5, 30 PRINT "you a sword for your journey" SLEEP 3 COLOR 0 LOCATE 2, 30 PRINT "I have a task for you..." SLEEP 1 LOCATE 3, 30 PRINT "If you can sort these names into" LOCATE 4, 30 PRINT "alphabetical order then I will give" LOCATE 5, 30 PRINT "you a sword for your journey" SLEEP 5 GOSUB alphabet RETURN REM The gosub for alphabet alphabet: RESTORE COLOR 15 FOR x = 1 TO 4 READ nam$(x) LOCATE x + 1, 30 PRINT nam$(x) NEXT x LOCATE 6, 30 COLOR 15 INPUT "Spell alphabetical"; word1$ IF LEFT$(word1$, 12) = "alphabetical" THEN GOSUB alphabetize COLOR 0 IF LEFT$(word1$, 12) = "alphabetical" THEN RETURN FOR x = 1 TO 4 LOCATE x + 1, 30 PRINT nam$(x) NEXT x LOCATE 6, 30 PRINT "Spell alphabetical "; word1$ COLOR 15 LOCATE 2, 30: PRINT "You were wrong" SLEEP 3 COLOR 0 LOCATE 2, 30: PRINT "You were wrong" RETURN alphabetize: COLOR 0 FOR x = 1 TO 4 LOCATE x + 1, 30 PRINT nam$(x) NEXT x LOCATE 6, 30 PRINT "Spell alphabetical "; word1$ SLEEP 2 COLOR 15 FOR y = 1 TO 3 FOR x = 1 TO 3 IF nam$(x) > nam$(x + 1) THEN tnam$ = nam$(x + 1): nam$(x + 1) = nam$(x): nam$(x) = tnam$ END IF NEXT x NEXT y COLOR 15 FOR x = 1 TO 4 LOCATE x + 1, 30 PRINT nam$(x) NEXT x SLEEP 3 COLOR 0 FOR x = 1 TO 4 LOCATE x + 1, 30 PRINT nam$(x) NEXT x COLOR 15 LOCATE 6, 30 PRINT "Good Job, Here is your sword" SLEEP 2 COLOR 0 LOCATE 6, 30 PRINT "Good Job, Here is your sword" sword = 1 LOCATE 3, 4 COLOR 15 PRINT sword RETURN REM the gosub for second person secondperson: COLOR 15 LOCATE 2, 30 PRINT "Hello, I am John the Baker" SLEEP 2 COLOR 0 LOCATE 2, 30 PRINT "Hello, I am John the Baker" COLOR 15 LOCATE 2, 30 PRINT "I need help searching the phone book." LOCATE 3, 30 PRINT "I need you to search for everyone whose " LOCATE 4, 30 PRINT "name starts with an a." SLEEP 3 COLOR 0 LOCATE 2, 30 PRINT "I need help searching the phone book." LOCATE 3, 30 PRINT "I need you to search for everyone whose " LOCATE 4, 30 PRINT "name starts with an a." COLOR 15 LOCATE 2, 30 PRINT "Just type in a capitol a." SLEEP 2 LOCATE 3, 30 INPUT "Type that a here_", a$ IF a$ = "A" THEN GOSUB sort IF a$ = "A" THEN RETURN SLEEP 1 COLOR 0 LOCATE 2, 30 PRINT "Just type in a capitol a." LOCATE 3, 30 PRINT "Type that a here_ "; a$ SLEEP 1 COLOR 15 RETURN REM the gosub for third person thirdperson: COLOR 15 LOCATE 2, 30 PRINT "Hello, I am Max the Fighter" SLEEP 2 COLOR 0 LOCATE 2, 30 PRINT "Hello, I am Max the Fighter" fight = 1 COLOR 15 LOCATE 2, 30 PRINT "Watch this" FOR x = 1 TO 3 LOCATE x + 2, 30 PRINT x total = x + total NEXT x LOCATE 6, 30 PRINT "Total"; total SLEEP 3 COLOR 0 FOR x = 1 TO 3 LOCATE x + 2, 30 PRINT x total = total + x NEXT x LOCATE 6, 30 PRINT "Total "; total COLOR 15 LOCATE 2, 30 PRINT "Now we will fight" SLEEP 1 LOCATE 3, 30 PRINT "He swings his sword" SLEEP 1 LOCATE 4, 30 PRINT "You block it with your sheild" SLEEP 1 LOCATE 5, 30 PRINT "You use your sword to end the fight" SLEEP 1 LOCATE 6, 30 PRINT "You win the fight" SLEEP 2 COLOR 0 LOCATE 2, 30 PRINT "Now we will fight" LOCATE 3, 30 PRINT "He swings his sword" LOCATE 4, 30 PRINT "You block it with your sheild" LOCATE 5, 30 PRINT "You use your sword to end the fight" LOCATE 6, 30 PRINT "You win the fight" RETURN sort: COLOR 15 FOR x = 1 TO 4 READ name$(x) READ phnum$(x) LOCATE x + 1, 30 PRINT name$(x), phnum$(x) NEXT x SLEEP 2.5 COLOR 0 FOR x = 1 TO 4 LOCATE x + 1, 30 PRINT name$(x), phnum$(x) NEXT x COLOR 15 FOR x = 1 TO 4 IF LEFT$(name$(x), 1) = "A" THEN LOCATE x + 1, 30: PRINT name$(x), phnum$(x) NEXT x SLEEP 2.5 LOCATE 6, 30 PRINT "Thank You" SLEEP 2 COLOR 0 FOR x = 1 TO 4 IF LEFT$(name$(x), 1) = "A" THEN LOCATE x + 1, 30: PRINT name$(x), phnum$(x) NEXT x SLEEP 2.5 LOCATE 6, 30 PRINT "Thank You" sheild = 1 RETURN DATA Joe,Sue,Bob,Kelly DATA Albert,256-4520 DATA John,441-4312 DATA Alex,857-3542 DATA Bob,432-9228 REM The gosub for terry terry: LOCATE 2, 25 PRINT "Good Job, the shield you have is the sheild of terry" LOCATE 3, 30 PRINT "But you can keep it" LOCATE 4, 30 PRINT "Game over" SLEEP 3 CLS GOTO next1 REM the gosub for controls controls: CLS PRINT "Just use the arrow keys to move around the world." PRINT "Also, remember to approach people slowly, because you" PRINT "might miss some of their conversation." LOCATE 8, 20 PRINT "Press the space bar to continue." SLEEP 5 GOTO next1 bottom: