!*************************** AMUS Program Label ****************************** ! Filename: FRUIT2.BAS Date: 04/21/89 ! Category: GAME Hash Code: 562-067-233-674 Version: 0.0 ! Initials: WYCH/AM Name: W. HARTGERS ! Company: OMEGON COMPUTER SYSTEMS HOLLAND Telephone #: ! Related Files: VERIFY.SBR, PACMAN.SBR (BOTH OF WHICH ARE IN [100,100] ! Min. Op. Sys.: 1.3B AMOSL Expertise Level: BEG ! Special: ! Description: Game which simulates a slot machine. Note that PACMAN.SBR must ! be loaded into user memory partition for game to run. (.LOAD PACMAN.SBR) ! !***************************************************************************** !************************************************************************* !** BELLFRUIT SIMULATOR BY : W HARTGERS / OMEGON COMPUTERSYSTEMS * !** HOLLAND * !** * !** CONVERTED VERSION (TO ENGLISH) * !** AND : MADE TERMINAL-INDEPENDENT * !** * !** If you like this game, or have some suggestions, please send * !** mail to W Hartgers - WYCH/AM * !** * !** * !************************************************************************* RANDOMIZE STRSIZ 80 PRINT "FRUIT By W Hartgers / Arnhem (HOLLAND)" FOR I=1 TO 500 : NEXT I DIM BAR$(15) DIM TXT1$(30) DIM RX$(20) MAP1 T$,S,45 PRINT TAB(-1,29); XCALL VERIFY,"PACMAN.SBR" XCALL PACMAN BAR$(01) ="CHERRY*1" BAR$(02) ="PEAR 2" BAR$(03) ="BELL *3" BAR$(04) ="B A R 4" BAR$(05) ="OMEGON*5" BAR$(06) ="APPLE 6" BAR$(07) ="CHERRY*1" BAR$(08) ="BELL 3" BAR$(09) ="APPLE *6" BAR$(10) ="PEAR 2" BAR$(15) ="CHERRY*1" BAR$(11) ="OMEGON*5" BAR$(12) ="APPLE 6" BAR$(13) ="CHERRY*1" BAR$(14) ="B A R 4" A1: READ TXT1$ IF TXT1$="END" GOTO A2 MES1=MES1+1 TXT1$(MES1)=TXT1$ GOTO A1 A2: INPUT "Instructions y/n : ",I$ I$=UCS(I$) IF I$="Y" GOSUB HELP BEG: PRINT TAB(-1,36); PRINT TAB(-1,0); PRINT TAB(-1,23) PRINT TAB(01,01);TAB(-1,38) FOR I=1 TO 78 PRINT TAB(1,I+1);TAB(-1,52); NEXT I PRINT TAB(01,80);TAB(-1,39); FOR I=2 TO 09 PRINT TAB(I,1);TAB(-1,53); PRINT TAB(I,80);TAB(-1,53); NEXT I PRINT TAB(10,01);TAB(-1,44); FOR I=2 TO 44 PRINT TAB(10,I);TAB(-1,52); NEXT I PRINT TAB(10,45);TAB(-1,42); FOR I=46 TO 79 PRINT TAB(10,I);TAB(-1,52); NEXT I PRINT TAB(10,80);TAB(-1,43); RX$(1)="77777 777777 7 7 777777 77777 7 7 77777 7777777" RX$(2)="7 7 7 7 7 7 7 7 7 7 7 7 " RX$(3)="7 7 7 7 7 7 7 7 7 7 7 7 " RX$(4)="77777 777777 7 7 77 777777 77777 7 7 7 7 " RX$(5)="7 7 7 7 7 7 7 7 7 7 7 7 " RX$(6)="7 7 7 7 7 7 7 7 7 7 7 7 " RX$(7)="77777 777777 777777 777777 7 7 7 777777 77777 7 " FOR I=1 TO 7 FOR II=1 TO LEN(RX$(I)) IF RX$(I)[II;1] <> " " THEN PRINT TAB(I+1,4+II);TAB(-1,49); NEXT II NEXT I FOR I=11 TO 23 PRINT TAB(I,1);TAB(-1,53); PRINT TAB(I,45);TAB(-1,47); PRINT TAB(I,80);TAB(-1,53); NEXT I PRINT TAB(23,01);TAB(-1,40); FOR I=2 TO 44 PRINT TAB(23,I);TAB(-1,52); NEXT I PRINT TAB(23,45);TAB(-1,45); FOR I=46 TO 79 PRINT TAB(23,I);TAB(-1,52); NEXT I PRINT TAB(23,80);TAB(-1,41); PRINT TAB(-1,24); PRINT TAB(11,3);" ROLL 1 ROLL 2 ROLL 3 "; PRINT TAB(-1,23); FOR I=1 TO 3 IF I=1 THEN S=3 IF I=2 THEN S=16 IF I=3 THEN S=29 PRINT TAB(12,S);TAB(-1,38); FOR II=1 TO 10 : PRINT TAB(12,S+II);TAB(-1,52); : NEXT II PRINT TAB(12,S+11);TAB(-1,39); NEXT I FOR I=1 TO 3 IF I=1 THEN S=3 IF I=2 THEN S=16 IF I=3 THEN S=29 PRINT TAB(13,S);TAB(-1,47);TAB(13,S+1);TAB(-1,38); FOR II=1 TO 08 : PRINT TAB(13,S+II+1);TAB(-1,52); : NEXT II PRINT TAB(13,S+10);TAB(-1,39);TAB(13,S+11);TAB(-1,47); NEXT I FOR I=1 TO 3 IF I=1 THEN S=3 IF I=2 THEN S=16 IF I=3 THEN S=29 PRINT TAB(14,S);TAB(-1,44);TAB(14,S+1);TAB(-1,43); PRINT TAB(14,S+10);TAB(-1,44);TAB(14,S+11);TAB(-1,43); NEXT I FOR I=1 TO 3 IF I=1 THEN S=3 IF I=2 THEN S=16 IF I=3 THEN S=29 PRINT TAB(15,S);TAB(-1,47);TAB(15,S+1);TAB(-1,40); FOR II=1 TO 08 : PRINT TAB(15,S+II+1);TAB(-1,52); : NEXT II PRINT TAB(15,S+10);TAB(-1,41);TAB(15,S+11);TAB(-1,47); NEXT I FOR I=1 TO 3 IF I=1 THEN S=3 IF I=2 THEN S=16 IF I=3 THEN S=29 PRINT TAB(16,S);TAB(-1,40); FOR II=1 TO 10 : PRINT TAB(16,S+II);TAB(-1,52); : NEXT II PRINT TAB(16,S+11);TAB(-1,41); NEXT I PRINT TAB(18,3);TAB(-1,38); FOR I=1 TO 37: PRINT TAB(18,I+3);TAB(-1,46); : NEXT I PRINT TAB(18,40);TAB(-1,39); PRINT TAB(19,3);TAB(-1,47);TAB(19,40);TAB(-1,47); PRINT TAB(20,3);TAB(-1,47);TAB(20,40);TAB(-1,47); PRINT TAB(21,3);TAB(-1,44); FOR I=1 TO 37: PRINT TAB(21,I+3);TAB(-1,46); : NEXT I PRINT TAB(21,40);TAB(-1,43); PRINT TAB(21,18);TAB(-1,42);TAB(21,31);TAB(-1,42); PRINT TAB(22,3);TAB(-1,47); PRINT TAB(22,18);TAB(-1,47); PRINT TAB(22,31);TAB(-1,47); PRINT TAB(22,40);TAB(-1,47); PRINT TAB(23,3);TAB(-1,40); FOR I=1 TO 37: PRINT TAB(23,I+3);TAB(-1,52); : NEXT I PRINT TAB(23,3);TAB(-1,40);TAB(23,40);TAB(-1,41); PRINT TAB(23,18);TAB(-1,45);TAB(23,31);TAB(-1,45); PRINT TAB(-1,24);TAB(22,4);"GAMES :";TAB(22,20);"BONUS: "; PRINT TAB(22,32);"WIN:"; IF SWHELP=0 THEN SPEL =15 IF SWHELP=0 THEN BONUS =00 GOSUB NUMBERS IF SWHELP=0 THEN SWVAST =0 IF SWHELP=0 THEN GOSUB INIT : SWVAST=1 GOSUB DISPL PRINT TAB(22,37);" "; PRINT TAB(11,48);"OMEGON OMEGON OMEGON 10 BONUS" PRINT TAB(12,48);"B A R B A R B A R 5 BONUS" PRINT TAB(13,48);"BELL BELL BELL 5 BONUS" PRINT TAB(14,48);"PEAR PEAR PEAR 20"; PRINT TAB(15,48);"APPLE APPLE APPLE 20"; PRINT TAB(16,48);"CHERRY CHERRY CHERRY 10"; PRINT TAB(17,48);"OMEGON OMEGON - 10"; PRINT TAB(18,48);"B A R B A R - 10"; PRINT TAB(19,48);"CHERRY CHERRY - 4"; PRINT TAB(21,48);"Every '*' at bonus time gives "; PRINT TAB(22,48);"20 points "; IF SWVALS=1 THEN PRINT TAB(22,70);"CHEAT"; IF SWHELP=0 THEN SWSIL=1 T$=" 2 3 4 " PRINT TAB(22,36);:PRINT " "; PRINT TAB(19,5);"GAMBLE: x ";T$;" or T(ake)";TAB(-1,37); BEGIN: BEGX: GOSUB ACCEPT PRINT TAB(-1,29); IF SWAUT=0 THEN SPEL=SPEL-1 SWX=0 : IF BONUS=1 THEN SWX=1 SWF=0 GOSUB NUMBERS GOSUB ROLL IF SWAUT=1 THEN FOR DEL=1 TO 10000 : NEXT DEL GOSUB WINNING GOSUB NUMBERS IF BONUS <>0 THEN BONUS=BONUS-1 PRINT TAB(22,36);:PRINT " "; SWVAST =0 IF VAST1=1 OR VAST2=1 OR VAST3=1 THEN SWVAST=1 IF WIN<>0 THEN SWVAST=1 IF SPEL=0 GOTO EIND GOTO BEGIN ROLL: PRINT TAB(24,01);SPACE(60); F=RND : F1=INT(F*15) IF F1>3 GOTO ROLLA XTXT=RND : YTXT=INT(XTXT*MES1) IF YTXT < 1 GOTO ROLLA IF YTXT > MES1 GOTO ROLLA ! T$=TXT1$(YTXT) ! PRINT TAB(24,01);TAB(-1,21); ! FOR XT=1 TO LEN(T$) ! PRINT T$[XT;1];" "; ! FOR XTT=1 TO 600 : NEXT XTT ! NEXT XT ! PRINT TAB(24,65);TAB(-1,22);" "; ! FOR XTT=1 TO 2000 : NEXT XTT ROLLA: DD=10 A=RND:AA=INT(A*40) : IF AA<4 GOTO ROLL IF VAST2 = 1 AND VAST3 = 1 THEN AA=AA*3 IF VAST2 = 1 AND VAST3 <> 1 THEN AA=AA*2 IF VAST2 <> 1 AND VAST3 = 1 THEN AA=AA*2 IF VAST1=1 AND VAST2=1 AND VAST3=1 THEN RETURN FOR I=1 TO AA IF TIME<>OT GOSUB TIM DD=DD+15 IF VAST1<>1 THEN ROL1=ROL1+1 : IF ROL1>15 THEN ROL1=1 PRINT TAB(14,6);BAR$(ROL1)[1;6]; IF VAST2<>1 THEN ROL2=ROL2+1 : IF ROL2>15 THEN ROL2=1 PRINT TAB(14,19);BAR$(ROL2)[1;6]; IF VAST3<>1 THEN ROL3=ROL3+1 : IF ROL3>15 THEN ROL3=1 PRINT TAB(14,32);BAR$(ROL3)[1;7]; NEXT I IF SWSIL=0 THEN PRINT CHR$(7); IF VAST2=1 AND VAST3=1 THEN RETURN ROLL2: A=RND:AA=INT(A*10) : IF AA<3 GOTO ROLL2 FOR I=1 TO AA IF TIME<>OT GOSUB TIM DD=DD+30 IF VAST2<>1 THEN ROL2=ROL2+1 : IF ROL2>15 THEN ROL2=1 PRINT TAB(14,19);BAR$(ROL2)[1;6]; B=RND : BB=INT(B*10) : IF INT(BB/2)=BB/2 THEN GOTO ROLL2A ! IF SPEL<25 GOTO ROLL2A IF BAR$(ROL1)[1;8]<>BAR$(ROL2)[1;8] GOTO ROLL2A IF ROL2=15 THEN ROL2=1 ELSE ROL2=ROL2+1 PRINT TAB(14,19);BAR$(ROL2)[1;6]; ROLL2A: IF VAST3<>1 THEN ROL3=ROL3+1 : IF ROL3>15 THEN ROL3=1 PRINT TAB(14,32);BAR$(ROL3)[1;7]; FOR Y=1 TO DD : NEXT Y IF TIME<>OT GOSUB TIM NEXT I IF SWSIL=0 THEN PRINT CHR$(7); IF VAST3=1 THEN RETURN ROLL3: A=RND:AA=INT(A*5) : IF AA<3 GOTO ROLL3 FOR I=1 TO AA IF TIME<>OT GOSUB TIM DD=DD+30 IF VAST3<>1 THEN ROL3=ROL3+1 : IF ROL3>15 THEN ROL3=1 PRINT TAB(14,32);BAR$(ROL3)[1;7]; FOR Y=1 TO DD : NEXT Y IF TIME<>OT GOSUB TIM NEXT I IF SWSIL=0 THEN PRINT CHR$(7); RETURN INIT: A=RND : AA=INT(A*16) : IF AA<1 GOTO INIT IF AA>15 GOTO INIT ROL1=AA INIT2: A=RND : AA=INT(A*16) : IF AA<1 GOTO INIT2 IF AA>15 GOTO INIT2 ROL2=AA INIT3: A=RND : AA=INT(A*16) : IF AA<1 GOTO INIT3 IF AA>15 GOTO INIT3 ROL3=AA RETURN ACCEPT: PRINT TAB(17,40);TAB(-1,35); VAST1=0 : VAST2=0 : VAST3=0 IF SWVAST=1 THEN PRINT TAB(17,03);& " ";:& PRINT TAB(24,65);:GOTO ACC2 PRINT TAB(-1,23); PRINT TAB(17,05);TAB(-1,21);TAB(-1,49);TAB(-1,49);& TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,22); PRINT TAB(17,18);TAB(-1,21);TAB(-1,49);TAB(-1,49);& TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,22); PRINT TAB(17,31);TAB(-1,21);TAB(-1,49);TAB(-1,49);& TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,49);TAB(-1,22); PRINT TAB(-1,24);TAB(24,65); ACC2: IF TIME<>OT GOSUB TIM XCALL PACMAN,P$: IF LEN(P$)=0 AND SWAUT=0 GOTO ACC2 IF P$=CHR$(2) THEN GOSUB BOSS : SWHELP=1 : GOTO BEG IF P$=CHR$(27) THEN PRINT TAB(-1,28);TAB(-1,0);:GOTO EINDE IF P$=CHR$(13) THEN PRINT TAB(-1,29);TAB(24,65);:RETURN IF P$=CHR$(185) GOSUB HELP : SWHELP=1 : GOTO BEG P$ =UCS(P$) IF P$="S" AND SWSIL=0 THEN SWSIL=1 : PRINT TAB(22,78);" "; ELSE& IF P$="S" AND SWSIL=1 THEN SWSIL=0 : PRINT TAB(22,78);"S"; IF P$="A" AND SWAUT=0 THEN SWAUT=1 : PRINT TAB(22,77);"A"; ELSE& IF P$="A" AND SWAUT=1 THEN SWAUT=0 : PRINT TAB(22,77);" "; IF SWAUT=1 THEN RETURN IF P$="@" THEN SPEL=SPEL+100 : SWVALS=1 :& PRINT TAB(22,70);"Cheat!"; IF SWVAST=1 GOTO ACC2 IF P$="C" THEN GOTO ACCEPT IF P$<"1" OR P$>"3" GOTO ACC2 IF P$="1" THEN VAST1=1: PRINT TAB(17,05);" "; : GOTO ACC2 IF P$="2" THEN VAST2=1: PRINT TAB(17,18);" "; : GOTO ACC2 IF P$="3" THEN VAST3=1: PRINT TAB(17,31);" "; : GOTO ACC2 GOTO ACC2 NUMBERS: PRINT TAB(22,11);:PRINT USING "####";SPEL; PRINT TAB(22,26);:PRINT USING "####";BONUS; RETURN DISPL: PRINT TAB(14,6);BAR$(ROL1)[1;6]; PRINT TAB(14,19);BAR$(ROL2)[1;6]; PRINT TAB(14,32);BAR$(ROL3)[1;7]; RETURN WINNING: PRINT TAB(22,36);" "; XX$="" XX$=BAR$(ROL1)[8;1]+BAR$(ROL2)[8;1]+BAR$(ROL3)[8;1] BON=0:PNT=0:WIN=0 IF XX$="555" THEN BON=10:GOSUB FLASH: GOTO WIN5 IF XX$="444" THEN BON=5 :GOSUB FLASH: GOTO WIN5 IF XX$="333" THEN BON=5 :GOSUB FLASH: GOTO WIN5 IF (BONUS <> 0 OR SWX=1) AND BAR$(ROL3)[7;1]="*" THEN PNT=20 : GOTO WIN5 IF XX$="666" THEN PNT=20: GOTO WIN5 IF XX$="222" THEN PNT=20: GOTO WIN5 IF XX$="111" THEN PNT=10: GOTO WIN5 IF XX$[1;2]="55" THEN PNT=10 : GOTO WIN5 IF XX$[1;2]="44" THEN PNT=10: GOTO WIN5 IF XX$[1;2]="11" THEN PNT=4 : GOTO WIN5 GOTO WIN90 WIN5: IF PNT=0 GOTO WIN10 IF BONUS<1 AND SWAUT=0 GOSUB GAMBLE IF PNT=0 GOTO WIN10 WIN=1 FOR XXXX=SPEL TO SPEL+PNT-1 IF TIME<>OT GOSUB TIM PRINT TAB(22,11);:PRINT USING "####";XXXX; FOR Y=1 TO 800 : NEXT Y NEXT XXXX SPEL =XXXX GOTO WIN90 WIN10: IF BON=0 GOTO WIN90 WIN=1 FOR XXXX=BONUS TO BONUS+BON-1 IF TIME<>OT GOSUB TIM PRINT TAB(22,26);:PRINT USING "####";XXXX; FOR Y=1 TO 800 : NEXT Y NEXT XXXX BONUS =XXXX WIN90: RETURN FLASH: FOR II=1 TO BON*2 IF TIME<>OT GOSUB TIM PRINT TAB(24,70);TAB(-1,36); FOR Y=1 TO 380 : NEXT Y PRINT TAB(24,70);TAB(-1,37); FOR Y=1 TO 480 : NEXT Y NEXT II RETURN GAMBLE: T$=" 2 3 4 " : TX$=T$:P=0 PRINT TAB(22,36);:PRINT USING "####";PNT; PRINT TAB(19,5);"GAMBLE: x ";T$;" or T(ake)"; GAM1: P=P+1 : IF P=13 THEN P=1 PRINT TAB(20,14); XCALL PACMAN,POS$ IF LEN(POS$)<>0 GOTO GAM5 PRINT SPACE(P);TAB(-1,23);TAB(-1,64);;TAB(-1,24);SPACE(12); GOTO GAM1 GAM5: IF POS$=CHR$(27) THEN PRINT TAB(-1,28);TAB(-1,0);:GOTO EINDE IF POS$=CHR$(13) GOTO GAM8 IF POS$="T" OR POS$="t" GOTO GAM9 GOTO GAM1 GAM8: LX=RND : LY=INT(LX*50) FOR LX=1 TO LY IF TIME<>OT GOSUB TIM P=P+1 : IF P=13 THEN P=1 PRINT TAB(20,14); PRINT SPACE(P);TAB(-1,23);TAB(-1,64);;TAB(-1,24);SPACE(12); FOR DEL=1 TO LX*10 NEXT DEL NEXT LX IF T$[P;1]=" " THEN PNT=0 : GOTO GAM85 WW=VAL(T$[P;1]) PNT=PNT*WW FOR L=1 TO 5000 NEXT L GOTO GAMBLE GAM85: PRINT TAB(22,36);:PRINT " "; GAM9: WIN=1 RETURN EIND: PRINT TAB(24,1);TAB(-1,28); PRINT "Sorry, out of points. It was nice to play a game with" PRINT "you. BYE BYE, press enter : ";TAB(-1,9); INPUT "",J GOTO EINDE HELP: PRINT TAB(-1,36); PRINT TAB(-1,0);TAB(-1,30); PRINT "BELL-FRUIT by W Hartgers / Omegon"; TAB(-1,31) PRINT "This program simulates a slot-machine." PRINT "Decriptions of used keys : " PRINT "RETURN - Start the game or stop the rolling " PRINT " when gambling." PRINT "1/2/3 - When the lights are flashing, use these keys to " PRINT " 'hold' the bars. (Only when prev. not hold or" PRINT " a winning combination was given)." PRINT "C - Release the 'holds'" PRINT "ESC - Abort the game" PRINT "A - Play automatic" PRINT " " PRINT "S - Sound on/off" PRINT "The winning combinations are shown on the screen." PRINT "After swinning, it's possible to gamble for a higher" PRINT "winning (x 1, 2, 3 of 4)." PRINT "At bonus time, every '*' in last rol gives 20 points." PRINT "At bonus time, no gambling is allowed." PRINT " " PRINT TAB(-1,37); PRINT "Press ENTER to continue : "; : INPUT I$ PRINT TAB(-1,36); PRINT TAB(3,1);TAB(-1,10); PRINT " " RETURN DATA1: DATA "Let play a little game !" DATA "He're we go again!" DATA "Plop, Plop, Plop!" DATA "Turn, turn, turn" DATA "Lovely rolling..." DATA "Like a rolling stone.." DATA "Fun Fun Fun Fun" DATA "Aaaaaarch" DATA "Like to go on ...!" DATA "Don't you have to continue with your work?" DATA "END" TIM: OT=TIME: PRINT TAB(24,70); UU=0 : MM=0 : SS=0 TIM1: IF OT > 3599 THEN UU=UU+1 : OT=OT-3600 : GOTO TIM1 TIM2: IF OT > 60 THEN MM=MM+1 : OT=OT-60 : GOTO TIM2 SS=OT PRINT USING "#Z";UU; : PRINT ":"; PRINT USING "#Z" ;MM; : PRINT ":"; PRINT USING "#Z";SS; OT=TIME RETURN EINDE: END BOSS: PRINT TAB(-1,0);TAB(1,1) LOOKUP "BOSS.DAT",SW IF SW= 0 THEN PRINT TAB(23,1);"File not found" : GOTO BOSS9 OPEN #1,"BOSS.DAT",INPUT BOSS1: IF EOF(1) THEN CLOSE #1 :GOTO BOSS9 INPUT LINE #1,REC$ : PRINT REC$ : GOTO BOSS1 BOSS9: XCALL PACMAN,P$ IF P$<>CHR$(2) GOTO BOSS9 RETURN