10 REM *********************************************** 11 REM MAISON DU FOU - PROGRAMME BASIC 12 REM 13 REM Auteurs : DIEUDONNE P. NOEL H. 14 REM Magazine MICRO 7 mars 1984 15 REM 16 REM Adaptation pour GW-BASIC : D. Rioual avril 2020 17 REM 18 REM ************************************************ 19 REM 20 REM Liste des variables 21 REM ******************* 22 REM AO : Armoire Ouverte 23 REM CO : Clef en OR 24 REM CP : Clef Petite 25 REM LA : LAmpe de poche 26 REM LAA : LAmpe Allumee 27 REM MCH : Monte-charge Haut 28 REM MCB : Monte-charge Bas 29 REM Z : Compteur 30 REM 100 GOSUB 10000 : REM Affiche l'intro 110 DIM B$(21):A$=" D'accord" 120 FOR I=1 TO 21:READ B$(I):NEXT I 121 DATA " 1.Vous allez au nord"," 2.Vous allez au sud"," 3.Vous allez a l'est" 122 DATA " 4.Vous allez a l'ouest"," 5.Vous montez les escaliers" 123 DATA " 6.Vous descendez les escaliers" 124 DATA " 7.Vous attendez"," 8.Vous appuyez sur le bouton vert" 125 DATA " 9.Vous appuyez sur le bouton rouge","10.Vous ne faites rien" 126 DATA "11.Vous partez","12.Vous entrez dans la maison" 127 DATA "13.Vous allez au nord-est","14.Vous allez au centre-est" 128 DATA "15.Vous allez au sud-est","16.Vous allez au nord-ouest" 129 DATA "17.Vous allez au centre-ouest","18.Vous allez au sud-ouest" 130 DATA "19.Vous appuyez sur le bouton Montee" 131 DATA "20.Vous appuyez sur le bouton Descente" 132 DATA "21.Vous prenez la clef" 133 AO=0:CO=0:CP=0:LP=0:LAA=0 135 HOME:INVERSE:PRINT "INSTRUCTIONS POUR EXECUTER UNE ACTION":NORMAL 136 PRINT:PRINT "Entrez le nombre qui se trouve devant l'action." 140 PRINT:PRINT:PRINT "Appuyez sur CR pour continuer" 150 PRINT:GET I$ 160 HOME:PRINT "Vous etes devant une vieille maison abandonnee.":PRINT:PRINT 165 PRINT B$(10):PRINT B$(11):PRINT B$(12):PRINT 170 GOSUB 11000 180 IF INT(I)<>I OR I<10 THEN 170 190 ON I-9 GOTO 191,191,200:GOTO 170 191 HOME:PRINT "Vous avez raison, la curiosite est un vilain defaut." 192 END 200 HOME:PRINT "La porte se referme derriere vous, impossible de l'ouvrir." 201 FOR I=1 TO 3000:NEXT I 220 HOME: PRINT "Vous etes dans l'entree, il y a une porte a l'est et a l'ouest." 230 PRINT:PRINT B$(3):PRINT B$(4):PRINT 231 GOSUB 11000 232 IF INT(I)<>I OR I<3 THEN 231 233 ON I-2 GOTO 250,650:GOTO 231 250 HOME:PRINT "Vous etes dans un hall." 251 PRINT "Il y a une porte au nord et a l'ouest, et des escaliers qui montent a l'est." 260 PRINT:PRINT B$(1):PRINT B$(4):PRINT B$(5):PRINT 261 INPUT"Que faites-vous ?";I 262 IF INT(I)<>I OR I<1 THEN 261 263 ON I GOTO 300,261,261,220,350:GOTO 261 300 HOME : PRINT "Vous etes dans une penderie." 301 PRINT "Il y a une porte a l'est, au nord et au sud." 310 PRINT:PRINT B$(1):PRINT B$(2):PRINT B$(3):PRINT 311 GOSUB 11000 312 IF INT(I)<>I OR I<1 THEN 311 313 ON I GOTO 1300,250,500:GOTO 311 350 HOME : PRINT "Vous etes dans un long couloir. Il y a :" 351 PRINT "3 portes a l'est : nord, centre, sud." 352 PRINT "3 portes a l'ouest : nord, centre, sud." 353 PRINT "Une porte au nord et au sud et des escaliers qui descendent a l'ouest." 354 PRINT:PRINT "Il y a aussi un monte-charges avec un bouton Montee et un bouton Descente." 356 IF MCH=0 THEN 360 357 PRINT "Le plateau du monte-charges est la." 358 IF CO=0 THEN PRINT"**Il y a une clef en OR." 359 GOTO 361 360 PRINT"Le plateau du monte-charges n'est pas la." 361 PRINT:IF MCH=1 AND CO=0 THEN PRINT B$(21) 362 Z=Z+1 364 PRINT B$(1):PRINT B$(2):PRINT B$(6):PRINT B$(13):PRINT B$(14):PRINT B$(15) 365 PRINT B$(16):PRINT B$(17):PRINT B$(18):PRINT B$(19):PRINT B$(20):PRINT 366 GOSUB 11000 367 IF INT(I)<>I OR I<1 THEN 366 368 ON I GOTO 600,370,366,366,366,250:IF I<13 THEN 366 369 ON I-12 GOTO 1200,1220,400,1240,1260,1280,379,377,373:GOTO 366 370 HOME:PRINT "Impossible, la porte ne s'ouvre pas." 371 IF CP=1 OR CO=1 THEN 380 372 FOR I=1 TO 2000:NEXT I:GOTO 350 373 IF MCH=0 OR CO=1 THEN 366 374 PRINT:PRINT A$ : CO=1 375 FOR I=1 TO 2000:NEXT I:GOTO 350 377 PRINT:PRINT A$:MCH=0:MCB=1:GOTO 375 379 PRINT:PRINT"Impossible, le bouton ne s'enfonce pas.":GOTO 375 380 PRINT:IF CO=1 THEN PRINT" 1.Vous ouvrez avec votre clef en OR" 381 IF CP=1 THEN PRINT" 2.Vous ouvrez avec votre petite clef" 382 PRINT ".3 Vous retournez dans le couloir" 383 PRINT:INPUT"Que faites-vous ?";I 384 IF INT(I)<>I OR I<1 OR I>3 THEN 383 385 ON I GOTO 386,390,350 386 IF CO=0 THEN GOTO 383 387 PRINT:PRINT"Impossible, elle n'entre pas dans la serrure." 388 FOR I=1 TO 2000:NEXT I:GOTO 383 390 IF CP=0 THEN GOTO 383 391 PRINT:PRINT"La clef ouvre la porte, mais vous decouvrez un mur derriere elle." 392 GOTO 388 400 HOME: PRINT "Vous etes dans une petite piece, il y a des escaliers qui montent au nord,":PRINT"une porte a l'ouest et une a l'est." 410 PRINT:PRINT B$(3):PRINT B$(4):PRINT B$(5):PRINT 411 GOSUB 11000 412 IF INT(I)<>I OR I<3 THEN GOTO 411 413 ON I-2 GOTO 415,350,950:GOTO 411 415 HOME : PRINT "En appuyant sur la clanche, vous ouvrez une trappe sous vos pieds et vous":PRINT"tombez dans un trou profond." 417 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT 418 INVERSE:PRINT"VOUS MOUREZ !":NORMAL 419 END 450 HOME : PRINT "Vous etes dans un grand garage. Il y a une porte a l'est et au nord." 452 PRINT"Il y a aussi un disjoncteur avec une inscription :" 453 PRINT TAB(8); 454 INVERSE:PRINT" LIGNE HT DU TOIT ":NORMAL 455 PRINT:PRINT"A cote, il y a un bouton vert et un bouton rouge." 460 PRINT:PRINT B$(1):PRINT B$(3):PRINT B$(8):PRINT B$(9):PRINT 461 GOSUB 11000 462 IF INT(I)<>I OR I<1 THEN GOTO 461 463 ON I GOTO 1050,461,700,461,461,461,461,467,469:GOTO 461 467 PRINT:PRINT A$:HT=0:GOTO 461 469 PRINT:PRINT A$:HT=1:GOTO 461 500 HOME: PRINT "Vous etes dans un petit couloir. Il y a une porte a l'est, une a l'ouest et une au nord." 510 PRINT:PRINT B$(1):PRINT B$(3):PRINT B$(4):PRINT 511 GOSUB 11000 512 IF INT(I)<>I OR I<1 THEN GOTO 511 513 ON I GOTO 1100,511,550,300:GOTO 511 550 HOME : PRINT "Vous etes dans une cuisine. Il y a une porte a l'est, une a l'ouest et une":PRINT "au nord." 552 PRINT"Il y a aussi un monte-charges, avec un bouton Montee et un bouton Descente." 553 IF MCB=0 THEN 557 554 PRINT"Le plateau du monte-charges est la." 555 IF CO=0 THEN PRINT"**Il y a une clef en OR." 556 GOTO 558 557 PRINT"Le plateau du monte-charges n'est pas la." 558 PRINT:IF MCB=1 AND CO=0 THEN PRINT B$(21) 560 PRINT B$(1):PRINT B$(3):PRINT B$(4):PRINT B$(19):PRINT B$(20):PRINT 561 GOSUB 11000 562 IF INT(I)<>I OR I<1 THEN GOTO 561 563 ON I GOTO 1300,561,1000,500:IF I<19 THEN GOTO 561 564 ON I-18 GOTO 570,573,565:GOTO 561 565 IF MCB=0 OR CO=1 THEN GOTO 561 566 PRINT:PRINT A$:CO=1 567 FOR I=1 TO 2000:NEXT I:GOTO 550 570 PRINT:PRINT A$:MCB=0:MCH=1:GOTO 567 573 PRINT:PRINT"Impossible, le bouton ne s'enfonce pas.":GOTO 567 600 HOME : PRINT "Vous etes dans une chambre. Il y a une porte a l'ouest et au sud et des":PRINT"escaliers qui descendent a l'est." 610 PRINT:PRINT B$(2):PRINT B$(4):PRINT B$(6):PRINT 611 INPUT"Que faites-vous ?";I 612 IF INT(I)<>I OR I<2 THEN GOTO 611 613 ON I-1 GOTO 350,611,850,611,800:GOTO 611 650 HOME : PRINT "Vous etes dans une petite piece.":PRINT "Il y a une porte a l'est et une au nord et des escaliers qui descendent":PRINT "a l'ouest." 660 PRINT:PRINT B$(1):PRINT B$(3):PRINT B$(6):PRINT 661 GOSUB 11000 662 IF INT(I)<>I OR I<1 THEN GOTO 661 663 ON I GOTO 750,661,220,661,661,700:GOTO 661 700 HOME : PRINT "Vous etes dans un couloir.":PRINT "Il y a des escaliers qui montent a l'est, une porte a l'est, une a l'ouest et":PRINT "une au nord." 705 Z=Z+2 710 PRINT:PRINT B$(1):PRINT B$(3):PRINT B$(4):PRINT B$(5):PRINT 711 GOSUB 11000 712 IF INT(I)<>I OR I<1 THEN GOTO 711 713 ON I GOTO 1000,711,900,450,650:GOTO 711 750 HOME:PRINT "Vous etes dans un grand salon." 751 PRINT"Il y a une porte au sud et une a l'est. Il y a aussi un bar dans le coin":PRINT "nord-ouest." 759 PRINT:PRINT" 1.Vous allez au bar vous desalterer" 760 PRINT B$(2):PRINT B$(3):PRINT 761 GOSUB 11000 762 IF INT(I)<>I OR I<1 THEN GOTO 761 763 ON I GOTO 764,650,1100:GOTO 761 764 IF CP=1 THEN GOTO 773 765 PRINT:PRINT"Au milieu des bouteilles, vous voyez une petite clef." 766 PRINT:PRINT"Vous la prenez (1) ou pas (0) ?"; 767 INPUT I 768 IF I=1 THEN GOTO 771 769 IF I<>0 THEN GOTO 767 770 PRINT:PRINT A$:GOTO 772 771 PRINT:PRINT A$:CP=1 772 FOR I=1 TO 1000:NEXT I:GOTO 750 773 PRINT:PRINT"Vous choisissez une des nombreuses bouteilles pour vous desalterer." 775 FOR I=1 TO 2000:NEXT I:GOTO 750 800 HOME : PRINT "Vous etes dans un couloir." 801 PRINT"Il y a des escaliers qui montent a l'ouest, une porte au sud et une a l'est." 810 PRINT:PRINT B$(2):PRINT B$(3):PRINT B$(5):PRINT 811 GOSUB 11000 812 IF INT(I)<>I OR I<2 THEN 811 813 ON I-1 GOTO 900,1300,811,600:GOTO 811 850 HOME : PRINT "Vous etes dans une salle de bain." 851 PRINT"Il y a une porte a l'ouest, une a l'est et une au sud." 860 PRINT:PRINT B$(2):PRINT B$(3):PRINT B$(4):PRINT 861 GOSUB 11000 862 IF INT(I)<>I OR I<2 THEN 861 863 ON I-1 GOTO 1100,600,1150:GOTO 861 900 HOME:PRINT "Vous etes dans une salle de projection." 901 PRINT"Il y a une porte au nord, une au sud et une a l'ouest." 910 PRINT:PRINT B$(1):PRINT B$(2):PRINT B$(4):PRINT 911 GOSUB 11000 912 IF INT(I)<>I OR I<1 THEN GOTO 911 913 ON I GOTO 800,1000,911,700:GOTO 911 950 HOME : PRINT "Vous etes sur un toit plat." 951 PRINT"Une barriere electrique H.T. en fait le tour et des escaliers en descendent":PRINT"au sud." 960 PRINT:PRINT B$(1):PRINT B$(2):PRINT B$(3):PRINT B$(4):PRINT B$(6):PRINT 961 GOSUB 11000 962 IF INT(I)<>I OR I<1 THEN GOTO 961 963 ON I GOTO 964,964,964,964,961,400:GOTO 961 964 IF HT=1 THEN GOTO 966 965 HOME:PRINT "Vous vous electrocutez.":GOTO 417 966 PRINT:PRINT"Il y a des pointes sur le mur qui entoure la maison." 967 PRINT:PRINT" 1.Vous sautez du toit en prenant de nombreux risques." 968 PRINT B$(6):PRINT 969 GOSUB 11000 970 IF I=6 THEN GOTO 400 971 IF I<>1 THEN GOTO 969 972 IF Z=10 THEN GOTO 975 973 HOME: PRINT "Vous tombez sur les pointes qui entourent la maison." 974 GOTO 417 975 HOME : PRINT "Vous avez eu de la chance, votre saut a ete assez important pour franchir les": PRINT "pointes. Malheureusement,vous vous etes casse la jambe en tombant mal." 978 PRINT:PRINT"Enfin, vous vous en etes sorti et c'est le principal..." 979 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT TAB(30); 980 INVERSE:PRINT"BRAVO !":NORMAL 981 END 1000 HOME:PRINT "Vous etes dans un auditorium.":PRINT "Il y a une porte au nord, une au sud et une a l'ouest." 1010 PRINT:PRINT B$(1):PRINT B$(2):PRINT B$(4):PRINT 1011 GOSUB 11000 1012 IF INT(I)I OR I<1 THEN GOTO 1111 1113 ON I GOTO 850,500,1111,750:GOTO 1111 1150 HOME:PRINT "Vous etes dans une chambre ou il y a une porte a l'est." 1152 PRINT"Il y a aussi une armoire a l'ouest." 1153 IF AO=0 THEN GOTO 1159 1154 PRINT"L'armoire est ouverte." 1155 PRINT:PRINT" 1.Vous regardez dans l'armoire" 1156 GOTO 1160 1159 PRINT:PRINT" 1.Vous essayez d'ouvrir l'armoire" 1160 PRINT B$(3):PRINT 1161 GOSUB 11000 1162 IF I=3 THEN GOTO 850 1163 IF I<>1 THEN 1161 1165 IF AO=1 THEN 1320 1166 PRINT:PRINT"Impossible de l'ouvrir." 1167 IF CO=0 AND CP=0 THEN GOTO 1161 1168 PRINT:IF CO=1 THEN PRINT" 1.Vous essayez d'ouvrir la porte avec votre clef en OR" 1169 IF CP=1 THEN PRINT" 2.Vous essayez d'ouvrir la porte avec votre petite clef" 1170 PRINT B$(3):PRINT 1171 GOSUB 11000 1172 IF INT(I)<>I OR I<1 THEN 1171 1173 ON I GOTO 1319,1174,850:GOTO 1171 1174 IF CP=0 THEN 1171 1175 HOME:PRINT "impossible de l'ouvrir, la clef ne convient pas..." 1176 FOR I=1 TO 2000:NEXT I 1177 GOTO 1150 1200 HOME:PRINT "Vous etes dans une chambre. Il y a une porte a l'ouest." 1201 PRINT"Il y a aussi un telephone sur une table." 1210 PRINT:PRINT B$(4):PRINT" 5.Vous essayez d'appeler police-secours":PRINT 1211 GOSUB 11000 1212 IF I=4 THEN 350 1213 IF I<>5 THEN 1211 1214 PRINT:PRINT"En decrochant le telephone, vous n'entendez aucune tonalite." 1215 PRINT"En regardant sous la table, vous voyez que les fils sont arraches." 1216 FOR I=1 TO 3000:NEXT I:GOTO 1200 1220 HOME:PRINT "Vous etes dans une chambre, il y a une porte a l'ouest." 1221 PRINT"Il y a aussi une commode avec 6 tiroirs." 1225 PRINT:PRINT B$(4):PRINT" 5.Vous cherchez dans les tiroirs":PRINT 1226 GOSUB 11000 1227 IF I=4 THEN 350 1228 IF I<>5 THEN 1226 1229 IF LP=0 THEN 1231 1230 PRINT:PRINT A$:GOTO 1226 1231 PRINT:PRINT"En ouvrant le tiroir en bas a droite, vous trouvez une lampe de poche." 1232 PRINT:PRINT"Vous la prenez (1) ou pas (2) ?" 1233 PRINT:GOSUB 11000 1234 IF I=1 THEN GOTO 1238 1235 IF I<>2 THEN GOTO 1233 1236 PRINT:PRINT A$ 1237 FOR I=1 TO 2000:NEXT I:GOTO 1220 1238 PRINT:PRINT A$:LP=1:GOTO 1237 1240 HOME:PRINT "Vous etes dans une chambre, il y a une porte a l'est." 1250 PRINT:PRINT B$(3):PRINT B$(7):PRINT 1251 GOSUB 11000 1252 IF I=3 THEN 350 1253 IF I<>7 THEN 1251 1254 PRINT "Le temps passe..." 1255 FOR I=1 TO 10000:NEXT I 1256 GOTO 1251 1260 HOME:PRINT "Vous etes dans une salle de bains, il y a une porte a l'est." 1270 PRINT:PRINT B$(3):PRINT B$(7):PRINT 1271 GOSUB 11000 1272 IF I=3 THEN 350 1273 IF I<>7 THEN 1271 1274 PRINT "On s'embete ici, non ?" 1275 FOR I=1 TO 8000:NEXT I 1276 GOTO 1271 1280 HOME:PRINT "Vous etes devant les WC, vous pouvez soit entrer vous soulager (1)":PRINT"ou rester dans le couloir (0)." 1285 PRINT:GOSUB 11000 1286 IF I=0 THEN 350 1287 IF I<>1 THEN 1285 1288 HOME:PRINT "En entrant dans les WC, vous pouvez lire ce message sur la porte:":PRINT 1289 INVERSE:PRINT"IL FAUT BEAUCOUP D'AMPOULES POUR ECLAIRER NEW-YORK,MAIS UNE LAMPE DE POCHE" 1290 PRINT"PERMET DE SORTIR DE CETTE MAISON.":NORMAL 1291 FOR I=1 TO 11000:NEXT I 1292 HOME:PRINT "Vous retournez dans le couloir apres vous etre soulage." 1293 FOR I=1 TO 2500:NEXT I:GOTO 350 1300 HOME:PRINT "Vous etes dans une salle-a-manger." 1301 PRINT"Il y a une porte a l'ouest et 2 au sud: une a l'est et une a l'ouest." 1310 PRINT:PRINT B$(4):PRINT B$(15):PRINT B$(18):PRINT 1311 GOSUB 11000 1312 IF I=4 THEN GOTO 800 1313 IF I=15 THEN GOTO 550 1314 IF I=18 THEN GOTO 300 1315 GOTO 1311 1318 REM Derriere l'armoire 1319 IF CO=0 THEN GOTO 1171:AO=1 1320 HOME:PRINT "Derriere le faux fond de l'armoire se trouve une grotte sombre." 1321 PRINT"Des bruits etranges d'animaux sauvages vous font tressaillir." 1322 PRINT"Mais,le jour vous apparait deja la-bas, tout au fond de la grotte." 1328 PRINT:PRINT" 1. Vous avancez":PRINT" 2. Vous retournez dans la chambre." 1329 IF LP=1 AND LAA=0 THEN PRINT" 3. Vous allumez la lampe de poche" 1330 PRINT:GOSUB 11000 1331 IF INT(I)<>I OR I<1 THEN 1330 1332 ON I GOTO 1333,1150,1350:GOTO 1330 1333 IF LAA=1 THEN 1335 1334 HOME:PRINT "Vous tombez dans un trou.":GOTO 417 1335 HOME:PRINT "Vous voyez apparaitre un trou devant vous que vous contournez..." 1336 FOR I=1 TO 3000:NEXT I 1337 PRINT:PRINT"Vous continuez ensuite d'avancer. Les rats vous font encore quelques frayeurs." 1339 FOR I=1 TO 2500:NEXT I 1340 PRINT:PRINT"Mais,finalement,le jour se rapproche et vous etes bientot libre." 1341 FOR I=1 TO 2000:NEXT I 1342 PRINT:PRINT"Ca y est,vous vous en etes tout de meme sorti." 1343 PRINT:PRINT:PRINT:PRINT:PRINT TAB(10); 1344 INVERSE :PRINT"TRIPLES BRAVOS !!!!!!!!!!!":NORMAL 1345 END 1350 IF LP=0 THEN GOTO 1330 1351 PRINT:PRINT A$ 1352 FOR I=1 TO 1500:NEXT I:LAA=1:GOTO 1320 9999 REM <----- INTRO DU JEU -----> 10000 TEXT : HOME 10010 PRINT TAB(29);:INVERSE:PRINT" LA MAISON DU FOU ":NORMAL 10100 PRINT TAB(3);" |" 10110 PRINT TAB(3);" * * , * \ /" 10120 PRINT TAB(3);" * * ) -- * --" 10130 PRINT TAB(3);" * .-----------. (( / \" 10140 PRINT TAB(3);" * * )`'`'`'`'`'`( || * |" 10150 PRINT TAB(3);" /`'`'`'`'`'`'`\|| *" 10160 PRINT TAB(3);" * * * /`'`'`'`'`'`'`'`\| * *" 10170 PRINT TAB(3);" ,,,,,,, /`'`'`'`'`'`'`'`'`\ ," 10180 PRINT TAB(3);" * .-------.`|```````````````|` . ) * *" 10190 PRINT TAB(3);" * * / ,^, ,^, \| ,^^, ,^^, | / \ ((" 10200 PRINT TAB(3);" / |_| |_| \ |__| |__| | / \|| *" 10210 PRINT TAB(3);" * * /_____________\ | | | | |/ \| *" 10220 PRINT TAB(3);" | __ __ | '==' '==' /.......\ *" 10230 PRINT TAB(3);" * * | ( ) ( ) | //`_```_`\\ |,^, ,^,| _ *" 10240 PRINT TAB(3);" | |--| |--| | ||(O)|(O)|| ||_| |_|| " 10250 PRINT TAB(3);" * | |__| |__| | || ' | ' || ||_| |_|| * *" 10260 PRINT TAB(3);" | | || | || | | *" 10270 PRINT TAB(3);" ****************'==========='==''==='===''=='======='***************" 10300 PRINT 10310 PRINT " Auteurs: DIEUDONNE P. et NOEL H. Magazine MICRO 7 mars 1984" 10320 PRINT " Adaptation Apple /// : RIOUAL D. Juillet 2024" 10400 PRINT "Pressez une touche pour commencer."; 10410 GET I$ 10420 RETURN 10999 REM <----- Sub de saisie du choix -----> 11000 INPUT"---> QUE FAITES VOUS ?";I 11010 RETURN