Advertisement
lovejoy777

NELL_01

Apr 11th, 2024
1,220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ZXBasic 20.19 KB | Software | 0 0
  1.      10 MODE7:FOR I%=0 TO 1:PRINTTAB(10,3+I%)CHR$141"NELLAN IS THIRSTY":NEXT:PRINT''TAB(5)CHR$134"Written by Dr Furman H Smith"'TAB(2)CHR$134"Published in Recreational Computing"'TAB(11)CHR$134"magazine in 1980"
  2.     20 PRINT''TAB(7)"""ported shortly thereafter"'" to the Commodore 64"" by Steven Darnold"'''CHR$134" Ported to BBC BASIC for the BBC Micro"'TAB(10)CHR$134"by lurkio in 2020"
  3.     30 PRINT''TAB(7)"Ported to the Agon Light"'TAB(6)CHR$134"by Steve Lovejoy in 2024" TAB(39,22);:PROCd(30)
  4.    100 L%=39:a$=STRING$(30," "):DIM S% 255
  5.    105 GOSUB705:GOSUB1010:GOSUB745
  6.    110 INPUT"Are you the only person playing? "a$
  7.    115 p=1:a$=LEFT$(a$,1):IFa$="Y"THENp9=1:GOTO140
  8.    120 IFa$<>"N"THENPRINT"Please type YES or NO":GOTO110
  9.    130 INPUT"How many of you will be playing? "a$:p9=VAL(a$)
  10.    135 IFp9<1THENPRINT"Oh, come on.":GOTO130
  11.    140 IFp9>5THENPRINT"Sorry, that is too many.":GOTO130
  12.    145 DIM p$(p9):i=1:INPUTLINE"What is your name? "p$(p):p$(p)=FNt(p$(p)):GOTO150
  13.    150 IFi=p9 THEN165 ELSE i=i+1
  14.    155 PROCp("Please give me the name of the next player.")
  15.    160 INPUTp$(i):GOTO150
  16.    165 IFp9=1 THENt2=t9 ELSE t2=4
  17.    205 PROCrc(r):PRINT
  18.    210 w4(r)=1:i=1+INT((r-1)/r8):j=r-r8*(i-1)
  19.    215 ONi GOSUB220,225,230:GOTO235
  20.    220 ONj GOTO2010,2020,2030
  21.    225 ONj GOTO2040,2050,2060
  22.    230 ONj GOTO2070,2080,2090
  23.    235 FORm=1TOm9
  24.    240 IFl(m)=r THENGOSUB265
  25.    245 NEXTm
  26.    250 IFRND(1)>t*(2-w4(1)-w4(3))/(7*t9)THEN260
  27.    256 PROCb:PROCp("A voice says, <<Type HELP if you need help.>>")
  28.    260 GOTO305
  29.    265 i=1+INT((m-1)/8):j=m-8*(i-1):PROCb
  30.    270 ONi GOTO275,280,285,290
  31.    275 ONj GOTO2410,2420,2430,2440,2450,2460,2470,2480
  32.    280 ONj GOTO2490,2500,2510,2520,2530,2540,2550,2560
  33.    285 ONj GOTO2570,2580,2590,2600,2610,2620,2630,2640
  34.    290 ONj GOTO2650
  35.    305 PROCb:PRINT"* ";:q$=q$(1+q9*RND(1))
  36.    310 IFRND(1)>.5THENq$=q$+", "+p$(p)
  37.    315 q$=q$+"?":PROCp(q$):VDU23,1,1;0;0;0;:INPUT"* "a$:VDU23,1,0;0;0;0;:a$=FNt(a$):i9=LEN(a$):PRINT
  38.    320 IF i9=0 THEN305
  39.    325 FORi=1TOi9:IFMID$(a$,i,1)<>" "THENNEXT
  40.    330 v$=LEFT$(a$,i-1):IFi=i9+1THENn$=v$:GOTO345 ELSEix=i:i=i9:NEXT:i=ix
  41.    335 FOR j=i9 TO i STEP-1:IFMID$(a$,j,1)<>" "THENNEXT
  42.    340 n$=RIGHT$(a$,i9-j):jx=j:j=i:NEXT:j=jx
  43.    345 v=0:n=0
  44.    350 FORi=1TOv9:IFv$(i)=v$THENv=i:i=v9:NEXT ELSENEXT
  45.    355 FORi=1TOn9:IFn$(i)=n$THENn=i:i=n9:NEXT:i=n ELSENEXT
  46.    357 IF 0<n AND n<9 THEN405
  47.    360 IFv*n>0OR(v+n>0ANDv$=n$)THEN380 ELSE3505
  48.    365 PROCp("I don't understand "+a$+".")
  49.    370 PRINT"Type LIST WORDS to see a list of"
  50.    375 PRINT"some of the words that I understand.":GOTO 305
  51.    380 IFn<29THEN405 ELSEIFn=29THENn=11 ELSEn=n-7
  52.    405 IFn>4ANDn<9THENn=n-4
  53.    410 IF n>4 OR n=0 THEN435 ELSE ON n GOTO412,416,420,424
  54.    412 w1(r)=ABS(w1(r)):IFw1(r)=1THEN430
  55.    414 IFw1(r)=2THENr=r-r8:GOTO605ELSE505
  56.    416 w1(r+r8)=ABS(w1(r+r8)):IFw1(r+r8)=1THEN430
  57.    418 IFw1(r+r8)=2THENr=r+r8:GOTO605 ELSE505
  58.    420 w2(r+1)=ABS(w2(r+1)):IFw2(r+1)=1THEN430
  59.    422 IFw2(r+1)=2THENr=r+1:GOTO605 ELSE505
  60.    424 w2(r)=ABS(w2(r)):IFw2(r)=1THEN430
  61.    426 IFw2(r)=2THENr=r-1:GOTO605 ELSE505
  62.    430 PRINT"You can't walk through walls.":GOTO305
  63.    435 IFn<>12ANDn<>22THENGOSUB4015ELSEGOSUB4030
  64.    440 IF(v<=4ORv=13)ANDn=22THEN5410
  65.    442 IFn=28ANDv<9 GOTO480
  66.    445 IFm<>0ORv=0ORv>8THEN455
  67.    450 PROCp("That's not possible now, "+p$(p)+"."):GOTO305
  68.    455 IFm=0ORv=15ORn=9THEN505
  69.    460 IF 4<v AND v<9 THEN475
  70.    465 IFl(m)>-1ANDl(m)<>r THEN470 ELSE475
  71.    470 PROCp("It seems that the "+n$+" isn't here."):GOTO305
  72.    475 IFv>8THEN505 ELSEIFv<5THENv=1 ELSEv=5
  73.    480 IFn=28THENPRINT"The WATCH stays on your wrist.":GOTO305
  74.    485 IFn=10ORn=23ORn=24THEN5980
  75.    490 ON(v+3)/4GOSUB4045,4100
  76.    495 GOTO235
  77.    505 IFn<=8ANDn>0THEN5015
  78.    510 IFn=26ORn=27THENON(n-25)GOSUB5105,5155:GOTO305
  79.    512 IFv=0THEN365
  80.    515 IFv<=14THENj=v-8:GOTO520 ELSEj=v-14:GOTO525
  81.    520 ONj GOTO5205,5255,5355,5355,5405,5605
  82.    525 ONj GOTO5705,5755,5780,5805,5980,210
  83.    605 t=t+1:t1=t1+1
  84.    610 IF t>t9 THEN GOSUB5155 ELSE625
  85.    615 PROCb:PROCp("Time is up _ the "+STR$t9+" scoots have passed."):VDU7
  86.    620 PROCb:PRINT"If you want to play again, push RETURN.":PROCd(0):RUN
  87.    625 IFw1(r)=-1THENw1(r)=1
  88.    630 IFw1(r+r8)=-1THENw1(r+r8)=1
  89.    635 IFw2(r)=-1THENw2(r)=1
  90.    640 IFw2(r+1)=-1THENw2(r+1)=1
  91.    645 IF t1<=t2 THEN205 ELSE t1=0:IF p<p9 THEN p=p+1 ELSE p=1
  92.    650 PROCp(" # It's "+p$(p)+"'s turn now."):PROCb:GOTO210
  93.    705 PROCrc(2):PRINT
  94.    710 PROCp("Let's pretend that you are in an enchanted house. You should use one or two words to tell me what you want to do. I'll suggest messages at first. If you have a question while you're inside the house, type HELP.")
  95.    735 RETURN
  96.    745 PROCb:PROCp("When you have read all this, please push the button that says RETURN (or ENTER).")
  97.    755 PROCb:PROCd(30):RETURN
  98.   1010 :
  99.   1015 r6=1:r7=3:r8=3:r9=r6*r7*r8:r0=r9-r8+1:r=r0
  100.   1020 v9=20:n9=31:m9=25
  101.   1025 DIMv$(v9),n$(n9),l(m9),n1(m9),w(m9),w4(r9),w4$(r9)
  102.   1030 DIMw1((r6*r7+1)*r8),w2(r9+1),w1$(3),w2$(3),w3$(9)
  103.   1035 t=0:t1=0:t9=72:c=0:c9=4
  104.   1040 i=RND(-TIME)
  105.   1045 q9=4:b9=4:DIMq$(q9),b$(b9)
  106.   1110 FORi=1TOv9:READv$(i):NEXT
  107.   1115 DATA TAKE,GET,GRAB,PICK,DROP,GIVE,OFFER,DEPOSIT,KICK,CONSULT,OPEN,UNLOCK
  108.   1125 DATA FILL,LIST,WORTH,SIT,DRINK,HELP,GO,RELOOK
  109.   1210 FORi=1TOn9:READn$(i):NEXT
  110.   1215 DATA N,S,E,W,NORTH,SOUTH,EAST,WEST,DOOR,CHAIR,RABBIT,BOWL,COUPON,WRAPPER,MAP
  111.   1225 DATA KEY,EGG,COIN,JEWEL,CATALOG,VASE,MILK,BANKER,CAT,WORDS
  112.   1230 DATA INVENTORY,SCORE,WATCH,CHULA,KLINKOYN,NELLAN
  113.   1320 FORj=1TO9:w3$(j)=STRING$(3,CHR$255):NEXT
  114.   1420 FORi=0TO3:READw1$(i),w2$(i):NEXT:PROCw
  115.   1430 DATA"##($($##",", ,"
  116.   1440 DATA"########","###"
  117.   1450 DATA"##    ##"," ` "
  118.   1460 DATA"##-*%.##","%,h"
  119.   1510 FORi=0TO9:READw4$(i):w4(i)=0:NEXT
  120.   1515 DATA"  ??  "
  121.   1520 DATA"Office"," Milk "," Store"
  122.   1525 DATA"White "," Gold ","  Hot "
  123.   1530 DATA" Bank "," Green","  Cat "
  124.   1610 FORi=1TO(r6*r7+1)*r8:READw1(i):NEXT
  125.   1615 DATA1,1,1
  126.   1620 DATA-2.5,-2,-1
  127.   1625 DATA-2,-1,-2
  128.   1630 DATA1,1,1
  129.   1710 FORi=1TOr9+1:READw2(i):NEXT
  130.   1715 DATA1,-1,-2.5
  131.   1720 DATA1,-2,-2
  132.   1725 DATA1,1,-2,1
  133.   1810 FORm=1TOm9:READl(m),n1(m):w(m)=0:NEXT
  134.   1815 DATA1,20,6,13,0,12,0,12,0,12,2,9,3,0,0,0,7,23
  135.   1820 DATA1,16,9,24,0,24,0,24,0,24,0,11,0,11,0,11,4,11
  136.   1825 DATA7,15,2,14,1,0,8,18,0,17,3,19,0,21
  137.   1830 FORi=22TO25:w(i)=25:NEXT
  138.   1910 FORi=1TOq9:READq$(i):NEXT
  139.   1915 DATA"What are you going to do now","What now"
  140.   1920 DATA"What do you choose to do","What is your decision"
  141.   1925 FORi=1TOb9:READb$(i):NEXT
  142.   1930 DATAhappy,"glad to see you",busy,sleepy
  143.   1995 RETURN
  144.   2010 PROCp("Well, "+p$(p)+", you are in the Office.")
  145.   2011 PROCp(" You are standing next to a CHAIR which is next to a desk in a room with yellow walls and brown carpet.")
  146.   2015 PROCp(" There is a door in the south wall."):RETURN
  147.   2020 PROCp("This is the Milk Room. If you have a BOWL, you can say FILL BOWL or GET MILK and have your BOWL filled with nice cold MILK. There are doorways to the south and east.")
  148.   2024 IFl(15)=-1ANDl(6)=2 THENl(18)=0:l(17)=2
  149.   2025 RETURN
  150.   2030 PRINT"You are in the Store.":RETURN
  151.   2040 PROCp("Now you are in the White Room _ the walls are white. There is a wall to the west. You know that the Bank is through the south doorway. There's a door to the north and a doorway to the east.")
  152.   2044 RETURN
  153.   2050 PROCp("All the walls in this room are painted gold. There are exits to the north, east, and west.")
  154.   2053 IFl(15)=-1ANDl(23)=0THEN2054 ELSE RETURN
  155.   2054 l(15)=0:l(16)=5:l(23)=5:RETURN
  156.   2060 PROCp("Oh, it's hot in here! You are in the Hot Room and if cold MILK were in this room, it would be warmed.")
  157.   2062 PRINT" The MAP shows the doorways."
  158.   2063 IFl(4)=-1THENl(4)=0:l(5)=-1:RETURN ELSE RETURN
  159.   2070 PRINT"You are in a room called the Bank."'
  160.   2071 PROCp("A giant carpet on the floor says, <<Welcome "+p$(p)+">>."):PROCb
  161.   2073 PROCp("A screen says that your visit will last for "+STR$t9+" scoots. "+STR$t+" scoots have passed."):PROCb
  162.   2075 PRINT"To leave this room, type GO NORTH.":RETURN
  163.   2080 PROCp("You are standing in a room with green walls. A green CHAIR is in the corner.")
  164.   2083 IFw1(4)<0THENRETURN ELSE PROCb:PRINT"A sign here says:"'
  165.   2084 PRINTTAB(2)STRING$(25,CHR$95)
  166.   2085 PRINTTAB(2)"|"TAB(9)"Magic works"TAB(26)"|"
  167.   2086 PRINTTAB(2)"|"TAB(11)"in the"TAB(26)"|"
  168.   2087 PRINTTAB(2)"|"TAB(7)"Enchanted House"TAB(26)"|"
  169.   2088 PRINTTAB(2)STRING$(25,CHR$95)':RETURN
  170.   2090 PROCp("You are in the room where "+n$(31)+" lives; this room is called the Cat Room.")
  171.   2091 RETURN
  172.   2410 PROCp("There is a college CATALOG from the University of Houston Victoria Campus here.")
  173.   2411 RETURN
  174.   2420 PROCp("On the floor is a COUPON. According to what is written on the COUPON, if it is DROPped in the Store while the machine is working, you will receive one blue BOWL.")
  175.   2423 RETURN
  176.   2430 PRINT"There is a clean empty blue BOWL here.":RETURN
  177.   2440 PRINT"The BOWL of cold MILK is here.":RETURN
  178.   2450 PRINT"There is a blue BOWL with warm MILK.":RETURN
  179.   2460 RETURN
  180.   2470 PROCp("In a corner of the room is a machine which announces that if you DEPOSIT (or DROP) a COUPON and the machine is working, you will receive whatever the coupon is good for."):PROCj
  181.   2473 PROCp(" If the machine doesn't work, you are invited to call the repairperson.")
  182.   2476 RETURN
  183.   2480 PRINT"The machine in the corner has a"
  184.   2481 PRINT"flashing display announcing:"
  185.   2482 PRINT"<<out of BOWLs>>.":RETURN
  186.   2490 PROCp("The BANKER, Mr."+n$(30)+", looks "+b$(1+b9*RND(1))+".")
  187.   2492 IFl(23)=r0 THENPRINT"Type SCORE to check your score."
  188.   2494 RETURN
  189.   2500 PRINT"There is an old brass KEY here.":RETURN
  190.   2510 PROCp(n$(31)+" the CAT is here. She pretty much fills up the room; she's as large as an elephant _ no kidding."):PROCp(" In a soft polite voice she says,"):PROCj
  191.   2512 PROCp(" <<I'd love to have some nice cold MILK. Many of my friends have tried to deliver cold MILK here and many have failed. Perhaps you, "+p$(p)+", would be kind enough to try. I must warn you: It will not be easy.>>")
  192.   2517 RETURN
  193.   2520 PROCp(n$(31)+" purrs and says, <<Thank you, "+p$(p)+", for OFFERing me this good MILK.>>")
  194.   2523 PROCp(" She doesn't mention that it was warm.")
  195.   2525 l(5)=0:l(3)=9:l(12)=0:l(11)=9:RETURN
  196.   2530 PROCp("Wow! "+n$(31)+" can sure be loud when she purrs.")
  197.   2531 PROCp(" She looks at you and says, <<"+p$(p)+", you've made me so happy. I know that it wasn't easy to get this BOWL of cold MILK to me. You did it!")
  198.   2534 l(4)=0:l(3)=9:l(13)=0:l(14)=9:IFl(25)<>0THEN2537
  199.   2535 PROCj:PROCp(" Please accept this small present.>> She offers you a small "+n$(21)+".")
  200.   2536 l(25)=9
  201.   2537 RETURN
  202.   2540 PROCp(n$(31)+" is napping. She's quite happy."):RETURN
  203.   2550 PROCp(n$(29)+" the white RABBIT is here and she says, <<Well, my friend "+p$(p)+", I hope that you are enjoying your adventure.>>")
  204.   2552 RETURN
  205.   2560 PROCp(n$(29)+" hops out of your arms and scurries off. She returns and says, <<Please TAKE this golden EGG that I hid here in the Gold Room.>>")
  206.   2563 l(23)=5:l(15)=5:l(16)=0:c=c-1:RETURN
  207.   2570 PROCb:PROCp(n$(29)+" hops down and gobbles a growth of carrots that was blocking the east doorway. She smiles and says, <<Thanks, friend "+p$(p)+".>>")
  208.   2574 l(17)=0:l(15)=2:l(6)=0:c=c-1:RETURN
  209.   2580 PROCp("A white RABBIT is here. She hops to you and says, <<I am "+n$(29)+". Welcome to the Enchanted House, my friend, "+p$(p)+".>>")
  210.   2583 PROCp(" She hugs you and says, <<I have a present saved for you in the room to the east of here. If you say TAKE RABBIT (or TAKE "+n$(29)+") and next say GO EAST (or E or EAST), you can carry me to the Gold Room.>>")
  211.   2587 l(18)=0:l(15)=4:RETURN
  212.   2590 PROCp("There is a magic MAP here. If you GET the MAP, you may CONSULT the MAP.")
  213.   2591 RETURN
  214.   2600 PRINT"An old gum wrapper is on the floor.":RETURN
  215.   2610 PROCp("A voice says, <<Furman Smith's July 1980 Recreational Computing article helps programmers remodel this Enchanted House.>>")
  216.   2612 RETURN
  217.   2620 PRINT"A heavy COIN is here.":RETURN
  218.   2630 PRINT"A golden EGG is on the floor.":RETURN
  219.   2640 PRINT"On the floor is a JEWEL.":RETURN
  220.   2650 PRINT"A magnificent VASE is here.":RETURN
  221.   3505 IFa$="extend time"THENt9=t9+24:n=28:GOTO5315
  222.   3995 GOTO365
  223.   4015 IFv=0ORn=0THENm=0:RETURN
  224.   4020 IFn<>24 ELSE IFl(11)=9 THENm=11:RETURN ELSEm=14:RETURN
  225.   4025 FORi=1TOm9:IFn1(i)=n THENm=i:i=m9:NEXT:i=m:RETURN ELSE NEXT
  226.   4030 m=0:IFn<>22ANDn<>12THENRETURN
  227.   4035 FORj=3TO5:IFl(j)<>0THENm=j:NEXT ELSE NEXT
  228.   4040 RETURN
  229.   4045 IFl(m)=r ANDc<c9 THEN4075 ELSE IFc>=c9 THEN4055
  230.   4050 PROCp("You've still got the "+n$+"."):GOTO4140
  231.   4055 PROCp("You can only carry "+STR$c9+" objects (not counting the WATCH) and you are already carrying that much. If you really want to GET something else, then you will have to DROP something first.")
  232.   4071 GOTO4140
  233.   4075 IFw(m)=0THEN4090 ELSE PROCp("Congratulations, "+p$(p)+"!")
  234.   4080 PROCp("You'll earn points when the "+n$+" is DEPOSITed (or DROPped) in the Bank.")
  235.   4085 c=c+1:l(m)=-1:RETURN
  236.   4090 PROCp("OK, you are carrying the "+n$+".")
  237.   4095 l(m)=-1:c=c+1:RETURN
  238.   4100 IFl(m)=-1THEN PRINT"OK.":l(m)=r:c=c-1 ELSE 4135
  239.   4105 IFr=r0 THEN GOSUB5175
  240.   4110 IFr<>3ANDr<>9THEN RETURN
  241.   4115 IFl(2)=3THENl(2)=0:l(3)=3:l(7)=0:l(8)=3
  242.   4120 IFl(4)=9THENl(4)=0:l(3)=9:l(11)=0:l(13)=9
  243.   4125 IFl(5)=9THENl(5)=0:l(3)=9:l(11)=0:l(12)=9
  244.   4130 RETURN
  245.   4135 PROCp("You don't have the "+n$+".")
  246.   4140 PROCp("To see an inventory of what you're carrying, type INVENTORY."):PROCb
  247.   4145 RETURN
  248.   4505 PRINT"You are in the "FNt(w4$(r))" Room now.";
  249.   4510 REPEAT VDU9:UNTILPOS=36:VDU11,135:PRINT"N";:VDU10,8,8,8,135:PRINT"W+E";:VDU10,8,8,8,135:PRINT"S"
  250.   4515 wc%=145+6
  251.   4520 i2=r7*r8:FORi1=1TOr6
  252.   4525 IF(i1-1)*i2<r AND r<=i1*i2 THEN4530 ELSE NEXT
  253.   4530 k0=(i1-1)*i2:k9=i1*i2:k=k0:j=1
  254.   4535 IFj=1VDUwc%
  255.   4536 IFk=k0 ANDj=1THENPRINTw3$(7);
  256.   4540 IFk=k0 ANDj>1ANDj<r8+1THENPRINTw3$(8);
  257.   4545 IFk=k0 ANDj=r8+1THENPRINTw3$(9)
  258.   4550 IFk>k0 ANDk<k9 ANDj=1THENPRINTw3$(4);
  259.   4555 IFk>k0 ANDk<k9 ANDj>1ANDj<r8+1THENPRINTw3$(5);
  260.   4560 IFk>k0 ANDk<k9 ANDj=r8+1THENPRINTw3$(6)
  261.   4565 IFk=k9 ANDj=1THENPRINTw3$(1);
  262.   4570 IFk=k9 ANDj>1ANDj<r8+1THENPRINTw3$(2);
  263.   4575 IFk=k9 ANDj=r8+1THENPRINTw3$(3)
  264.   4580 IFj>r8 THEN4595
  265.   4585 IFw1(k+j)>0THENPRINTw1$(w1(k+j)); ELSE PRINTw1$(0);
  266.   4590 j=j+1:GOTO4535
  267.   4595 IFk=k9 THEN:GOTO305 ELSE j=1:VDUwc% : REM IFk=k9 THEN:RETURN ELSE j=1:VDUwc%
  268.   4600 IFw2(k+j)>0THENPRINTw2$(w2(k+j)); ELSE PRINTw2$(0);
  269.   4605 IFj>r8 THENPRINT:GOTO4620
  270.   4610 IFw4(k+j)>0THENPRINTCHR$(129+FNrc(k+j))w4$(k+j)CHR$(145+6); ELSE PRINTCHR$(129+5)w4$(0)CHR$(145+6);
  271.   4615 j=j+1:GOTO4600
  272.   4620 k=k+r8:j=1:GOTO4535
  273.   5015 IFr<>1THEN5040
  274.   5016 IFl(10)=-1THEN5030
  275.   5020 PROCp("The door is locked and you're not carrying the key.")
  276.   5025 w1(4)=3.5:GOTO305
  277.   5030 w1(4)=2.5:r=4:GOTO605
  278.   5040 IFr<>2THEN5070
  279.   5041 IFl(6)<>2THEN5060
  280.   5045 PROCp("You cannot enter _ the doorway is blocked by a thick growth of carrots.")
  281.   5055 w2(3)=3.5:GOTO305
  282.   5060 r=3:w2(3)=2.5:GOTO605
  283.   5070 IFr=4ANDl(10)<>-1THEN5020
  284.   5071 IFr=4THEN5080
  285.   5073 IFr>4THEN365
  286.   5075 r=2:GOTO605
  287.   5080 w1(4)=2.5:r=1:GOTO605
  288.   5105 PROCp("Your WATCH stays on your wrist for the whole visit.")
  289.   5106 IFc=0THENPROCp(" You aren't carrying anything else."):RETURN
  290.   5115 PROCp(" Here is an inventory of what you're carrying:")
  291.   5120 FORj=1TOm9
  292.   5125 IFl(j)=-1THENPRINTTAB(2)n$(n1(j)):NEXT ELSE NEXT
  293.   5130 RETURN
  294.   5155 GOSUB5175:PRINT"You have ";i;" points out of 100."
  295.   5160 PROCp("You earn points by DEPOSITing valuable things in the Bank.")
  296.   5165 RETURN
  297.   5175 i=0:FORj=1TOm9:IFl(j)=r0 THENi=i+w(j)
  298.   5180 IFp9>1THENa$="all " ELSE a$=""
  299.   5185 NEXTj:IFi<100THENRETURN
  300.   5190 PROCb:PROCp("Mr "+n$(30)+" shouts, <<You "+a$+"won!>>"):VDU7:GOTO620
  301.   5205 PROCp("Kicking "+n$+" will not help anything."):GOTO305
  302.   5255 IFNOT(n=11ORn=23ORn=24)THEN5305
  303.   5260 IFl(6)=0THEN5275
  304.   5265 PROCp("The "+n$(n1(m))+" laughs and says, <<Well, I know that you know a carrot-liking RABBIT.>>")
  305.   5270 GOTO305
  306.   5275 ON 2-w4(1) GOTO5280,5290
  307.   5280 PROCp("The "+n$(n1(m))+" says, <<"+p$(p)+", I think that you're doing great.>>"):GOTO305
  308.   5290 PROCp("The "+n$(n1(m))+" smiles mysteriously and says, <<I recommend that you SIT in the CHAIR.>>")
  309.   5300 GOTO305
  310.   5305 IFn=15THENGOSUB4505:GOTO305
  311.   5310 IFn=20THENPRINT"It doesn't help here.":GOTO305
  312.   5315 IFn=28THENPRINT;t;" scoots have passed":PROCj
  313.   5320 IFn=28THENPROCp(" and "+STR$(t9-t)+" scoots remain."):GOTO305
  314.   5325 GOTO5980
  315.   5355 IFn=9 THEN5015 ELSE5980
  316.   5405 IFn<>12ANDn<>24THEN5980
  317.   5406 IFn=24THENv=5:n=12:GOTO435
  318.   5410 IFr<>2ORl(3)<>-1THEN5425
  319.   5411 l(3)=0:l(4)=-1
  320.   5415 PROCp("Glurg; glurg; plink. Your BOWL has cold MILK now.")
  321.   5420 GOTO305
  322.   5425 IFn=22ANDm=3THENPRINT"The BOWL is empty.":n$="BOWL"
  323.   5430 IFv<>13ANDl(m)=r THENGOSUB4045:GOTO305
  324.   5435 IFm=4ORm=5THENPRINT"The BOWL is still full of MILK."
  325.   5440 IFr<>2THENPRINT"The Milk Room has lots of MILK."
  326.   5445 IFl(m)>-1ORm<3ORm>5THENPRINT"You need a BOWL."
  327.   5450 GOTO305
  328.   5605 IFn<>25THEN5980 ELSE PRINT"I know these verbs: ";
  329.   5610 FORi=1TOv9:a$=v$(i):GOSUB5655:NEXT
  330.   5615 PROCb:PRINT"I know these nouns: ";
  331.   5620 FORi=1TOn9:a$=n$(i):GOSUB5655:NEXT
  332.   5625 PROCb:PROCp("I know some one-word messages (for example HELP) and I know some two-word messages (for examples FILL BOWL, OFFER MILK)."):PROCj
  333.   5630 PROCp(" Whatever you say, I'll look at the first and last words; you could say SIT IN THE CHAIR or CONSULT THE SLEEPY MR "+n$(30)+".")
  334.   5650 GOTO 305
  335.   5655 IFPOS=1VDU8
  336.   5656 IFL%-POS<LENa$+1PRINT
  337.   5660 PRINTa$;:IFa$=v$(v9)ORa$=n$(n9)THENPRINT"."ELSE PRINT", ";
  338.   5666 RETURN
  339.   5705 IFm=0THEN5980
  340.   5706 PROCp("The "+n$+" is worth "+STR$w(m)+" points."):IFw(m)<>0THEN305
  341.   5710 PROCp("The "+n$+" might be useful as a tool.")
  342.   5720 IFn=11ORn=23ORn=24THENPRINT"Friends are valuable."
  343.   5725 IFn=20THENPROCp("A college education is a worthwhile and stimulating experience.")
  344.   5735 GOTO305
  345.   5755 IFn<>10THEN5980
  346.   5756 IFr=1ORr=8THENr=9-r:GOTO605
  347.   5760 PRINT"There's no CHAIR in here.":GOTO305
  348.   5780 IFn<>22THEN5980
  349.   5781 IFl(4)=-1ORl(5)=-1THEN5790
  350.   5785 PRINT"You're not carrying any MILK.":GOTO305
  351.   5790 PRINT"Glug; glug.":l(4)=0:l(5)=0:l(3)=-1:GOTO305
  352.   5805 PRINT"Lost? "STRING$(11,". ")"CONSULT MAP"
  353.   5810 PRINT"Not sure what you're carrying? "STRING$(19,". ")"INVENTORY"
  354.   5815 PRINT"How many scoots are left? CONSULT WATCH"
  355.   5820 PRINT"Want room redescribed? "STRING$(5,". ")"RELOOK"
  356.   5825 PRINT"What's a certain thing worth? "STRING$(16,". ")"WORTH that thing";
  357.   5830 PRINT"Examples: WORTH COIN,"'TAB(10)"WORTH CATALOG, WORTH CAT"'
  358.   5835 PRINT"Want a hint? "STRING$(6,". ")"CONSULT friend";
  359.   5840 PRINT"Examples: CONSULT BANKER, CONSULT "n$(29)
  360.   5845 PRINT"Not sure how to say something?  "STRING$(18,". ")"LIST WORDS"
  361.   5850 PRINT"Not sure what the clues mean --- ";
  362.   5855 PRINT"think"'"and experiment.":GOTO 305
  363.   5980 IFn$=v$THENPRINT"You'll need to use two words.":GOTO305
  364.   5982 PROCp("The "+n$+" is hard to "+v$+"."):GOTO305
  365.   6000 DEFPROCrc(r):C%=129+FNrc(r):VDU26,12,C%:FORY%=1TO24:VDU10,8,C%:NEXT:VDU28,40-L%,24,39,0,30:ENDPROC
  366.   6020 DEFFNrc(r):=VAL(MID$("264620515",r,1))
  367.   7000 DEFPROCp($S%):LOCALA%,Z%,M%,C%,N%,T%:M%=L%:N%=LEN$S%:A%=0:Z%=M%+1-POS:REPEATIFZ%>N%Z%=N%ELSEREPEATZ%=Z%-1:C%=S%?Z%:UNTILC%=32:IFZ%<A%Z%=A%+M%
  368.   7010 T%=S%?Z%:S%?Z%=13:PRINT$(S%+A%);:S%?Z%=T%:VDU32,-8*(POS=1):IFZ%-A%<=M%ANDPOS PRINTELSEIFC%=32A%=A%+1ELSEZ%=Z%-1
  369.   7020 A%=Z%+1:Z%=A%+M%+1:UNTILA%>=N%:IFPOS PRINT:ENDPROC ELSEENDPROC
  370.   8000 DEFFNb:VDU11,8:A%=&87:B%=TRUE:FORI%=1TOL%:VDU9:C%=(USR(&FFF4)AND&FF00)DIV256:IFC%=32NEXT ELSEB%=FALSE:I%=L%:NEXT
  371.   8010 VDU10,13:=B%
  372.   8050 DEFPROCb:IFNOT(FNb)PRINT:ENDPROC ELSEENDPROC
  373.   9000 DEFPROCj:A%=&87:REPEATVDU8:C%=(USR(&FFF4)AND&FF00)DIV256:UNTILC%<>32:VDU9:ENDPROC
  374.   9100 DEFFNt(s$):IFLEFT$(s$,1)=" "REPEATs$=RIGHT$(s$,LENs$-1):UNTILLEFT$(s$,1)<>" "
  375.   9110 IFRIGHT$(s$,1)=" "REPEATs$=LEFT$(s$,LENs$-1):UNTILRIGHT$(s$,1)<>" "
  376.   9120 =s$
  377.   9200 DEFPROCd(s%):VDU 23, 0, &A0, 0; 2 : REM Clear out buffer 0. : REM *FX21,0
  378.   9210 IF s%=0 THEN IF GET: ENDPROC ELSE TIME=0:REPEATUNTILTIME>100*s%ORINKEY(0)<>-1:ENDPROC
  379.   9300 DEFPROCw:FORI%=0TO3:a$="":FORJ%=1TOLENw1$(I%):C%=ASC(MID$(w1$(I%),J%,1)):IFC%=35a$=a$+CHR$255:NEXTELSEa$=a$+CHR$C%:NEXT
  380.   9310 w1$(I%)=a$:a$="":FORJ%=1TOLENw2$(I%):C%=ASC(MID$(w2$(I%),J%,1)):IFC%=35a$=a$+CHR$255:NEXTELSEa$=a$+CHR$C%:NEXT
  381.   9320 w2$(I%)=a$:NEXT:ENDPROC
  382.  
  383.  
Tags: agon light
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement