SCREEN 12 KEY(12) ON BEEP LET garenax = 79 LET garenay = 22 LET crystalx = 77 LET crystaly = 20 LET herolevel = 1 LET herohealth = 5 LET battlechoice = 0 LET totalherohealth = 5 LET encounterRate = 10 DIM monsterpic$(3) DIM monsternames$(3) DIM herohealthcolordef(5) DIM minfo(5, 5) LET exitx = 40 LET exity = 20 LET switchx = 25 LET switchy = 16 LET switch2x = 13 LET switch2y = 13 LET playerexp = 0 htargetx = switch2x htargety = switch2y DIM landscape(garenax, garenay) DIM symbol$(3) DIM symbolcolor(3) LET location = 1 LET flagger = 0 LET con1 = 0 LET con2 = 0 LET con3 = 0 LET con4 = 0 1001 CLS PRINT "QUEST FOR THE CRYSTALS 1.0(final)" PRINT "by Troy Lawlor and Dan Bruington" PRINT PRINT "You awake one morning, to find that your peaceful" PRINT "world, Algebrania, is under attack by the evil" PRINT "Mathacons, minions of the great mistress of Math," PRINT "the terrible Petersonian! They have shattered the" PRINT "great crystal of knowledge into four pieces: the" PRINT "crystals of fire, earth, wind, and ice!" PRINT "Knowing that only you, with your mathematics skills," PRINT "can defeat the evil Mathacons, you climb into your" PRINT "plane, the Daisy, and take off!" PRINT "You must colllect the four crystals, and use their" PRINT "combined powers to unlock the Chamber of Evil," PRINT "where you can face Petersonian and save the world!" PRINT PRINT "------" PRINT "If this is your first time playing, you should visit" PRINT "Helpful Herbert in the Town Square to learn more" PRINT "about the game and how to play it!" PRINT INPUT "Do you want to 1) Start a New Adventure or 2) Load Game or 3) Exit Game"; startchoice IF (startchoice <> 1) AND (startchoice <> 2) AND (startchoice <> 3) AND (startchoice <> 314) THEN PRINT "Invalid choice!": INPUT "Press return and choose a REAL one"; face: GOTO 1001 IF (startchoice = 1) THEN GOTO 7000 IF (startchoice = 2) THEN GOSUB sLoadDan IF (startchoice = 3) THEN PRINT "Thanks for playing. Goodbye.": END IF (startchoice = 314) THEN GOSUB scheatStart 7000 GOSUB worldChoice GOSUB sGenerateWorld somethingmoved = 1 LET herox = 1 LET heroy = 1 WHILE done = 0 curinput$ = INKEY$ IF somethingmoved = 1 THEN CLS : GOSUB sRedrawScreen: somethingmoved = 0 IF (curinput$ = "s") THEN d = 3: somethingmoved = 1 ELSE IF (curinput$ = "d") THEN d = 2: somethingmoved = 1 ELSE IF (curinput$ = "w") THEN d = 1: somethingmoved = 1 ELSE IF (curinput$ = "a") THEN d = 0: somethingmoved = 1 ELSE IF (curinput$ = "p") THEN GOTO 7000 ELSE IF (curinput$ = "h") THEN GOSUB sHeal ELSE IF (curinput$ = "i") THEN GOSUB sInventory IF d = 0 THEN GOSUB sML ELSE IF d = 1 THEN GOSUB sMU ELSE IF d = 2 THEN GOSUB sMR ELSE IF d = 3 THEN GOSUB sMD d = 16 WEND PRINT "The End." sML: IF (herox > 1) AND (landscape(herox - 1, heroy) = 0) THEN herox = herox - 1 IF (INT(RND * encounterRate) = 1) THEN GOTO sFightMonster IF (herox = crystalx) AND (heroy = crystaly) THEN GOSUB grabCrystal RETURN sMU: IF (heroy > 1) AND (landscape(herox, heroy - 1) = 0) THEN heroy = heroy - 1 IF (INT(RND * encounterRate) = 1) THEN GOTO sFightMonster IF (herox = crystalx) AND (heroy = crystaly) THEN GOSUB grabCrystal RETURN sMR: IF (herox < garenax - 1) AND (landscape(herox + 1, heroy) = 0) THEN herox = herox + 1 IF (INT(RND * encounterRate) = 1) THEN GOTO sFightMonster IF (herox = crystalx) AND (heroy = crystaly) THEN GOSUB grabCrystal RETURN sMD: IF (heroy < garenay - 1) AND (landscape(herox, heroy + 1) = 0) THEN heroy = heroy + 1 IF (INT(RND * encounterRate) = 1) THEN GOTO sFightMonster IF (herox = crystalx) AND (heroy = crystaly) THEN GOSUB grabCrystal RETURN sFightMonster: CLS LET curMonHP = monsterhp LET monstertype = INT(RND * 3) LET tempherox = INT(RND * 30) LET tempheroy = INT(RND * 10) 110 LET tempmonsterx = INT(RND * 40) IF (tempmonsterx = tempherox) THEN GOTO 110 120 LET tempmonstery = INT(RND * 10) IF (tempmonstery = tempheroy) AND (tempheroy! = 0 AND tempherox! = 0) THEN GOTO 120 PRINT "You have been encountered by a "; monstername$(monstertype) FOR y = 0 TO 10 FOR x = 0 TO 50 GOSUB sTempDraw NEXT x PRINT NEXT y battlechoice = 0 battletype = INT(RND * 6) PRINT 9876 PRINT "You have been attacked, what do you do?" PRINT "You can: 1) Fight the battle" IF (battletype = 0) THEN PRINT "Or: 2) Run Away" IF (potions > 0) THEN PRINT "Or: 3) Throw a potion to kill it" INPUT "What do you want to do?", battlechoice IF (battlechoice = 2) AND (battletype = 0) THEN GOSUB sRedrawScreen: RETURN IF battlechoice = 3 AND potions > 0 THEN PRINT : PRINT "You potion splatters across the creature, killing it and gaining experience.": potions = potions - 1: PRINT : playerexp = playerexp + location + 1: IF (playerexp > (herolevel * 4)) THEN PRINT "You have also gained a level!": herolevel = herolevel + 1: herohealth = 5 + herolevel: playerexp = 0: INPUT "Press return"; pp: GOSUB sRedrawScreen: RETURN ELSE INPUT "Press return"; pp: GOSUB sRedrawScreen: RETURN 40 LET rNum1 = INT(RND * difficulty) 50 LET rNum2 = INT(RND * difficulty) IF (rNum1 = 0) THEN GOTO 40 IF (rNum2 = 0) THEN GOTO 50 PRINT PRINT "The "; monstername$(monstertype); " asks you..."; 60 LET tempRandom = INT(RND * difficulty) IF (tempRandom = 0) THEN GOTO 60 TIMER ON ON TIMER(5) GOSUB sTooMuchTime IF (location = 0) THEN PRINT "what is "; rNum1; "+"; rNum2; : answer = rNum1 + rNum2: INPUT iAnswer IF (location = 1) THEN PRINT "what is "; rNum1; "-"; rNum2; : answer = rNum1 - rNum2: INPUT iAnswer IF (location = 2) THEN PRINT "what is "; rNum1; "*"; rNum2; : answer = rNum1 * rNum2: INPUT iAnswer IF (location = 3) THEN rNum2 = rNum1 * tempRandom: PRINT "what is "; rNum2; "/"; rNum1; : answer = rNum2 / rNum1: INPUT iAnswer TIMER OFF IF iAnswer = answer THEN PRINT "You were correct and whacked the monster good!": curMonHP = curMonHP - INT(RND * (herolevel + 1)) IF curMonHP < 1 THEN PRINT "You are victorious": playerexp = playerexp + location + 1: IF (playerexp > (herolevel * 4)) THEN PRINT "You have also gained a level!": herolevel = herolevel + 1: herohealth = 5 + herolevel: playerexp = 0: INPUT "Press return"; pp: RETURN: ELSE IF (1 = 1) THEN INPUT "Press return"; pp: RETURN IF iAnswer <> answer THEN PRINT "You have answered wrong and were hit." IF iAnswer <> answer THEN herohealth = herohealth - 1: PRINT "You now have: "; herohealth; " health points" IF (herohealth < 1) THEN GOSUB sDie IF curMonHP > 0 THEN GOTO 40: RETURN GOTO 40 RETURN sTooMuchTime: PRINT "You took too long and were hit!" BEEP herohealth = herohealth - 1 PRINT "You now have: "; herohealth; " health points" IF (herohealth = 0) THEN GOSUB sDie LET tooMuchTime = 1 RETURN sDie: CLS PRINT "YOU HAVE BEEN KNOCKED UNCONCIOUS." PRINT "You lost the game. Sorry! Play again!" END RETURN sTempDraw: IF (x = 0) OR (x = 50) OR (y = 0) OR (y = 10) THEN COLOR 7: PRINT "œ"; : flagger = 1 IF (x = tempherox) AND (y = tempheroy) THEN COLOR 9: PRINT "Ë"; : flagger = 1 IF (x = tempmonsterx) AND (y = tempmonstery) THEN COLOR 12: PRINT monsterpic$(monstertype); : flagger = 1 IF (flagger = 0) THEN COLOR symbolcolor(0): PRINT symbol$(0); flagger = 0 RETURN sRedrawScreen: FOR y = 0 TO garenay FOR x = 0 TO garenax IF (x = 0) OR (x = garenax) OR (y = 0) OR (y = garenay) THEN COLOR 7: PRINT "œ"; ELSE IF (x = crystalx AND y = crystaly) THEN COLOR 11: PRINT ""; ELSE IF x = herox AND y = heroy THEN COLOR 9: PRINT "Ë"; ELSE IF landscape(x, y) = 0 THEN COLOR symbolcolor(0): PRINT symbol$(0); ELSE IF landscape(x, y) = 1 THEN COLOR symbolcolor(3): PRINT symbol$(3); ELSE IF landscape(x, y) = 2 THEN COLOR symbolcolor(2): PRINT symbol$(2); ELSE IF landscape(x, y) = 3 THEN COLOR symbolcolor(1): PRINT symbol$(1); NEXT x PRINT NEXT y COLOR 7 PRINT "Health:"; COLOR 15 PRINT herohealth; COLOR 7 PRINT " Level:"; COLOR 15 PRINT herolevel; COLOR 7 PRINT "Potions:"; COLOR 15 PRINT potions; RETURN sGenerateWorld: IF (location = 0) THEN LET sparse = 90: symbol$(0) = "ƒ": symbol$(1) = "": symbol$(2) = "È": symbol$(3) = "*": symbolcolor(0) = 2: symbolcolor(1) = 10: symbolcolor(2) = 8: symbolcolor(3) = 2: encounterRate = 10: monstername$(0) = "Radical": monstername$(1) = "Formulor": monstername$(2) = "Algebor": monstername$(3) = "Trinomia": monsterpic$(0) = "š": monsterpic$(1) = "p": monsterpic$(2) = "ý": monsterpic$(3) = "‹" IF (location = 1) THEN LET sparse = 150: symbol$(0) = "ƒ": symbol$(1) = "&": symbol$(2) = "õ": symbol$(3) = "*": symbolcolor(0) = 14: symbolcolor(1) = 10: symbolcolor(2) = 2: symbolcolor(3) = 7: encounterRate = 9: monstername$(0) = "Subtracticon": monstername$(1) = "Sine": monstername$(2) = "Functionator": monstername$(3) = "Axis": monsterpic$(0) = "-": monsterpic$(1) = "È": monsterpic$(2) = "î": monsterpic$(3) = "‰" IF (location = 2) THEN LET sparse = 160: symbol$(0) = ".": symbol$(1) = "@": symbol$(2) = "0": symbol$(3) = "": symbolcolor(0) = 11: symbolcolor(1) = 15: symbolcolor(2) = 15: symbolcolor(3) = 5: encounterRate = 8: monstername$(0) = "Isoceles": monstername$(1) = "Integor": monstername$(2) = "Cosine": monstername$(3) = "Isometrix": monsterpic$(0) = "Æ": monsterpic$(1) = "i": monsterpic$(2) = "Ì": monsterpic$(3) = "µ" IF (location = 3) THEN LET sparse = 80: symbol$(0) = "ƒ": symbol$(1) = "±": symbol$(2) = "ù": symbol$(3) = "Ï": symbolcolor(0) = 8: symbolcolor(1) = 4: symbolcolor(2) = 6: symbolcolor(3) = 6: encounterRate = 7: monstername$(0) = "Tangent": monstername$(1) = "Fractal": monstername$(2) = "Logarithicator": monstername$(3) = "Matricon": monsterpic$(0) = "ß": monsterpic$(1) = "—": monsterpic$(2) = "í": monsterpic$(3) = "·" FOR y = 0 TO garenay FOR x = 0 TO garenax tempchooser = INT(RND * sparse) + 1 IF (tempchooser < (sparse - 5)) THEN landscape(x, y) = 0 ELSE IF (tempchooser = (sparse - 5)) THEN landscape(x, y) = 1 ELSE IF (tempchooser = (sparse - 4)) THEN landscape(x, y) = 2 ELSE IF (tempchooser > (sparse - 4)) THEN landscape(x, y) = 3 NEXT x NEXT y landscape(77, 20) = 0 RETURN worldChoice: RANDOMIZE TIMER CLS location = 0 PRINT "You climb in your airplane, The Daisy, and lift off into the air. Where will" PRINT "you go next?" PRINT PRINT "Choices:" IF con1 = 0 THEN PRINT "0) Pinecone's Forest" IF con2 = 0 THEN PRINT "1) Kingdom of Sandface" IF con3 = 0 THEN PRINT "2) Frosty's Domain" IF con4 = 0 THEN PRINT "3) Lair of Magmar" COLOR 1 PRINT "4) Tinker's Shop" COLOR 13 PRINT "5) Town Square" COLOR 10 PRINT "6) Save Game" IF con1 = 1 AND con2 = 1 AND con3 = 1 AND con4 = 1 THEN COLOR 4: PRINT "7) The Chamber of Evil" ELSE COLOR 8: PRINT "7) The Chamber of Evil(not enough crystals)" COLOR 15 PRINT "8) End Adventure" PRINT INPUT "What's your choice"; uchoice IF (con1 = 1 AND uchoice = 0) OR (con2 = 1 AND uchoice = 1) OR (con3 = 1 AND uchoice = 2) OR (con4 = 1 AND uchoice = 3) OR uchoice > 8 OR (uchoice = 7 AND (con1 + con2 + con3 + con4) <> 4) THEN PRINT "You cannot go there. Sorry!": INPUT "Press return"; peepeed: GOSUB worldChoice location = uchoice IF (location = 0) THEN difficulty = 15: monsterhp = 4 IF (location = 1) THEN difficulty = 10: monsterhp = 4 IF (location = 2) THEN difficulty = 12: monsterhp = 4 IF (location = 3) THEN difficulty = 12: monsterhp = 4 IF uchoice = 4 THEN GOSUB sTinker IF uchoice = 5 THEN GOSUB sTown IF uchoice = 6 THEN GOSUB sDanSave IF uchoice = 7 THEN GOSUB finalBattle IF uchoice = 8 THEN PRINT "Goodbye. Play again!": END RETURN sTown: CLS PRINT "You fly to the Town Square of Calculville. You see" PRINT "many people busily crunching math equations because" PRINT "the mayor, being a rich madman, has decided to" PRINT "provide food and shelter for all of his citizens" PRINT "on the condition they spend all of their time" PRINT "learning more about math." PRINT PRINT "You see many buildings on the street, each with a" PRINT "different sign:" PRINT PRINT "1) Addition Master" PRINT "2) Subtraction Master" PRINT "3) Multiplication Master" PRINT "4) Division Master" PRINT "5) Helpful Herbert" PRINT "6) Town Gate (exit back to the Daisy)" PRINT PRINT "You realize that each building houses a master," PRINT "who, when you enter, will give advice about" PRINT "the subject written on their sign. Where would you" PRINT "like to go?" PRINT INPUT "What is your choice"; face2 IF (face2 < 1) AND (face2 > 5) THEN INPUT "Press return and try a REAL choice"; p: GOSUB sTown IF (face2 = 1) THEN GOSUB addguy IF (face2 = 2) THEN GOSUB subguy IF (face2 = 3) THEN GOSUB mulguy IF (face2 = 4) THEN GOSUB divguy IF (face2 = 5) THEN GOSUB helpguy IF (face2 = 6) THEN GOTO 7000 GOTO 7000 helpguy: CLS PRINT "Helpful Herbert, a small man with a pointed nose," PRINT "looks at you excitedly." PRINT IF (herbseen = 0) THEN PRINT "HERBERT: You! You're the one the king said could" IF (herbseen = 0) THEN PRINT "defeat the Mathacons and defeat Petersonian!" IF (herbseen = 0) THEN PRINT "I will help you in any way that I can!" PRINT PRINT "You can only think of these things to say:" COLOR 9: PRINT "1) What can you tell me about each of the kingdoms?" COLOR 9: PRINT "2) How can I move around in or get out of the kingdoms?" COLOR 9: PRINT "3) How do I find the crystal?" COLOR 9: PRINT "4) What happens if I get attacked by a Mathacon?" COLOR 9: PRINT "5) I don't need any help right now, but thanks!" herbseen = 1 COLOR 15: INPUT "What do you say?"; herbchoice IF (herbchoice < 1) OR (herbchoice > 5) THEN INPUT "Try a real choice, please"; asdha: GOSUB helpguy IF (herbchoice = 1) THEN GOSUB helpkingdoms IF (herbchoice = 2) THEN GOSUB helpcontrols IF (herbchoice = 3) THEN GOSUB helpcrystal IF (herbchoice = 4) THEN GOSUB helpbattle IF (herbchoice = 5) THEN GOSUB sTown helpkingdoms: CLS PRINT "YOU: What can you tell me about each of the kingdoms?" PRINT PRINT "HERBERT: Well, first there is Pinecone's Forest, a" PRINT "massive forest where the Mathacons sent their" PRINT "Addition Force, truly a nasty bunch of monsters." PRINT "Next there's the Kingdom of Sandface, a hostile" PRINT "desert where the Mathacon Subtraction Corps now" PRINT "resides, hiding and surprise-attacking travellers!" PRINT "After that, it gets more dangerous: Frosty's" PRINT "Domain is an icy mountain which the Multiplicator" PRINT "segment of the Mathacons now control." PRINT "Finally, the Lair of Magmar is a massive volcano" PRINT "in which the Mathacon's Divisionizer Force lies" PRINT "in wait ... for you!" PRINT INPUT "YOU: Ok, can I ask you something else"; agskdh: GOSUB helpguy helpcontrols: CLS PRINT "YOU: How can I move around in or get out of the kingdoms?" PRINT PRINT "HERBERT: When you arrive in any of the kingdoms, you" PRINT "will be in the upperleft portion of your screen," PRINT "and you will look like this:"; COLOR 9: PRINT "Ë" COLOR 15: PRINT "You can move around the area by using the keys" PRINT "W (for up), S (for down), A (for left), and D (for right)." PRINT "" PRINT "You can also press 'P' on your keyboard, which will" PRINT "call the Daisy with your translocator, allowing you" PRINT "to leave the area (but, if you go back, you'll be" PRINT "in the upper left again!) Hitting 'I' will let you" PRINT "see what items you are holding, and hitting 'H' will" PRINT "let you drink one of Tinker's magical potions!" PRINT INPUT "YOU: Ok, can I ask you something else"; agskdh: GOSUB helpguy helpcrystal: CLS PRINT "YOU: How do I find the crystal?" PRINT PRINT "HERBERT: Ahh, yes, of course, the crystal!" PRINT "Whenever you are in a kingdom, if you look in the" PRINT "lower right corner of the map, you will see this:" COLOR 9: PRINT "" COLOR 15: PRINT "That is the crystal! To pick it up, move onto the" PRINT "same space as the crystal, it's as simple as that!" PRINT INPUT "YOU: Ok, can I ask you something else"; agskdh: GOSUB helpguy helpbattle: CLS PRINT "YOU: What happens if I get attacked by a Mathacon?" PRINT PRINT "HERBERT: Whenever you are in a kingdom, you will" PRINT "most likely get attacked by a Mathacon occaisionally." PRINT "The Mathacons have few weaknesses, and, as you probably" PRINT "already know, they will attack you by asking you math" PRINT "questions. If you answer incorrectly, they will strike" PRINT "you! Take too many hits, and you'll fall unconscious," PRINT "and the world will be lost! However, if you answer" PRINT "correctly, you'll daze the beast, allowing you to strike" PRINT "it! After you have defeated a couple of the foul beings," PRINT "you may gain a level, allowing you to both do more damage" PRINT "and take more, since your health will increase!" PRINT "Occaisionally, you may find yourself in a situation which" PRINT "allows you to run away from a battle. Also, a strange" PRINT "property of Tinker's potions allows you to instantly kill" PRINT "one of the Mathacons, without having to attack it, by" PRINT "throwing a potion on it!" PRINT INPUT "YOU: Ok, can I ask you something else"; agskdh: GOSUB helpguy addguy: CLS PRINT "The Addition Master eyes you carefully and proceeds" PRINT "to spit out answer after answer to addition problems:" PRINT FOR y = 0 TO 11 FOR x = 0 TO 3 LET rnd1 = INT(RND * 10) + 2 LET rnd2 = INT(RND * 10) + 2 PRINT rnd1; IF (rnd1 < 10) THEN PRINT " "; PRINT "+"; PRINT rnd2; IF (rnd2 < 10) THEN PRINT " "; PRINT "="; PRINT rnd1 + rnd2; IF (rnd1 + rnd2 < 10) THEN PRINT " "; PRINT " "; NEXT x PRINT PRINT NEXT y PRINT INPUT "Press return to go back to Town Square"; p GOSUB sTown subguy: CLS PRINT "The Subtraction Master coughs coldly before squeezing" PRINT "his hands into tight balls and rattling off answers" PRINT "to subtraction problems:" PRINT FOR y = 0 TO 10 FOR x = 0 TO 3 LET rnd1 = INT(RND * 10) + 2 LET rnd2 = INT(RND * 10) + 2 PRINT rnd1; IF (rnd1 < 10) THEN PRINT " "; PRINT "-"; PRINT rnd2; IF (rnd2 < 10) THEN PRINT " "; PRINT "="; PRINT rnd1 - rnd2; IF (rnd1 - rnd2 < 10) THEN PRINT " "; PRINT " "; NEXT x PRINT PRINT NEXT y PRINT INPUT "Press return to go back to Town Square"; p GOSUB sTown mulguy: CLS PRINT "The Mutliplication Master giggles like an eccentric" PRINT "while he holds up a Multiplication table etched" PRINT "into a bearskin:" PRINT LET rnd1 = 2 LET rnd2 = 2 LET magicNum = 2 FOR mag = 1 TO 3 FOR y = 0 TO 10 FOR x = 0 TO 3 PRINT rnd1; IF (rnd1 < 10) THEN PRINT " "; PRINT "*"; PRINT rnd2; IF (rnd2 < 10) THEN PRINT " "; PRINT "="; PRINT rnd1 * rnd2; IF (rnd1 * rnd2 < 10) THEN PRINT " "; IF (rnd1 * rnd2 < 100) THEN PRINT " "; PRINT " "; LET rnd1 = rnd1 + 1 NEXT x LET rnd1 = magicNum LET rnd2 = rnd2 + 1 PRINT NEXT y PRINT LET magicNum = magicNum + 4 LET rnd2 = 2 LET rnd1 = rnd1 + 4 IF (magicNum < 13) THEN INPUT "Press return to see the next skin"; po PRINT NEXT mag INPUT "Press return to go back to the Town Square"; p GOSUB sTown divguy: CLS PRINT "The Division Master strokes his beard(which is" PRINT "entirely too long) for a full six minutes before" PRINT "holding up a giant Division table made out of" PRINT "a stone with rat bones shaping the numbers:" PRINT LET counter = 1 LET rnd2 = 1 LET magNum = 1 FOR magic = 0 TO 2 FOR y = 0 TO 12 FOR x = 0 TO 3 LET rnd2 = rnd2 + 1 LET rnd1 = rnd2 * counter PRINT rnd1; IF (rnd1 < 10) THEN PRINT " "; IF (rnd1 < 100) THEN PRINT " "; PRINT "/"; PRINT rnd2; IF (rnd2 < 10) THEN PRINT " "; PRINT "="; PRINT rnd1 / rnd2; IF (rnd1 / rnd2 < 10) THEN PRINT " "; PRINT " "; NEXT x LET counter = counter + 1 LET rnd2 = magNum PRINT NEXT y LET counter = 1 LET magNum = magNum + 4 LET rnd2 = magNum IF (magNum < 13) THEN INPUT "Press return to see the next page of tablet"; po PRINT NEXT magic INPUT "Press return to go back to the Town Square"; p GOSUB sTown sTinker: CLS PRINT "You fly to Tinker's Magic Potion Shop. Here you can" PRINT "answer math questions in order to gain potions." PRINT "You enter the shop, to see Tinker's smiling face." PRINT PRINT "TINKER: Welcome to my shop!" PRINT "TINKER: If you miss a question, I boot you out and hit you!" PRINT "TINKER: If you answer all of my questions right... I'll give" PRINT "TINKER: you a potion of love, which will heal you if you press" PRINT "TINKER: 'h' while walking about in an area. If you're in" PRINT "TINKER: combat with one of Petersonian's nefarious beasts" PRINT "TINKER: you can type 'h' in answer to a question to " PRINT "TINKER: toss one of your potions onto the beast, killing" PRINT "TINKER: it instantly." IF (potions > 4) THEN PRINT "TINKER: Wait a second! You have five potions, and cannot carry anymore! Later!": INPUT "Press Return"; poana: GOTO 7000 tinkerquestions = 0 INPUT "Press return when you are ready"; pppp difficulty = 5 4000 LET rNum1 = INT(RND * difficulty) 5000 LET rNum2 = INT(RND * difficulty) IF (rNum1 = 0) THEN GOTO 4000 IF (rNum2 = 0) THEN GOTO 5000 PRINT PRINT "Tinker asks you:"; 6000 LET tempRandom = INT(RND * difficulty) IF (tempRandom = 0) THEN GOTO 6000 location = INT(RND * 4) IF (location = 0) THEN difficulty = (10 + herolevel): monsterhp = 4 IF (location = 1) THEN difficulty = (10 + herolevel): monsterhp = 4 IF (location = 2) THEN difficulty = 9: monsterhp = 4 IF (location = 3) THEN difficulty = 9: monsterhp = 4 IF (location = 0) THEN PRINT "what is "; rNum1; "+"; rNum2; : answer = rNum1 + rNum2: INPUT iAnswer IF (location = 1) THEN PRINT "what is "; rNum1; "-"; rNum2; : answer = rNum1 - rNum2: INPUT iAnswer IF (location = 2) THEN PRINT "what is "; rNum1; "*"; rNum2; : answer = rNum1 * rNum2: INPUT iAnswer IF (location = 3) THEN rNum2 = rNum1 * tempRandom: PRINT "what is "; rNum2; "/"; rNum1; : answer = rNum2 / rNum1: INPUT iAnswer IF iAnswer = answer THEN PRINT "TINKER: Correct!": tinkerquestions = tinkerquestions + 1 IF iAnswer <> answer THEN PRINT "You have answered wrong, and have been booted back to the daisy! The Tinker hit your face while you were leaving and you lost 1 point of health.": herohealth = herohealth - 1: IF (herohealth < 1) THEN GOSUB sDie ELSE INPUT "Press return.", pppppppppppp: GOTO 7000 IF tinkerquestions = 10 THEN GOSUB getHealth IF (1 = 1) THEN GOTO 4000 getHealth: CLS PRINT "TINKER: Great job! You have earned this health potion..." COLOR 3 PRINT "You have recieved a health potion!" COLOR 15 INPUT "Press return to add the health potion to your inventory!", ppppppppppppppppp potions = potions + 1 GOTO 7000 sHeal: CLS IF (potions > 0) THEN PRINT "You have consumed one of the Tinker's wonderous potions."; ELSE PRINT "You have no mystical potions. Visit the Tinker.": INPUT "Press return to continue on your quest"; krd: GOSUB sRedrawScreen: RETURN IF (herohealth < herolevel + 4) THEN PRINT "You have gained 1 point of health from the Tinker's magical potion of healing."; herohealth = herohealth + 1 ELSE PRINT "You throw up the potion all over the ground. You already feel at full health." potions = potions - 1 INPUT "Press return to continue on your quest"; krd: GOSUB sRedrawScreen RETURN sDanSave: CLS PRINT "You fly to the island of the Oracle, to tell them your story." PRINT " " PRINT "ORACLE OF LIFE: You must listen well to the number I say," PRINT "for it shall be the key to remembering your progress." PRINT "Write down the number I say!" PRINT " " seedrand = INT(RND * 8) + 1 savehealth = (herohealth * seedrand) + 3 savelevel = (herolevel * seedrand) + 8 savepotions = potions + 1 seedrandS$ = MID$(STR$(seedrand), 2, 1) IF (savehealth > 99) THEN savehealthS$ = MID$(STR$(savehealth), 2, 3) ELSE savehealthS$ = "0" + MID$(STR$(savehealth), 2, 3) savepotions$ = MID$(STR$(savepotions), 2, 1) IF (savelevel > 99) THEN savelevelS$ = MID$(STR$(savelevel), 2, 3) ELSE savelevelS$ = "0" + MID$(STR$(savelevel), 2, 3) savecrystal1$ = MID$(STR$((con1 + 3)), 2, 1) savecrystal2$ = MID$(STR$((con2 + 5)), 2, 1) savecrystal3$ = MID$(STR$((con3 + 1)), 2, 1) savecrystal4$ = MID$(STR$((con4 + 4)), 2, 1) checknum = (con1 + con2 + con3 + con4) * seedrand IF (checknum > 9) THEN checksum$ = MID$(STR$(checknum), 2, 2) ELSE checksum$ = "0" + MID$(STR$(checknum), 2, 2) PRINT "ORACLE OF LIFE:", seedrandS$; savehealthS$; savepotions$; savelevelS$; savecrystal1$; savecrystal2$; savecrystal3$; savecrystal4$; checksum$ PRINT " " PRINT "That is your story, remember it well!" INPUT "Press return"; bhahahhha GOTO 7000 sLoadDan: CLS PRINT "You fly to the island of the Oracle, to tell it your story." PRINT " " PRINT "ORACLE OF LIFE: You must remind me of your story," PRINT "for I have forgotten who you are! Tell me the number I" PRINT "told you to remember before! Beware, telling me the" PRINT "wrong thing could result in your destruction... FOREVER!" PRINT " " INPUT "You say"; loadstring$ IF ((con1 + con2 + con3 + con4) * loadseed) <> checknum THEN PRINT "The Oracle does not recognize you. Try again.": INPUT "Press return to go back to the main screen"; nana: GOTO 1001 PRINT "The Oracle remembers you. You may continue on your quest as you last were." loadseed = VAL(MID$(loadstring$, 1, 1)) loadhealth = VAL(MID$(loadstring$, 2, 3)) loadpotions = VAL(MID$(loadstring$, 5, 1)) loadlevel = VAL(MID$(loadstring$, 6, 3)) herohealth = ((loadhealth - 3) / loadseed) herolevel = ((loadlevel - 8) / loadseed) potions = (loadpotions - 1) con1 = (VAL(MID$(loadstring$, 9, 1)) - 3) con2 = (VAL(MID$(loadstring$, 10, 1)) - 5) con3 = (VAL(MID$(loadstring$, 11, 1)) - 1) con4 = (VAL(MID$(loadstring$, 12, 1)) - 4) checknum = (VAL(MID$(loadstring$, 13, 2))) INPUT "Press Return"; panana GOTO 7000 scheatStart: CLS PRINT "You are officially a cheater. But hey, what do you care?" PRINT "Of course, liars and cheaters go hand in hand. But" PRINT "you're probably seeking a life of crime or perhaps" PRINT "you're thinking about becoming a politician and this" PRINT "is just practice for your evil ways." PRINT "" INPUT "Press return to cheat"; cheatersneverwin herohealth = 99 herolevel = 99 potions = 5 con1 = 0 con2 = 1 con3 = 1 con4 = 1 GOTO 7000 grabCrystal: CLS PRINT "You have picked up a crystal of power!!!" PRINT "You hop back into your plane, Daisy, and lift off into the air" PRINT "for more adventure." PRINT "When you have all the crystals, you will be able to face" PRINT "the ultimate monster, the Petersonian! Mistress of all that is evil!" INPUT "Press return to continue"; pppp IF location = 0 THEN con1 = 1 IF location = 1 THEN con2 = 1 IF location = 2 THEN con3 = 1 IF location = 3 THEN con4 = 1 GOTO 7000 RETURN finalBattle: CLS PRINT "You insert the crystals into the chamber of evil and unleash the" PRINT "horrible creature that is... Petersonian!!!" INPUT "Press return when ready"; ppppppp CLS LET difficulty = 12 LET curMonHP = 80 LET monstertype = 0 LET monsterpic$(0) = "" LET tempherox = INT(RND * 30) LET tempheroy = INT(RND * 10) 1100 LET tempmonsterx = INT(RND * 40) IF (tempmonsterx = tempherox) THEN GOTO 1100 1200 LET tempmonstery = INT(RND * 10) LET sparse = 80: symbol$(0) = "ƒ": symbol$(1) = "±": symbol$(2) = "ù": symbol$(3) = "Ï": symbolcolor(0) = 8: symbolcolor(1) = 4: symbolcolor(2) = 6: symbolcolor(3) = 6: encounterRate = 7: monstername$(0) = "Tangent": monstername$(1) = "Fractal" IF (tempmonstery = tempheroy) THEN GOTO 1200 PRINT "You have been encountered by the mistress of evil... Petersonian!" FOR y = 0 TO 10 FOR x = 0 TO 50 GOSUB sTempDraw NEXT x PRINT NEXT y 400 LET rNum1 = INT(RND * difficulty) + 1 500 LET rNum2 = INT(RND * difficulty) + 1 PRINT PRINT "The Petersonian asks you..."; 600 LET tempRandom = INT(RND * difficulty) IF (tempRandom = 0) THEN GOTO 600 TIMER ON ON TIMER(3) GOSUB sTooMuchTime location = INT(RND * 4) IF (location = 0) THEN difficulty = (15 + herolevel): monsterhp = 4 IF (location = 1) THEN difficulty = (10 + herolevel): monsterhp = 4 IF (location = 2) THEN difficulty = 12: monsterhp = 4 IF (location = 3) THEN difficulty = 12: monsterhp = 4 IF (location = 0) THEN PRINT "what is "; rNum1; "+"; rNum2; : answer = rNum1 + rNum2: INPUT iAnswer IF (location = 1) THEN PRINT "what is "; rNum1; "-"; rNum2; : answer = rNum1 - rNum2: INPUT iAnswer IF (location = 2) THEN PRINT "what is "; rNum1; "*"; rNum2; : answer = rNum1 * rNum2: INPUT iAnswer IF (location = 3) THEN rNum2 = rNum1 * tempRandom: PRINT "what is "; rNum2; "/"; rNum1; : answer = rNum2 / rNum1: INPUT iAnswer TIMER OFF IF iAnswer = answer THEN PRINT "You were correct and dazzled the foul being!": curMonHP = curMonHP - herolevel IF curMonHP < 1 THEN GOSUB theEnd IF iAnswer <> answer THEN PRINT "You have answered wrong, and some of your life force has been sucked from you!" IF iAnswer <> answer THEN herohealth = herohealth - 1: PRINT "You now have: "; herohealth; " health points" IF (herohealth = 0) THEN GOSUB sDie IF curMonHP > 0 THEN GOTO 400 GOTO 400 RETURN theEnd: CLS BEEP PRINT "With an anguish of pain, the evil Petersonian sinks" PRINT "into the lava that lies at the bottom of the Chamber" PRINT "of Evil. You can hear the creature shouting foul" PRINT "and disgusting formulas as it dies." PRINT PRINT "You are the mega-math champion. You have conquered" PRINT "the nefarious Petersonian and have brought love and" PRINT "peace back to the world. You climb back into your" PRINT "plane, the Daisy, and lift off into the sunset to" PRINT "return home to a hero's welcome. Congratulations!" PRINT PRINT "Press return to end." END RETURN sInventory: CLS FOR x = 1 TO 10 FOR y = 1 TO 20 IF (x = 1 OR y = 1 OR y = 20 OR x = 10) THEN COLOR 4: PRINT "±"; ELSE IF (potions > 0 AND (x = 3) AND (y = 3)) THEN COLOR 9: PRINT "‚"; ELSE IF ((potions > 0) AND (x = 4) AND (y = 2)) THEN : ELSE IF ((potions > 0) AND (x = 4) AND (y = 3)) THEN COLOR 9: PRINT potions; ELSE IF ((potions > 0) AND (x = 4) AND (y = 4)) THEN : ELSE IF con1 = 1 AND (x = 7) AND (y = 3) THEN COLOR 10: PRINT "" ELSE IF con2 = 1 AND (x = 7) AND (y = 5) THEN COLOR 14: PRINT ""; ELSE IF con3 = 1 AND (x = 7) AND (y = 7) THEN COLOR 11: PRINT ""; ELSE IF con4 = 1 AND (x = 7) AND (y = 9) THEN COLOR 4: PRINT ""; ELSE COLOR 15: PRINT " "; COLOR 15 NEXT y PRINT NEXT x PRINT PRINT PRINT "You have"; potions; "potions in your inventory." PRINT IF con1 = 1 THEN PRINT "You have the Crystal of Earth." ELSE PRINT IF con2 = 1 THEN PRINT "You have the Crystal of Wind." ELSE PRINT IF con3 = 1 THEN PRINT "You have the Crystal of Ice." ELSE PRINT IF con4 = 1 THEN PRINT "You have the Crystal of Fire." ELSE PRINT PRINT INPUT "Press return to continue"; asioehans GOSUB sRedrawScreen RETURN 123456789