DIM SHARED X AS INTEGERDIM SHARED Y AS INTEGER10 'KEY OFF15 N = VAL(MID$(TIME$, 7, 2))20 RANDOMIZE N30 INPUT "Do you want graphics (Y/N)"; ANS$40 IF ANS$ = "y" GOTO 7050 IF ANS$ = "Y" GOTO 7055 IF ANS$ = "ZORK" GOTO 70060 GOTO 35070 SCREEN 1: CLS '///this causes it to change to screen 1, which is small ,try various 'screen modes to see what they do.
DIM SHARED X AS INTEGERDIM SHARED Y AS INTEGER10 'KEY OFF15 N = VAL(MID$(TIME$, 7, 2))1 PRINT "be sure to use upper case when you enter a command"INPUT "To continue type C "; ANS$IF ANS$ = "C" GOTO 3020 RANDOMIZE N30 INPUT "Do you want graphics (Y/N)"; ANS$40 IF ANS$ = "y" GOTO 7050 IF ANS$ = "Y" GOTO 7055 IF ANS$ = "ZORK" GOTO 70060 GOTO 35070 SCREEN 1: CLS'//This can be changed. Try various screen modes,and see what they do.PRINT " Sorry no graphics yet"PLAY "ga"SLEEP 2CLSINPUT "Do you want to be ZORK(Y/N"; ANS$IF ANS$ = "Y" GOTO 350IF ANS$ = "N" GOTO 1GOTO 1700 PRINT "ZORK" '///modified by me so it works.PRINT "ZORK is the character, could be zork or anyone"SLEEP 2GOTO 350350 PRINT "this is 350" 'mod by me to make it work.PRINT " 350 could be where the first part of the story is,some instructions"PRINT " and or "PRINT " this is where we add more options,also. "PLAY "eeaagbd"SLEEP 2GOTO 1
DIM SHARED Llist$(10)DIM SHARED Sel AS INTEGERSCREEN 12FOR x = 1 TO 10 '---- Get the Menu List - Only needs done once READ Llist$(x)NEXT xMakeMenu '---- Show the Menu'----------------DO '--- Moving down Menu IF _KEYDOWN(20480) THEN COLOR 0, 7 ' --- Erase last move LOCATE Sel, 25: PRINT Llist$(Sel - 5) Sel = Sel + 1: IF Sel > 15 THEN Sel = 6 COLOR 0, 8 ' --- Show present move going down LOCATE Sel, 25: PRINT Llist$(Sel - 5) END IF ' --- Moving up the Menu IF _KEYDOWN(18432) THEN COLOR 0, 7 ' --- Erase last move LOCATE Sel, 25: PRINT Llist$(Sel - 5) Sel = Sel - 1: IF Sel < 6 THEN Sel = 15 COLOR 0, 8 ' --- Show present move going up the Menu LOCATE Sel, 25: PRINT Llist$(Sel - 5) END IF a$ = INKEY$ IF a$ = CHR$(13) THEN '--- press ENTER to select Selection Sel ' --- Goto Selected item END IF IF LCASE$(a$) = "q" THEN EXIT DO ' --- end Program _DISPLAY _LIMIT 8 ' --- set speed of selecter, change if selecter goes to fast or slow. Large number = fasterLOOPSYSTEM'-------------- Change these suit your needs in the menu ----------------DATA "Math","Draw Circle","Draw Box","Enter Name","Paste","Clear","Cut","Find","New","Run"'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' _____________________ Sub Selection _________________________________SUB Selection (Sel)GotoRoutine = Sel - 5' NOTE: cases 1 to 3 are calling subs. I didn't use subs in Cases 4 to 10' You can choose to do it either way but subs seperate from the rest' so its easier to edit later on and makes the programs more clear.SELECT CASE GotoRoutine CASE 1 Math ' --- Call sub math CASE 2 DrawCircle ' --- Call sub DrawCircle CASE 3 Drawbox ' --- Call sub Drawbox CASE 4 COLOR 0, 7: CLS: LOCATE 10, 20 INPUT "What is your name?"; n$, LOCATE 12, 20: PRINT "Hello "; n$; " Press a key to go to menu" _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 5 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option 'PASTE', Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 6 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option Clear, Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 7 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option 'CUT', Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 8 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option 'FIND', Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 9 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option 'NEW', Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statement CASE 10 COLOR 0, 7: CLS: LOCATE 10, 20 PRINT "you selected Option 'RUN', Press a key to go to menu"; _DISPLAY SLEEP 'wait for keypress to leave sub DO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statementEND SELECTMakeMenu '-------- Go back to the menuEND SUB' _______________________ Sub Draw Circle _________________________________SUB DrawCircleCOLOR 0, 7: CLS '------- Clear the screen of the menuCIRCLE (300, 100), 50, 4LOCATE 14, 20PRINT " we are drawing circles"LOCATE 16, 20PRINT " Press a key to go back to main menu"_DISPLAY ' -- show the circle and textSLEEP 'wait for keypress to leave subDO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statementEND SUB'_______________________ Sub Draw Box_________________________________SUB DrawboxCOLOR 0, 7: CLS ' ------- Clear the screen of the menuLINE (200, 100)-(400, 150), 4, BFLINE (200, 100)-(400, 150), 0, BLOCATE 14, 20PRINT " we are drawing boxes"LOCATE 16, 20PRINT " Press a key to go back to main menu"_DISPLAY ' --- show the box and textSLEEP 'wait for keypress to leave subDO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statementEND SUB'______________________ Sub Math _____________________________________SUB MathCOLOR 0, 7: CLS ' ------- Clear the screen of the menuLOCATE 10, 16PRINT " we are doing math now: 9 X 6 = 54"LOCATE 12, 10PRINT " Put your Multiplication tables in this Sub Routine 'Math'"LOCATE 16, 18PRINT "Press a key to go back to the main menu"_DISPLAY ' ------- Show the textSLEEPDO: LOOP UNTIL INKEY$ = "" ' clear the keyboard after SLEEP statementEND SUB'_________________ Sub Make the Menu ________________________SUB MakeMenuSel = 6 ' --- Start location for selecterCOLOR 0, 7: CLSFOR x = 5 TO 15 ' --- Print the Menu list LOCATE x, 25 PRINT Llist$(x - 5)NEXT xLOCATE 20, 10PRINT "Use up/Down arrow keys - Press Enter to make selection";LOCATE 22, 20: PRINT " Press q to exit";COLOR 0, 8: LOCATE Sel, 25PRINT Llist$(Sel - 5)_DISPLAYEND SUB
SCREEN 12COLOR , 7CLSa$ = "THIS IS The New text adventure, So the story begins..."' Center the text' Since this text will be 8 pixels per chr we divide screen width' by 16 to find text center.xx = _WIDTH / 16'Then subtract center value from length a$ / 2xx = INT(xx - LEN(a$) / 2)FOR x = xx TO LEN(a$) + xx c = INT(RND * 6) + 1 COLOR c ' --- set color for each character b = b + 1 ' --- Select next character to be printed LOCATE 15, x PRINT MID$(a$, b, 1); ' --- Do the print centered _DELAY .2 ' Slow it down a bitNEXT xCLSSCREEN 13 '///Notice the change in the screen,....PRINT " I think , then more subs can be added "SLEEP 1PRINT "Like this"'//// I will see if it works this way.