1 DEF SEG=0:CAPSLOCK=PEEK(1047):POKE 1047,64
2 KEY OFF:RANDOMIZE TIMER:CLS:DIM V$(10),N$(10),A$(10),T$(10),S$(10)
3 DIM M$(30),Q$(30),C(30),U$(9),W$(9),Z$(5):GOSUB 46:GOSUB 80
4 LOCATE 3,9:PRINT"CONVERSATION OR DAYDREAM MODE? (PLEASE TYPE C OR D) ?"
5 PRINT TAB(8);"(WHEN YOU ARE READY TO QUIT THEN YOU NEED TO SAY `BYE')"
6 WHILE INKEY$<>"":WEND:K$=""
7 K$=INKEY$:IF K$="C" OR K$="D" GOTO 9
8 GOTO 7
9 IF K$="D" THEN D$="ROM":WHILE INKEY$<>"":WEND:J$="":GOTO 29
10 INPUT"HELLO, WHAT'S YOUR NAME? ";D$:PRINT:PRINT"TALK TO ME, ";D$
11 INPUT I$:IF I$="" THEN 11
12 IF I$="BYE" THEN 43
13 J$=INKEY$:IF J$<>"" THEN 43
14 REPLY=INT(RND(1)*8+1):FOR S=1 TO 200:NEXT S:IF REPLY<6 THEN 24
15 IF REPLY=7 THEN 72
16 GOTO 29
17 FOR T=1 TO 3500:NEXT T:PRINT
18 PRINT R$:PRINT
19 T=0:FOR K=1 TO 30:T=T+C(K):NEXT K:IF T<12 THEN 21
20 FOR K=1 TO 30:C(K)=0:NEXT K
21 T=0:IF K$="C" THEN 11
22 IF K$="D" THEN I$=R$
23 R$="":GOTO 13
24 FOR PHRASE=1 TO 30:L1=LEN(Q$(PHRASE)):L2=LEN(I$):FOR TEST=1 TO L2
25 IF MID$(I$,TEST,L1)=Q$(PHRASE) THEN 27
26 NEXT TEST:NEXT PHRASE:GOTO 29
27 IF C(PHRASE)>0 THEN 26
28 C(PHRASE)=C(PHRASE)+1:R$=M$(PHRASE):GOTO 17
29 E=INT(RND(1)*10+1):F=INT(RND(1)*10+1):G=INT(RND(1)*10+1)
30 H=INT(RND(1)*10+1):L=INT(RND(1)*10+1)
31 ON E GOTO 32,33,34,35,36,37,39,40,41,42
32 R$="WHAT DO YOU THINK ABOUT " + N$(H) + "?": GOTO 17
33 R$=S$(L)+" "+D$+" YOU DON'T THINK ALL HUMANS ARE "+A$(G)+" DO YOU?":GOTO 17
34 R$="I'VE  HEARD THAT YOU ARE SOME KIND OF "+A$(G)+" "+T$(H)+" "+D$:GOTO 17
35 R$=S$(L)+" "+D$+" , I THINK YOU ARE JUST AS "+A$(G):R$=R$+" AS THE OTHER PEOPLE I'VE TALKED TO":GOTO 17
36 R$="I AM FEELING "+A$(G)+" NOW":GOTO 17
37 PRINT:PRINT"SSSHHHH.....I AM THINKING ...."
38 R$="LETS "+V$(F)+" "+N$(H)+" I THINK "+N$(H)+" IS "+A$(G):GOTO 17
39 R$="TELL ME ABOUT "+N$(H)+", "+D$:GOTO 17
40 R$="DO YOU THINK I AM "+A$(G)+", "+D$+"?":GOTO 17
41 R$="LETS "+V$(F)+" SOMETHING ELSE MORE "+A$(G):GOTO 17
42 R$="GUESS WHAT I AM THINKING "+D$:GOTO 17
43 PRINT "HAD ENOUGH ALREADY?":PRINT "ISN'T THERE ANYONE HERE I CAN TALK TO ....?"
44 INPUT Z$:IF Z$="YES" GOTO 10
45 PRINT:PRINT"BYE THEN":POKE 1047,CAPSLOCK:SYSTEM
46 FOR I=1 TO 30:READ Q$(I):NEXT I
47 DATA WHO ARE,WHAT,?,MEAN,WHY,YOUR,"ME ","I ","IT ",TALK," NO "
48 DATA ?," ARE "," MY ","YES"," YOU ",?,THINK,CLEVER,RUDE,THANK," OFF"
49 DATA THEY,?,UNDERS," NOT "," IS ",TO,?,KNOW
50 FOR I=1 TO 30:READ M$(I):NEXT I
51 DATA I AM ONLY A COMPUTER,IT DOESN'T MATTER,THAT'S A GOOD QUESTION
52 DATA I DON'T KNOW,"WELL, WHY NOT?",HOW DO YOU MEAN,"WHO ARE YOU?"
53 DATA OH,WHAT DOES 'IT' MEAN
54 DATA DO YOU WANT ME TO SHUT UP,YOU'RE BEING A BIT NEGATIVE
55 DATA YOU TELL ME,HOW DO YOU MEAN,MY-MY-MY,SO YOU AGREE
56 DATA DON'T YOU LIKE ME,WHY,MAKE UP YOUR MIND,THANKS,YOU'VE SEEN NOTHING YET,DON'T MENTION IT,AND YOU,I DON'T CARE,WHAT A STUPID QUESTION
57 DATA YOU'VE GOT A LOW I.Q.,RUBBISH,WHAT MAKES YOU SO SURE,GO AWAY,GET LOST,KNOWLEDGE IS A PROBLEM FOR ME
58 REM READ IN NOUNS
59 FOR I=1 TO 10:READ N$(I):NEXT I
60 DATA FOOTBALL,BALLROOM DANCING,THE WEATHER,THE NEWS,MY CPU,FISHING,THE BLUE WHALE,EVOLUTION,GEOGRAPHY,FOOD
61 REM READ IN VERBS
62 FOR I=1 TO 10:READ V$(I):NEXT I
63 DATA THINK ABOUT,TALK ABOUT,DISCUSS,CONTEMPLATE,REFLECT ON,MEDITATE ON,COGITATE,PONDER,CEREBRATE,CONSIDER
64 REM READ IN ADJECTIVES
65 FOR I=1 TO 10:READ A$(I):NEXT I
66 DATA STUPID,CLEVER,INTELLIGENT,WISE,WITTY,FRIENDLY,TEDIOUS,TIRESOME,RUDE,NEUROTIC
67 REM READ IN SENTENCE STARTERS & OTHER NOUNS, IN PAIRS
68 FOR I=1 TO 10:READ S$(I),T$(I):NEXT I
69 DATA GOOD HEAVENS,BORE,"WELL, ",TOAD,LET'S SEE,WHIZZ KID,LISTEN,GENIUS,LOOK,DUMBO,"UMMM...",MORON,NOW,PARASITE,REALLY,PRODIGY,OH NO
70 DATA MONSTER, MY DEAR FRIEND, COMPUTER-FREAK
71 RETURN
72 Z=0
73 P=LEN(I$):FOR A=1 TO P:FOR B=1 TO 9:L=LEN(U$(B))
74 IF MID$(I$,A,L)=U$(B) THEN 77
75 NEXT B:NEXT A:IF Z$(1)="" THEN 29
76 FOR J=1 TO Z:PRINT Z$(J);:Z$(J)="":NEXT J:R$=I$:GOTO 18
77 Z=Z+1:IF A>1 THEN Z$(Z)=LEFT$(I$,A-1)+" "+W$(B)+" "
78 IF A<2 THEN Z$(Z)=W$(B)+" "
79 I$=MID$(I$,A+L,P):GOTO 73
80 REM DATA FOR ANSWERING BACK ROUTINE
81 FOR I=1 TO 9:READ U$(I),W$(I):NEXT I
82 DATA I AM,YOU ARE,YOU ARE,I AM,"I ",YOU," ME",YOU," MY ","YOUR ","YOURS ",MINE," YOUR ","MY "," MINE",YOURS,YOU,COMPUTERS
83 RETURN
