10 ST$=LEFT$(TIME$,5):RANDOMIZE TIMER
20 PRINT"welcom to number 8 poker machine."
30 PRINT"instructions, yes or no?"
40 I$=INKEY$:IF I$=""THEN 40
50 IF I$="n"THEN PRINT"no.":GOTO 160
60 IF I$="y"THEN PRINT"yes.":GOTO 80
70 GOTO 30
80 PRINT"type c, to change between auto and manual play."
90 PRINT"TYPE Q, TO QUIT."
100 PRINT"type s, for game statistics."
110 PRINT"type 1, to set the reels manually."
115 PRINT"then 1 is an ace, 2 is a ten, 3 is a jack, 4 is a queen,"
116 PRINT"put a comma between each entry like this, 1 comma 1 comma 1, enter."
117 PRINT"that would be 3 aces."
120 PRINT"type 2, to find out how many coyns you have left."
130 PRINT"type 3, to take coynes out of the machine."
140 PRINT"pay out deetales. 2 tens pays 3. 2 tens and ace pays 5."
141 PRINT"3 jacks pays 10. 3 queens pays 14. 3 kings pays 18. 3 aces pays 100."
142 PRINT"repeat ";
150 GOTO 30
160 INPUT"how many coines do you want to play?";C:IF C<1 THEN GOSUB 960
170 YB=YB+C
180 IF C<11 THEN PRINT"last of the big spenders."
190 IF C<20 AND C>10 THEN PRINT"are, the caucious type."
200 IF C<50 AND C>19 THEN PRINT"a fairly standard bet."
210 IF C<100 AND C>49 THEN PRINT"are, a reel punter."
220 IF C>99 THEN PRINT"bang goes the family groaceries."
230 PRINT"type A  for auto play,  M  for manual play."
240 Z$=INKEY$:IF Z$=""THEN 240
250 IF Z$="q"OR Z$=CHR$(27) THEN GOSUB 960
260 IF Z$="s"THEN GOSUB 1030
270 IF Z$="a"THEN Q=1:GOTO 310
280 IF LEFT$(TIME$,7)="21:00:0"THEN 880
290 IF Z$="m"THEN Q=2:PRINT"press space bar.":GOTO 310
300 GOTO 230
310 IF Q=1 THEN 440
320 H$=INKEY$
330 IF H$=" "THEN 440
340 IF H$="q"OR H$=CHR$(27)THEN GOSUB 960
350 IF H$="s"THEN GOSUB 1030
360 IF H$="1"THEN GOSUB 910
370 IF H$="c"THEN 230
380 IF H$="2"THEN GOSUB 920
390 IF H$="3"THEN GOSUB 930
400 IF LEFT$(TIME$,7)="21:00:0"THEN 880
430 GOTO 320
440 C=C-1:PS=PS+1
450 X=INT(RND(1)*6)+1
460 Y=INT(RND(1)*5)+1
470 Z=INT(RND(1)*5)+1
475 REM
480 IF C<0 THEN PRINT"you are out of money.":GOTO 160
490 I$=INKEY$:IF I$="c"THEN 230
500 IF I$="q"OR I$=CHR$(27)THEN GOSUB 960
510 IF I$="s"THEN GOSUB 1030
520 IF I$="2"THEN GOSUB 920
530 IF I$="3"THEN GOSUB 930
545 IF I$="1"THEN GOSUB 910
555 IF X=6 THEN PRINT"nine,    ";
560 IF X=1 THEN PRINT"ace,     ";
570 IF X=2 THEN PRINT"ten,     ";
580 IF X=3 THEN PRINT"jack,    ";
590 IF X=4 THEN PRINT"queen,   ";
600 IF X=5 THEN PRINT"king,    ";
610 IF Y=1 THEN PRINT"ace,     ";
620 IF Y=2 THEN PRINT"ten,     ";
630 IF Y=3 THEN PRINT"jack,    ";
640 IF Y=4 THEN PRINT"queen,   ";
650 IF Y=5 THEN PRINT"king,    ";  
660 IF Z=1 THEN PRINT"ace."
670 IF Z=2 THEN PRINT"nine."
680 IF Z=3 THEN PRINT"jack."
690 IF Z=4 THEN PRINT"queen."
700 IF Z=5 THEN PRINT"king."
710 IF LEFT$(TIME$,7)="21:00:0"THEN 880
740 IF X=1 AND Y=1 AND Z=1 THEN PO=PO+100 
750 IF X=2 AND Y=2 AND Z=1 THEN PO=PO+5
760 IF X=2 AND Y=2 AND Z>1 THEN PO=PO+3
770 IF X=3 AND Y=3 AND Z=3 THEN PO=PO+10
780 IF X=4 AND Y=4 AND Z=4 THEN PO=PO+14
790 IF X=5 AND Y=5 AND Z=5 THEN PO=PO+18
800 IF X=1 AND Y=1 AND Z=1 THEN PRINT"you hit the jack pot. a drop of 100 coynes. your luck must be in. ":C=C+100:GOSUB 2000
810 IF X=2 AND Y=2 AND Z=1 THEN C=C+5:PRINT"a drop of 5 coynes, you have"C"coynes left.":GOSUB 2000
820 IF X=2 AND Y=2 AND Z>1 THEN C=C+3:PRINT"a drop of 3 coynes, you have"C"coynes left.":GOSUB 2000
830 IF X=3 AND Y=3 AND Z=3 THEN C=C+10:PRINT"a drop of 10 coynes. you have "C" coynes left.":GOSUB 2000
840 IF X=4 AND Y=4 AND Z=4 THEN C=C+14:PRINT"a drop of 14 coynes. you have "C" coynes left.":GOSUB 2000
850 IF X=5 AND Y=5 AND Z=5 THEN C=C+18:PRINT"a drop of 18 coynes. you have "C" coynes left.":GOSUB 2000
860 IF Q=1 THEN GOSUB 2000
870 GOTO 310
880 PRINT". ladies and gentlemen. its 9 p m.":FOR O=1 TO 500000!:NEXT O:PRINT"LIGHTS PLEASE.":FOR O=1 TO 500000!:NEXT O:PRINT"THEY SHALL GROW NOT OLD, AS WE WHO ARE LEFT GROW OLD. AGE SHALL NOT WEERIE THEM, NOR THE YEARS CONDEMn."
890 PRINT"AT THE GOING down OF THE SUn, AND IN THE MORNING, WE WILL REMember them.":FOR O=1 TO 500000!:NEXT O:PRINT"lest we forget.":FOR O=1 TO 500000!:NEXT O:PRINT"lights please.":FOR O=1 TO 500000!:NEXT O
900 GOTO 740
910 INPUT"set the reals.";X,Y,Z:X=INT(X):Y=INT(Y):Z=INT(Z):GOTO 490
920 PRINT"you have "C" coines left.":RETURN
930 INPUT"how many coines do you want to take out.";TC:TC=INT(TC)
940 TC=ABS(TC):TT=TT+TC:IF C-TC<0 THEN PRINT"no cheeting this machine can ad.":GOTO 930
950 C=C-TC:PRINT"you now have "C" coins left.":FOR J5=1 TO 5000:FOR J6=1 TO 400:NEXT J6:NEXT J5RETURN
960 PRINT"you started to play at "ST$" and finished at "LEFT$(TIME$,5)"."
970 PRINT"so far "PS" coines have been played "TT" coines have been taken out"
980 PRINT"the machine has paid out a total of "PO" coins"
990 IF C-YB<0 THEN 1010
1000 YT=C-YB+TC:PRINT"you are "YT" coines in front. thank you. the club may have better luck next time.":SYSTEM
1010 YT=C-YB-TC:YT=ABS(YT)+YB:PRINT"you are "YB-C" coines down. next time you had better stay at the bar. . .":SYSTEM
1020 PRINT"thank you for your investment. . .":SYSTEM
1030 PRINT"you started to play at "ST$" and it is now "LEFT$(TIME$,5)"."
1040 PRINT"so far "PS" coines have been played, and "TT" coines have been taken out"
1050 PRINT"the machine has paid out a total of "PO" coins."
1060 IF C-YB<0 THEN 1080
1070 YT=C-YB:PRINT"you are "YT" coines in front.":RETURN
1080 YT=C-YB:YT=ABS(YT):PRINT"you are "YT" coines down.":RETURN
2000 FOR J5=1 TO 1000:FOR J6=1 TO 100:NEXT J6:NEXT J5:RETURN
