⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pirate.bas

📁 smallbasic for linux
💻 BAS
📖 第 1 页 / 共 2 页
字号:
100 REM *******************110 REM *  PIRATE ISALND  *120 REM *                 *130 REM *        BY       *140 REM *   DAVID MENY    *150 REM *******************160 CLS170 DIM A(45,6),O1$(20),O2$(20),TR(14),IN$(14),RO$(45)171 GOSUB 20000:REM INITIALIZE172 LOCATE 21,1173 PRINT "Pirate Island by David Meny"174 PRINT "Copyright 1985, Menco, Inc."175 PRINT176 PRINT "  In your sleep, you dream of valiant pirates who sail across the seas, finding"177 PRINT "secret treasure hidden deep inside dangerous islands."178 PRINT "  You dream of adventourous fights to the death between pirates over gold-laced"179 PRINT "statues or chest of gold coins from a long time ago."180 PRINT "  You dream and dream until the rocking of the seas wakens you on board the ship"185 PRINT "'The Eagle's Nest', a pirate ship!":PRINT190 GOSUB 15000:REM PRINT ROOM DESCRIPTION200 GOSUB 14000:REM PRINT ROOM CONTENTS210 IF START=1 THEN MV=MV+1 ELSE 219211 IF MV=10 THEN TR(2)=RO ELSE 219212 PRINT "The captain walks up to you."213 IF FLAG98=1 THEN 216214 PRINT "'You fool!! We have been sailing for days now and we haven't found Pirate":PRINT "Island. I shouldn't have trusted you, even though you are my grand son.'"215 PRINT "The captain pulls out his cutlass and decapitates you.":GOTO 2000216 PRINT "'Congradulations!! We've come ashore on ze' old Pirate Island. Now go ashore by":PRINT "the east starboard deck.' The captain then hands you a bag of silver."217 PRINT "'Spend it wisely. It's your payment IF you don't come back.'":TR(2)=25:A(39,2)=22:FLAG97=1:TR(14)=200219 PRINT:INPUT ">",A$220 IF A$="" THEN PRINT:PRINT "What?":GOTO 210230 AST=ASC(A$)240 IF AST<65 OR AST>90 THEN PRINT:PRINT "I can only use capital letters, matey.":GOTO 210245 IF A$="LOOK UNDER JULIUS" THEN GOSUB 8010:GOTO 210246 IF A$="LOOK UNDER PIRATE ISLAND" THEN GOSUB 8150:GOTO 210247 IF A$="LOOK UNDER DAVID MENY" THEN GOSUB 8300:GOTO 210250 M=LEN(A$):IF M<7 THEN A$=A$+" ":GOTO 250260 KW=0:B$=LEFT$(A$,3)270 IF B$="INV" OR B$="I  " THEN GOSUB 1000:GOTO 210280 IF B$="SCO" THEN GOSUB 1500:GOTO 210285 IF B$="DIG" THEN GOSUB 2250:GOTO 210286 IF B$="KNO" THEN GOSUB 6500:GOTO 210290 IF B$="QUI" OR B$="Q  " THEN GOSUB 2000300 IF B$="LOO" OR B$="L  " THEN PRINT:GOTO 190305 IF B$="SWI" THEN GOSUB 8500:GOTO 210310 IF B$="N  " THEN C$="N  ":KW=1:GOSUB 2500:GOTO 210320 IF B$="S  " THEN C$="S  ":KW=1:GOSUB 2500:GOTO 210330 IF B$="E  " THEN C$="E  ":KW=1:GOSUB 2500:GOTO 210340 IF B$="W  " THEN C$="W  ":KW=1:GOSUB 2500:GOTO 210350 IF B$="U  " THEN C$="U  ":KW=1:GOSUB 2500:GOTO 210360 IF B$="D  " THEN C$="D  ":KW=1:GOSUB 2500:GOTO 210370 N=1380 IF MID$(A$,N,1)=" " THEN C$=MID$(A$,N+1,3):IF LEFT$(C$,1)<>" " THEN 410 ELSE 400390 IF N<M THEN N=N+1:GOTO 380400 PRINT:PRINT "I don't know that word.":GOTO 210410 IF B$="GO " OR B$="MOV" OR B$="WAL" THEN KW=1:GOSUB 2500:GOTO 210420 IF B$="GET" OR B$="TAK" THEN GOSUB 3000:GOTO 210430 IF B$="DRO" OR B$="PUT" THEN GOSUB 3500:GOTO 210440 IF B$="OPE" THEN GOSUB 4000:GOTO 210450 IF B$="UNL" THEN GOSUB 4500:GOTO 210460 IF B$="BUY" THEN GOSUB 5000:GOTO 210480 IF B$="CLI" THEN GOSUB 6000:GOTO 210490 IF B$="REA" THEN GOSUB 7000:GOTO 210510 PRINT:PRINT "I don't know that word."520 GOTO 2101000 REM INVENTORY1010 PRINT "  You are carrying:"1020 PRINT1030 FOR I=1 TO 141040 IF TR(I)=200 THEN PRINT "    ";IN$(I):FLAG1=11050 NEXT I1060 IF FLAG1<>1 THEN PRINT "    nothing"1070 FLAG1=01080 RETURN1500 REM SCORE1510 PRINT1520 PRINT "Out of 200 points, you got ";SCORE;" points."1521 PRINT "That gives you the rating of ";1522 IF SCORE<50 THEN PRINT "a Deck boy."1523 IF SCORE>50 AND SCORE<100 THEN PRINT "a Sea Man."1524 IF SCORE>100 AND SCORE<150 THEN PRINT "a Bucaneer."1525 IF SCORE>150 THEN PRINT "a Sea Captain."1530 RETURN2000 REM QUIT2010 COLOR 0,7:LOCATE 25,50:PRINT "Score:";SCORE:COLOR 7,0:PRINT2020 PRINT "Out of 200 points, you got ";SCORE;" points."2021 PRINT "That gives you the rating of ";2022 IF SCORE<50 THEN PRINT "a Deck boy."2023 IF SCORE>50 AND SCORE<100 THEN PRINT "a Sea Man."2024 IF SCORE>100 AND SCORE<150 THEN PRINT "a Bucaneer."2025 IF SCORE>150 THEN PRINT "a Sea Captain."2029 IF EGG=1 THEN PRINT:GOTO 90202030 PRINT:GOTO 90202250 REM DIG ROUTINE2251 INPUT "With what";F$:F$=LEFT$(F$,3)2252 IF F$<>"SHO" THEN PRINT "You can't use that to dig with.":RETURN2260 IF RO<>1 AND RO<>11 AND RO<>21 THEN 2270 ELSE 22902270 IF RO>23 THEN PRINT "If you dig on the ship, you might cause a leak.":RETURN2280 PRINT "The ground is too hard here.":RETURN2290 IF RO=1 THEN PRINT "You dig into the ground...You hit something! Its a coffin! When you open the":PRINT "coffin, a skeleton pops out, knife first, stabbing you!! The coffin was":PRINT "boobeytrapped!!":RETURN 20002300 IF RO=11 THEN PRINT "You dig but you don't find anything.":RETURN2310 PRINT "You dig in the damp soil and soon you come upon a grating in the ground!":TR(13)=21:RETURN2500 REM GO ROUTINE2510 C$=LEFT$(C$,1)2511 IF C$="S" AND RO=39 AND FLAG97=0 THEN PRINT "Are you sure you want to dive into the water?":RETURN2520 IF C$="N" AND A(RO,1)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2530 IF C$="S" AND A(RO,2)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2540 IF C$="E" AND A(RO,3)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2550 IF C$="W" AND A(RO,4)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2560 IF C$="U" AND A(RO,5)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2570 IF C$="D" AND A(RO,6)=0 THEN PRINT:PRINT "You can't go that way.":RETURN2580 IF C$="N" THEN RO=A(RO,1)2590 IF C$="S" THEN RO=A(RO,2)2600 IF C$="E" THEN RO=A(RO,3)2610 IF C$="W" THEN RO=A(RO,4)2620 IF C$="U" THEN RO=A(RO,5)2630 IF C$="D" THEN RO=A(RO,6)2640 IF RO=22 AND FLAG2=0 THEN SCORE=SCORE+20:FLAG2=12650 IF RO=23 AND FLAG3=0 THEN SCORE=SCORE+20:FLAG3=12660 RETURN 1903000 REM GET ROUTINE3010 IF C$="CHE" AND RO=23 THEN PRINT "The chest is too large and heavy for you to carry.":RETURN3020 IF C$="CAP" AND RO=25 THEN PRINT "The captain moves out of the way just as you try to lift him. 'Hey, are you some":PRINT "kind of quier?'":RETURN3030 IF C$="COO" AND RO=40 THEN PRINT "The cook slaps your hand. 'Not now, someone might see us.'":RETURN3040 IF C$="STE" AND RO=40 THEN PRINT "The cook slaps your hand. 'Wait till it's done.'":RETURN3041 IF C$="GAR" AND FLAG98=0 THEN PRINT "'No one messes with my stew makin's.' The cook pulls out a knife and cuts your":PRINT "throat. As you die, you hear the cook mutter, 'Now that'll teach him.'":RETURN 20003042 IF C$="GRA" THEN PRINT "The grate is secured to the grate.":RETURN3050 FLAG7=0:FLAG8=0:OBJECT=03060 FOR I=1 TO 143070 IF TR(I)=200 THEN FLAG7=FLAG7+13080 NEXT I3090 IF FLAG7>6 THEN PRINT:PRINT "You can't carry anymore.":RETURN3100 FOR I=1 TO 123110 IF TR(I)=RO THEN FLAG8=13115 NEXT I3120 IF FLAG8=0 THEN PRINT:PRINT "There is nothing here to pick up.":RETURN3130 FOR I=1 TO 143140 IF C$=O1$(I) AND TR(I)=RO THEN OBJECT=I3150 NEXT3160 IF OBJECT=0 THEN PRINT:PRINT "I don't see that here.":RETURN3170 TR(OBJECT)=2003180 PRINT "Ok."3190 IF TR(1)=200 AND FLAG9=0 THEN SCORE=SCORE+15:FLAG9=13200 IF TR(12)=200 AND FLAG10=0 THEN SCORE=SCORE+40:FLAG10=13201 IF TR(9)=200 AND FLAG55=0 THEN SCORE=SCORE+60:FLAG55=13210 RETURN3500 REM DROP ROUTINE3510 OBJECT=0:FOR I=1 TO 143520 IF C$=O1$(I) THEN OBJECT=I3530 NEXT I3540 IF OBJECT=0 THEN PRINT "You don't have that!":RETURN3550 PRINT "Ok."3560 TR(OBJECT)=RO3570 RETURN4000 REM OPEN ROUTINE4010 IF C$<>"DRA" AND C$<>"BOX" AND C$<>"CHE" AND C$<>"DOO" THEN PRINT:PRINT "You can't open that.":RETURN4011 PRINT4015 IF C$="DRA" AND RO<>26 THEN PRINT "I don't see a dresser here.":RETURN4016 IF C$="DRA" AND RO=26 AND FLAG4=1 THEN PRINT "The drawer is already open.":RETURN4020 IF C$="DRA" AND FLAG4=0 AND RO=26 THEN PRINT "The drawer is now open. Inside you see your pirate book and your sword.":TR(5)=RO:TR(6)=RO:FLAG4=1:RETURN4030 IF C$="BOX" AND TR(11)<>200 THEN PRINT "You don't even have the box.":RETURN4040 IF C$="BOX" AND FLAG5=0 AND TR(11)=200 THEN PRINT "Ok, the box is now open. You find a thieve's pick inside.":TR(12)=RO:FLAG5=1:RETURN4050 IF C$="BOX" AND FLAG5=1 AND TR(11)=200 THEN PRINT "The box is already open.":RETURN4060 IF C$="CHE" AND RO<>23 THEN PRINT "I don't see the chest here.":RETURN4070 IF C$="CHE" AND RO=23 AND FLAG70=0 THEN PRINT "You must unlock the chest.":RETURN4080 IF C$="CHE" AND RO=23 AND FLAG70=1 THEN PRINT "The chest is already open.":RETURN4090 IF C$="DOO" AND RO<>26 AND RO<>29 THEN PRINT "There is no door here.":RETURN4100 IF C$="DOO" AND RO=26 AND FLAG11=0 THEN PRINT "The door swings open revealing a passage to the east.":A(26,3)=27:A(27,4)=26:FLAG11=1:RETURN4110 IF C$="DOO" AND RO=26 AND FLAG11=1 THEN PRINT "The door is already open.":RETURN4120 IF C$="DOO" AND RO=29 THEN PRINT "The door is locked and is the quarters of the captain.":RETURN4130 RETURN4500 REM unlock routine4510 IF C$<>"DOO" AND C$<>"CHE" AND C$<>"GRA" AND C$<>"BOX" THEN PRINT "I cna't unlock that!":RETURN4520 IF C$="DOO" THEN PRINT "You don't need to unlock that!":RETURN4530 IF C$="BOX" THEN PRINT "You don't need to unlock that!":RETURN4540 INPUT "With what";F$:F$=LEFT$(F$,3)4550 IF C$="CHE" THEN 46004560 IF F$="KEY" THEN PRINT "The key doesn't fit the grate.":RETURN4570 IF F$<>"PIC" THEN PRINT "You can't use that to unlock the grate!":RETURN4580 IF FLAG60=1 THEN PRINT "The grate is already unlocked!":RETURN4590 PRINT "The grate is now unlocked and opened! The grate reveals a passage downward.":A(21,6)=23:A(23,5)=21:FLAG60=1:RETURN4600 IF F$="PIC" THEN PRINT "The pick doesn't fit the chest's lock.":RETURN4610 IF F$<>"KEY" THEN PRINT "You can't use that to unlock the chest!":RETURN4620 IF FLAG70=1 THEN PRINT "The chest is already unlocked!":RETURN4630 PRINT "The chest is now unlocked and opened! The chest reveals a large, gold Spanish coin!":FLAG70=1:TR(9)=23:RETURN5000 REM BUY ROUTINE5010 INPUT "With what?";F$:F$=LEFT$(F$,3)5020 IF C$<>"GAR" THEN PRINT "You can't buy that!":RETURN5030 IF FLAG50=1 THEN PRINT "You've already bought the clove of garlic.":RETURN5040 IF RO<>40 AND TR(4)<>200 THEN PRINT "I don't see the clove of garlic here.":RETURN5050 IF F$<>"BAG" AND F$<>"SIL" THEN PRINT "'You fool! You'd think I'd seatle for less than silver for my garlic!' You are":PRINT " then decapitated!":RETURN 20005060 PRINT "The cook thinks it over then says, 'Well I guess it's a good deal so here.'":PRINT "Then the cooks hands you the clove and takes your bag of silver.":TR(4)=200:TR(14)=255:FLAG50=15070 RETURN6000 REM CLIMB ROUTINE6010 IF C$<>"MAS" AND C$<>"LAD" THEN PRINT "You can't climb that!":RETURN6020 IF C$="MAS" AND RO=33 THEN PRINT "You climb up the mast...Soon you are in the crow's nest.":RO=35:PRINT:RETURN 1906030 IF C$="MAS" AND RO=32 THEN PRINT "You climb up the mast...Soon you are in the crow's nest.":RO=34:PRINT:RETURN 1906040 IF C$="MAS" THEN PRINT "I can't see a mast here.":RETURN6050 IF C$="LAD" AND RO=39 THEN PRINT "If you want to go down the ladder just say so.":RETURN6060 IF C$="LAD" THEN PRINT "I don't see a ladder here.":RETURN6500 REM KNOCK ROUTINR6510 INPUT "What do you want to knock on";F$:F$=LEFT$(F$,3)6520 IF F$<>"DOO" THEN PRINT:PRINT "Awesome!!!":RETURN6530 IF RO<>29 AND RO<>26 AND RO<>27 THEN PRINT:PRINT "I don't see a door here.":RETURN6540 IF RO=29 AND FLAG12=0 THEN PRINT:PRINT "You knock on the door and wait. Soon the captain comes and ushers you in.":RO=25:FLAG12=1:PRINT:RETURN 1906545 IF RO=29 AND FLAG12=1 THEN PRINT:PRINT "There is no answer.":RETURN6550 PRINT:PRINT "Nothing happens."6560 RETURN7000 REM READ ROUTINE7010 IF C$<>"BOO" AND C$<>"NOT" THEN PRINT:PRINT "You can't read that!":RETURN7015 IF C$="NOT" THEN 71907020 IF TR(5)<>200 THEN PRINT:PRINT "You aren't even carrying the book!":RETURN7030 PRINT7060 PRINT "     This is Julius the Pirate's book on pirates. Included"7070 PRINT "     are many entries on other pirates, ships and treasures."7080 PRINT "     You skim through the book until you find a large entry"7090 PRINT "     on an ancient Spanish coin worth thousands of dollar"7100 PRINT "     and located on an island close by here. The lattitude"7110 PRINT "     is 45 degrees and the longitude is 24 degrees."7120 PRINT7130 PRINT "     You notice that at the bottom of the last page that there"7140 PRINT "     is some text reading:"7150 PRINT7160 PRINT "     For other refrences on Julius the Pirate, look under Julius"7170 PRINT "     in a card catalog found in every ship library."7180 RETURN7190 IF RO<>42 THEN PRINT:PRINT "You can't see any note here.":RETURN7200 PRINT7210 PRINT "     To find a book in the many books in our wondourous library,"7220 PRINT "     look under the subject and then go find the book. I hope"7230 PRINT "     the books will entertain you and widen your horizons and"7240 PRINT "     be sure to put the books back, OR ELSE!!!"7250 PRINT7260 PRINT "                                        -Jonny the Captain"7270 RETURN8000 REM LOOK UNDER ROUTINE8010 IF RO<>42 THEN PRINT "You can't find information on that here. Try the ship's library open 24 hours a":PRINT "day!":RETURN8020 PRINT8030 PRINT "    You look through the card catalog, find a book on Julius"8040 PRINT "    the Pirate, go get the book along the racks, and find this"8050 PRINT "    entry:":PRINT8060 PRINT "    Julius the Pirate was a great pirate, know for his daring"8070 PRINT "    adventures and finding rare and valuable treasures. His"8080 PRINT "    most famous treasure find was the Spanish gold coin, an"8090 PRINT "    original coin since only one was made and it was minted in"8100 PRINT "    in 1635. Julius died before he could collect the coin but"8110 PRINT "    left the degrees of the island that the famous coin is"8120 PRINT "    supposed to be on, in his pirate book passed on through his"8130 PRINT "    generations. The last known recorded inheritered of the book"8131 PRINT "    was Humphry Goodfellow, who died in a fire at his house. The"8132 PRINT "    whereabouts of the book is unknown.":PRINT8133 PRINT "    You read on till you find the last paragraph, which you are"8134 PRINT "    shocked by:":PRINT8135 PRINT "    Julius the Pirate was a great pirate, but he had a problem"8136 PRINT "    with his left eye, which made him put marks 5 degrees west"8137 PRINT "    of the original on longitude and latitude maps."8138 PRINT "    MORE?"8139 IF INKEY$="" THEN 81398140 RETURN8150 IF RO<>42 THEN PRINT "You can't find information on that here. Try the ship's library open 24 hours a":PRINT "day!":RETURN8160 PRINT8170 PRINT "    Pirate Island is one of the most scariest islands in the"8180 PRINT "    whole ocean. The name of the island has sent chills down"8190 PRINT "    the spines of many young sea-going sailors. The bravest"8200 PRINT "    captains have steered away from the island just to stay"8210 PRINT "    out of the horrors that superstision have provided."8220 PRINT "    Legends have it that the valuable Spanish gold coin rests"8230 PRINT "    on Pirate Island but to date, no one has even tried to"8240 PRINT "    find the coin. But then again, we don't record ALL voyages!"8250 RETURN8300 IF RO<>42 THEN PRINT "You can't find information on that here. Try the ship's library open 24 hours a":PRINT "day!":RETURN8310 PRINT8320 PRINT "    David Meny is one of the greatest pirates on the seven seas!"8330 PRINT "    He has written his way out of a jail cell and found the Spanish"8340 PRINT "    silver coin, second in value to only the famous gold coin made"8350 PRINT "    by the Spainards. He continues to roam the free world"8360 PRINT "    in search of adventure and intrigue."8370 RETURN8500 REM SWIM ROUTINE8510 IF RO<>11 AND RO<>44 AND RO<>45 AND RO<>22 THEN PRINT "You can't swim here!":RETURN8520 IF RO=44 OR RO=45 THEN PRINT "You swim around for awhile then end up where you are now.":RETURN8530 IF RO=22 THEN PRINT "The water is to shallow to swim here.":RETURN8540 PRINT "You swim out into the bay...."8550 RO=44:RETURN 1908990 END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -