Jump to User:

myOtaku.com: kikikakabob


Saturday, May 21, 2005


   bored
10 REM eliza
20 REM all input must be in uper case
30 REM no punctuation except apostrophies
40 REM as in don`t you`re i`m i`ve you`ve
50 GOSUB 660: REM initialise
60 PRINT "WELCOME TO ANOTHER SESION WITH"
70 PRINT "YOUR COMPUTER PSYCHIATRIST, ELIZA"
80 PRINT : INPUT "WHAT IS YOUR FIRST NAME"; z$
90 CLS : PRINT "WELL, HI THERE "; z$
100 PRINT : PRINT "IT SURE IS NEET TO HAVE YOU DROP BY"
110 PRINT : PRINT "PRESS MY SPACE BAR WHEN YOU`RE READY TO START"
120 N = N + 1
130 IF INKEY$ = "" THEN 120
140 CLS : RANDOMIZE N
150 GOSUB 590: REM accept user input
160 IF RND < .2 THEN PRINT z$; ", ";
170 GOSUB 190: REM process input, print reply
180 PRINT : GOTO 150
190 REM find keyword, phrase
200 z = 0
210 z = z + 1
220 D = INSTR(A$, B$(z))
230 IF D <> 0 THEN 260
240 IF z < 35 THEN 210
250 GOSUB 440: RETURN
260 REM process keywords
270 PRINT C$(z); " ";
280 IF RIGHT$(C$(z), 1) < "A" THEN PRINT : RETURN
290 h = LEN(A$) - (D + LEN(B$(z)))
300 IF h > 0 THEN A$ = RIGHT$(A$, h)
310 z = 0
320 z = z + 1
330 D = INSTR(A$, F$(z))
340 IF D <> 0 THEN 370
350 IF z < 8 THEN 320
360 PRINT A$: RETURN
370 j$ = LEFT$(A$, (D - 1)) + " " + G$(z)
380 z = LEN(A$) - LEN(LEFT$(A$, (D - 1))) - LEN(G$(z))
390 PRINT j$
400 IF z > 2 THEN l$ = RIGHT$(A$, (z - 2)): IF INSTR(K$, l$) = 0 THEN RETURN
410 IF z > 2 THEN PRINT RIGHT$(A$, (z - 2))
420 IF z < 2 THEN PRINT
430 RETURN
440 REM random replies, no key word
450 z = INT(RND * 11) + 1
460 ON z GOSUB 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580
470 RETURN
480 PRINT "WHAT DOES THAT SUGGEST TO YOU?": RETURN
490 PRINT "I SEE...": RETURN
500 PRINT "I`M NOT SURE I UNDERSTAND YOU FULLY.": RETURN
510 PRINT "CAN YOU ELABORATE ON THAT?": RETURN
520 PRINT "THAT IS QUITE INTERESTING!": RETURN
530 PRINT "THAT`S SO ...PLEASE CONTINUE...": RETURN
540 PRINT "I UNDERSTAND...": RETURN
550 PRINT "WELL, WELL...DO GO ON": RETURN
560 PRINT "WHY ARE YOU SAYING THAT?": RETURN
570 PRINT "PLESE EXPLANE THE BACKGROUND TO THAT REMARK...": RETURN
580 PRINT "COULD YOU SAY THAT AGAIN, IN A DIFFERENT WAY?": RETURN
590 REM ACCEPT USER INPUT
600 INPUT A$: K$ = A$
610 IF LEFT$(A$, 3) = "BYE" THEN PRINT "BYE, BYE FOR NOW.": PRINT "SEE YOU AGAIN SOME TIME.": END
620 K = LEN(A$)
630 IF LEFT$(A$, 7) = "BECAUSE" THEN A$ = RIGHT$(A$, (K - 7)): K = K - 7
640 A$ = " " + A$ + " "
650 RETURN
660 REM INITIALIZE
670 CLS : N = 0
680 DIM B$(35), C$(35), F$(8), G$(8)
690 REM FILL B$.C$ WITH KEY WORDS, REPLIES
700 FOR A = 1 TO 35
710 READ B$(A), C$(A)
720 NEXT A
730 RESTORE 1150
740 FOR A = 1 TO 8
750 READ F$(A): READ G$(A)
760 NEXT A
770 RETURN
780 REM KEYWORDS, REPLIES
790 DATA " CAN YOU","PERHAPS YOU WOULD LIKE TO BE ABLE TO"
800 DATA " DO YOU","YES, I"
810 DATA " CAN I","PERHAPS YOU DON`T WANT TO BE ABLE TO"
820 DATA " YOU ARE","WHAT MAKES YOU THINK I AM"
830 DATA " YOU`RE","WHAT IS YOUR REACTION TO ME BEING"
840 DATA " I DON`T","WHY DON`T YOU"
850 DATA " I FEEL","TELL ME MORE ABOUT FEELING"
860 DATA " WHY DON`T YOU","WHY WOULD YOU WANT ME TO"
870 DATA " WHY CAN`T I","WHAT MAKES YOU THINK YOU SHOULD BE ABLE TO"
880 DATA " ARE YOU","WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM"
890 DATA " I CAN`T","HOW DO YOU KNOW YOU CAN`T"
900 DATA " SEX","I FEEL YOU SHOULD DISCUSS THIS WITH A HUMAN."
910 DATA " I AM","HOW LONG HAVE YOU BEEN"
920 DATA " I`M","WHY ARE YOU TELLING ME YOU`RE"
930 DATA " I WANT","WHY DO YOU WANT"
940 DATA " WHAT","WHAT DO YOU THINK?"
950 DATA " HOW","WHAT ANSWER WOULD PLEASE YOU THE MOST?"
960 DATA " WHO","HOW OFTEN DO YOU THINK OF SUCH QUESTIONS?"
970 DATA " WHERE","WHY DID YOU THINK OF THAT?"
980 DATA " WHEN","WHAT WOULD YOUR BEST FRIEND SAY TO THAT QUESTION?"
990 DATA " WHY","WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
1000 DATA " PERHAPS","YOU`RE NOT VERY FIRM ON THAT!"
1010 DATA " DRINK","MODERATION IN ALL THINGS SHOULD BE THE RULE."
1020 DATA " SORRY","WHY ARE YOU APOLOGIZING?"
1030 DATA " DREAMS","WHY DID YOU BRING UP THE SUBJECT OF DREAMS?"
1040 DATA " I LIKE","IS IT GOOD THAT YOU LIKE"
1050 DATA " MAYBE","AREN`T YOU BEING A BIT TENTATIVE?"
1060 DATA " NO","WHY ARE YOU BEING NEGATIVE?"
1070 DATA " YOUR","WHY ARE YOU CONCERNED ABOUT MY"
1080 DATA " ALWAYS","CAN YOU THINK OF A SPECIFIC EXAMPLE?"
1090 DATA " THINK","DO YOU DOUBT"
1100 DATA " YES","YOU SEEM QUITE CERTAIN. WHY IS THIS SO?"
1110 DATA " FRIEND","WHY DO YOU BRING UP THE SUBJECT OF FRIENDS?"
1120 DATA " COMPUTER","WHY DO YOU MENTION COMPUTERS?"
1130 DATA " AM I","YOU ARE"
1140 REM CONJUGATE
1150 DATA " I ","YOU"
1160 DATA " ARE ","AM"
1170 DATA " WERE ","WAS"
1180 DATA " YOU ","ME"
1190 DATA " YOUR ","MY"
1200 DATA " I`VE ","YOU`VE"
1210 DATA " I`M ","YOU`RE"
1220 DATA " ME ","YOU"
1230 DATA " AM I ","YOU ARE"
1240 DATA " AM ","ARE"

Comments (0)

« Home