-
Notifications
You must be signed in to change notification settings - Fork 0
/
slot.bas
206 lines (206 loc) · 5.08 KB
/
slot.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
10 SCREEN 3
20 COLOR 1,0
30 CLS
40 A1$="\XD5\XC3\XC9"
50 A2$="\XC2"
60 A3$="\XCA\XC3\XCB"
70 C$="\XC1\XC1\XC1\XC1\XD3\XD3\XD3\XD3\XD8\XD8\XD8\XD8\XDA\XDA\XDA\XDA\XD1\XD1\XD1OO7\XD6\XD6\XD6"
72 D$="1111222233334444555667888"
80 L=LEN(C$)
85 J1=0: G=3:Z=0
90 RP=1: W1=1: W2=5: W3=10: W4=25: W5=50
99 GOSUB 20000: GOSUB 1000:GOTO 500
100 GOSUB 1000:GOSUB 800
110 W=0
120 G=G-1
130 Z=Z+1
140 IF INT(Z/3) = Z/3 THEN J1=J1+1
200 FOR K =1 TO 5
205 FOR J =1 TO 3
207 FOR I =1 TO J
210 R(I) = INT(RND(TI)*L)+1
220 X=I*10-3
230 Y=20
240 SY=R(I)
245 SI=I: GOSUB 20100
250 GOSUB 3000
255 FOR L1=1 TO K: GOSUB 30400:NEXT L1
260 NEXT I
266 NEXT J
267 NEXT K
280 A=VAL(MID$(D$,R(1),1))
290 B=VAL(MID$(D$,R(2),1))
300 C=VAL(MID$(D$,R(3),1))
307 COLOR 1
310 IF A=B AND B=C THEN GOTO 400
320 IF A=B OR A=C OR B=C THEN GOTO 450
330 IF A=8 AND B=8 AND C=8 THEN W=W3: M$="3 JOKER":GOTO 500
340 IF A=8 OR B=8 OR C=8 THEN W=W1: M$="1 JOKER":GOTO 500
380 M$="LOOSE"
390 GOTO 500
400 M$="MATCH 3":GOSUB 21000
405 IF A=1 OR A=2 OR A=3 OR A=4 THEN W=W2:GOTO 500
410 IF A=5 THEN W=W3: GOTO 500
420 IF A=6 THEN W=W4: GOTO 500
430 IF A=7 THEN W=W5+J1: J1=0: GOTO 600
440 W=W3: GOTO 500
450 M$="MATCH 2 AND JOKER"
455 IF A=8 OR B=8 OR C=8 THEN W=W2: GOTO 500
460 M$="MATCH 2"
465 W=0: GOTO 500
500 LOCATE 25,10:COLOR 5: PRINT RPT$(32,INT((20-LEN(M$))/2));M$
510 LOCATE 26,10:PRINT "YOU WON: "; W
520 G=G+W: GOSUB 1000: COLOR 5
530 IF G>0 THEN LOCATE 27,8 : PRINT "PRESS ENTER TO SPIN":GOTO 550
540 LOCATE 28,8 :PRINT "PRESS C TO INSERT COIN": GOTO 550
545 LOCATE 27,8: PRINT "PRESS ENTER TO SPIN"
550 GET A$:GOSUB 30400: IF A$=""THEN GOTO 550
560 REM SOUND
570 IF A$="C" THEN G=G+1:GOSUB 21200: GOSUB 1000: GOTO 545
580 IF ASC(A$)=13 AND G>0 THEN GOSUB 21200: GOTO 100
585 IF ASC(A$)=27 THEN GOTO 60000
590 GOTO 550
600 LOCATE 25,10:PRINT "J A C K P O T"
610 GOSUB 21000
620 GOTO 520
790 GOTO 100
800 FOR I1=25 TO 28:LOCATE I1,2
810 PRINT RPT$(32,38);
815 NEXT I1
820 RETURN
1000 LOCATE 1,1: COLOR 1
1010 IF RP = 0 THEN GOTO 1500
1020 PRINT "LAST WIN JACKPOT COINS"
1030 PRINT RPT$(32,40)
1040 LOCATE 3,1
1050 PRINT W;
1060 LOCATE 3,18
1070 PRINT J;
1080 LOCATE 3,35
1090 PRINT G;
1200 FOR I =1 TO 3
1210 Y=5: X=I*3
1220 SY=22: GOSUB 3000
1230 Y=8: X=I*3
1240 SY=20: GOSUB 3000
1250 Y=11: X=I*3
1260 SY=18: GOSUB 3000
1270 Y=14: X=I*3
1280 SY=23: GOSUB 3000
1310 Y=5: X=I*3+20
1320 SY=1: GOSUB 3000
1330 Y=8: X=I*3+20
1340 SY=5: GOSUB 3000
1350 Y=11: X=I*3+20
1360 SY=9: GOSUB 3000
1370 Y=14: X=I*3+20
1380 SY=13: GOSUB 3000
1400 NEXT I
1410 LOCATE 6,12: PRINT W5;"C"
1420 LOCATE 9,12: PRINT W4;"C"
1430 LOCATE 12,12: PRINT W3;"C"
1440 LOCATE 15,12: PRINT W3;"C"
1450 LOCATE 6,32: PRINT W2;"C"
1460 LOCATE 9,32: PRINT W2;"C"
1470 LOCATE 12,32: PRINT W2;"C"
1480 LOCATE 15,32: PRINT W2;"C"
1485 GOSUB 30000
1490 RP=0
1500 REM NO REPAINT
1520 LOCATE 3,1: COLOR 4
1530 PRINT RPT$(32,40)
1540 LOCATE 3,1
1550 PRINT W;
1560 LOCATE 3,18
1570 PRINT J1;
1580 LOCATE 3,35
1590 PRINT G;
1600 COLOR 1
1999 RETURN
3000 LOCATE Y,X
3010 C=VAL(MID$(D$,SY,1))
3020 COLOR C
3030 PRINT A1$;
3040 LOCATE Y+1,X
3050 PRINT A2$;MID$(C$,SY,1);A2$
3080 LOCATE Y+2,X
3090 PRINT A3$
3190 RETURN
20000 REM SOUND
20010 FMINIT
20020 FMVIB 200,15
20030 RETURN
20100 FMPLAY 2,"O4"
20110 ON SI GOTO 20200,20300,20400
20200 FMCHORD 0,"I11CI11EI11G"
20210 GOTO 20500
20300 FMCHORD 0,"I11DI11FI11A"
20310 GOTO 20500
20400 FMCHORD 0,"I11EI11FI11H"
20500 RETURN
21000 REM JACKPOT SOUND
21010 FMCHORD 0,"I11CI11EI11G"
21020 SLEEP 30
21030 FMCHORD 0,"I11EI11GI11H"
21040 SLEEP 30
21050 FMCHORD 0,"I11FI11AI11>C<"
21060 SLEEP 30
21070 FMCHORD 0,"I11EI11GI11H"
21080 SLEEP 30
21090 FMCHORD 0,">I11CI11EI11G<"
21100 SLEEP 40
21110 RETURN
21200 FMCHORD 0,">I11CI11EI11G<"
21210 SLEEP 1: GOSUB 30400
21900 RETURN
30000 Y=17:X= 40
30020 A9$= "\XD5"+RPT$(ASC("\XC3"),38)+"\XC9"
30025 B9$="\XC2"
30030 C9$= "\XCA"+RPT$(ASC("\XC3"),38)+"\XCB"
30035 C=0:LOCATE Y,1
30040 FOR I=1TO40
30042 COLOR 9+C
30045 PRINT MID$(A9$,I,1);
30050 C=C+1:IF C=5 THEN C=0
30065 NEXT I
30070 FOR I=1 TO 11
30075 COLOR 9+C
30080 LOCATE Y+I,X: PRINT B9$;
30085 C=C+1:IF C=5 THEN C=0
30090 NEXT I
30100 FOR I=40TO1STEP-1
30102 COLOR 9+C
30105 LOCATE Y+12,I:PRINT MID$(C9$,I,1);
30110 C=C+1:IF C=5 THEN C=0
30120 NEXT I
30150 FOR I=11 TO 1 STEP -1
30160 COLOR 9+C
30170 LOCATE Y+I,1: PRINT B9$;
30180 C=C+1:IF C=5 THEN C=0
30190 NEXT I
30195 GOSUB 30300
30200 RETURN
30300 REM RAINBOW
30310 VPOKE 1,$FA00+19,3
30315 VPOKE 1,$FA00+18,0
30320 VPOKE 1,$FA00+21,6
30325 VPOKE 1,$FA00+20,0
30330 VPOKE 1,$FA00+23,9
30335 VPOKE 1,$FA00+22,0
30340 VPOKE 1,$FA00+25,12
30345 VPOKE 1,$FA00+24,0
30350 VPOKE 1,$FA00+27,15
30355 VPOKE 1,$FA00+26,0
30360 RETURN
30400 REM BACKGROUND WORKER RAINBOW
30410 CO=VPEEK(1,$FA00+19)
30420 VPOKE 1,$FA00+19,VPEEK(1,$FA00+21)
30430 VPOKE 1,$FA00+21,VPEEK(1,$FA00+23)
30440 VPOKE 1,$FA00+23,VPEEK(1,$FA00+25)
30450 VPOKE 1,$FA00+25,VPEEK(1,$FA00+27)
30460 VPOKE 1,$FA00+27,CO
30465 SLEEP 1
30470 RETURN
60000 SCREEN 0
60010 COLOR 1,6
60020 CLS