home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 207
/
207.d81
/
b.planet
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
26KB
|
808 lines
1 ifpeek(52016)<>32orpeek(52040)<>245thenload"linput.pr",8,1
2 rem planet of the robots
3 rem by daniel tobias
4 rem c64 version 1.1
5 rem 6/12/84
7 na$="[208]lanet of the [210]obots"
8 poke 53280,7:poke53281,1:print"[144]"
9 s=54272:fori=.to24:pokes+i,.:next
10 print"":li=52016
15 dim lv%(100,8),ld$(100,1),r%(100),id$(50),il%(50),pr(50),iw(50),l%(100)
17 dim wd$(100),w%(100,1),fw%(1)
18 dimv%(3),h%(2),o%(1),a(1)
20 gosub 18000:gosub 19000
60 print"[147]"
100 rem start
108 xx=1
110 ifxx=1thengosub1000
120 gosub500
125 xx=xx+1:ifxx>5thenxx=1
130 iffw%(0)=0thenprint"[215]hat?":goto110
140 onfw%(0)gosub2000,3000,4000,5000,5500,6000,7000,8000,9000,9500
142 iffw%(0)>10thenonfw%(0)-10gosub13000,13500,14500,15000,15500,16000,16500
143 iffw%(0)=18thengosub10000
145 iffw%(0)=99then300
150 t=t+1
160 goto110
200 rem convert to lower case
220 for ip=1tolen(i$)
230 ch$=mid$(i$,ip,1)
240 ifch$>="[193]"andch$<="[218]"theni$=left$(i$,ip-1)+chr$(asc(ch$)-128)+mid$(i$,ip+1)
260 next ip
270 return
300 rem end
305 print"[144]"
310 print "[211]top after"t"turns."
312 input"play again";pa$:ifpa$="y"orpa$="[217]"orpa$="[183]"thenrun
320 print
330 goto40000:remd"chr$(34)"hello"chr$(34)",8":print"qqqqruns":poke631,13:poke63
332 [151]198,2:[128]
500 [143] handle input
505 fw%(0)[178]0:fw%(1)[178]0
510 [153]"-->";:[158]li,b$:i$[178]b$[170]"":[153]
515 [139] i$[178]"" [167] 510
518 [141] 200
520 wd$[178]"":a[178]1
530 [139] [202](i$,a,1)[178]" " [167] 600
540 wd$[178]wd$[170][202](i$,a,1)
550 a[178]a[170]1:[139]a[179][178][195](i$)[167]530
600 [143] found word
610 [129]b[178]1[164]nw:[139]wd$(b)[178]wd$[167][141]650
620 [130]b:wd$[178]"":a[178]a[170]1
630 [139]a[177][195](i$)[167][142]
640 [137]530
650 [129]c[178]0[164]1
660 [139]w%(b,c)[177][178]0[167]fw%(c)[178]w%(b,c)
670 [130]c
680 [142]
1000 [143] print description
1002 [139]ld$(l,0)[178]"s"[167][141]12000
1005 [153]
1010 [153]ld$(l,l%(l))
1011 [139]l[178]28[175]j[178]0[167][153]"(NULL)here is a door with bars."
1012 [139]l[178]28[175]j[179][177]0[167][153]"(NULL)he bars are broken, leaving a way out."
1014 [153]
1015 l%(l)[178]1
1020 [153]"(NULL)pen pathways: ";:[129]a[178]1[164]8:[139]lv%(l,a)[179][177]0[167][153]dn$(a)" ";
1025 [130]a
1030 [153]
1040 [153]"(NULL)isible objects:"
1045 x[178]0
1050 [129]a[178]1[164]ni
1060 [139] il%(a)[178]l[167][153]" "id$(a);:x[178]1
1062 [139]il%(a)[178]l[175]pr(a)[177]0[175]r%(l)[178]1[167][153]" ((NULL)rice $"pr(a)")";
1065 [139] il%(a)[178]l[167][153]
1070 [130]a
1080 [139]x[178]0[167][153]"(NULL)here are none."
1082 [139] r%(l)[179][177]0[167][153]
1085 [139]r%(l)[178]1[167][153]"lenlerk robot here."
1090 [139]r%(l)[177]20[175]r%(l)[179]29[167][153]"chr$uard robot here."
1110 [139] r%(l)[178]3[167][153]"peekerzerk robot here!"
1120 [139]t[171]e[177][178]100[167][153]"(NULL)ou are getting hungry!"
1480 [153]
1490 [142]
2000 [143] move
2005 [139]fw%(1)[179]101[176]fw%(1)[177]108[167][153]"chr$o where?":[142]
2010 x[178]lv%(l,fw%(1)[171]100)
2020 [139]x[179]0[176]x[177]nl[167][153]"(NULL)ot defined yet.":[142]
2025 [139]l[178]28[175]i$[178]"break out"[167]15000
2030 [139]x[178]0[167][153]"(NULL)ou can't go that way.":[142]
2035 [139]r%(l)[178]3[167][153]"(NULL)obot: (NULL)rying to escape, huh? right$t won't"
2037 [139]r%(l)[178]3[167][153]"work! (NULL)ap! (NULL)ou're dead!":[137]300
2040 [139]x[178]6[175]il%(7)[179][177]0[167][153]"(NULL)obot: right$'m sorry, but the dress code"
2041 [139]x[178]6[175]il%(7)[179][177]0[167][153]" requires that you wear a tie.":[142]
2042 [139]l[178]6[175]r[179][177]0[167][153]"(NULL)obot: right$'m sorry. (NULL)ou are a bad credit"
2043 [139]l[178]6[175]r[179][177]0[167][153]" risk. (NULL)ou can't enter.":[142]
2045 [139]r%(l)[178]20[170]fw%(1)[171]100[167]2500
2060 [143]
2065 [139]l[178]39[175]x[178]39[175][187](0)[179].35[167]pl[178]1[171]pl:x[178]35:[139]pl[178]0[167]x[178]40
2080 [139]x[178]17[167][153]"(NULL)obot: (NULL)orry, this information booth is out of order."
2085 [139]x[178]17[167][142]
2087 [139]ld$(x,0)[178]"(NULL)"[167][141]12000:[142]
2090 [139]l[178]36[175]x[178]37[167][133]"valnter combination";a$
2095 [139]l[178]36[175]x[178]37[175][197](a$)[179][177]cm%[167][153]"(NULL)orry. (NULL)rong!":[142]
2100 [139]x[178]38[167]14000
2200 l[178]x:xx[178]1:[142]
2500 [143] id card
2510 [139]il%(12)[178]0[167][153]"(NULL)obot: right$.str$. accepted. (NULL)ou can pass."
2520 [139]il%(12)[178]0[167][153]" chr$ood day, (NULL)r. (NULL)mith.":[137]2060
2530 [153]"(NULL)obot: right$'m sorry, but you can't go that way without an right$.str$. card."
2540 [142]
3000 [143] pick up
3005 [139]fw%(1)[178]0[176]fw%(1)[177]ni[167][153]"(NULL)o such thing here.":[142]
3006 [139]il%(fw%(1))[178]0[167][153]"(NULL)ou are already carrying it!":[142]
3007 [139]il%(fw%(1))[179][177]l[167][153]"(NULL)o such thing here.":[142]
3009 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]"(NULL)obot: (NULL)ou can't take that without"
3010 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]" paying for it! (NULL)lease buy it if you"
3011 [139]pr(fw%(1))[177]0[175]r%(l)[178]1[167][153]" want it.":[142]
3013 hf[178]0
3015 [139]wt[170]iw(fw%(1))[177]150[175]iw(fw%(1))[179][178]150[167] hf[178]1
3017 [139] hf[178]1 [167] [153] "(NULL)oo heavy. (NULL)ou must drop something first.":[142]
3020 [139]iw(fw%(1))[177]150[167][153]"(NULL)oo heavy for you to lift.":[142]
3030 [139]iw(fw%(1))[179]0[167][153]"right$t is securely fastened.":[142]
3040 il%(fw%(1))[178]0:wt[178]wt[170]iw(fw%(1))
3045 [153] "(NULL)(NULL)."
3050 [139]fw%(1)[178]10[167]m[178][182](m)
3060 [142]
4000 [143] drop
4010 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)ou are not carrying one.":[142]
4020 [139]il%(fw%(1))[179][177]0[167][153]"(NULL)ou are not carrying one.":[142]
4030 il%(fw%(1))[178]l:wt[178]wt[171]iw(fw%(1))
4040 [153] "(NULL)(NULL)."
4042 [139]l[178]39[167][153]"right$t slides into a crevice in the ruins and is lost."
4043 [139]l[178]39[167]il%(fw%(1))[178][171]1
4045 [139]fw%(1)[178]10[167]m[178][171][182](m)
4050 [142]
5000 [143] look
5005 [139]fw%(1)[177]0[167]8000
5010 xx[178]1
5020 l%(l)[178]0
5030 [142]
5500 [143] inv
5505 x[178]0
5510 [153] "(NULL)ou are carrying:"
5520 [129]a[178]1[164]ni
5525 [139]a[178]10[167]5540
5530 [139]il%(a)[178]0[167][153]" "id$(a):x[178]1
5540 [130]a
5545 [139]m[177]0[167][153]"close$"m"in cash.":x[178]1
5550 [139]x[178]0[167][153]"(NULL)othing."
5560 [142]
6000 [143] save game
6010 [153]"valnter filename. (str$efault: planet.save)":[133]f$
6015 [139]f$[178]""[167]f$[178]"planet.save"
6017 [159]15,8,15:[152]15,"s:"f$:[160]15
6020 [159]2,8,2,f$[170]",s,w"
6040 [152]2,l:[129]b[178]1[164]ni:[152]2,il%(b):[130]b:[152]2,wt:[152]2,t
6050 [129]b[178]1[164]nl:[152]2,r%(b):[130]b:[152]2,m:[152]2,e
6060 [129]b[178]1[164]ni:[152]2,pr(b):[130]b
6070 [152]2,cm%:[152]2,r:[152]2,j
6080 [152]2,pw:[152]2,rm
6090 [160]2
6100 [153] "(NULL)(NULL).":[142]
6500 [143] load game
6510 [153]"valnter filename. (str$efault: planet.save)":[133]f$
6515 [139]f$[178]""[167]f$[178]"planet.save"
6520 [159]15,8,15
6530 [159]2,8,2,f$[170]",s,r"
6540 [141] 6900
6550 [132]2,l:[129]b[178]1[164]ni:[132]2,il%(b):[130]b:[132]2,wt:[132]2,t
6560 [129]b[178]1[164]nl:[132]2,r%(b):[130]b:[132]2,m:[132]2,e
6565 [129]b[178]1[164]ni:[132]2,pr(b):[130]b
6570 [132]2,cm%:[132]2,r:[132]2,j
6575 [139]j[179][177]0[167]lv%(28,8)[178]27
6580 [132]2,pw:[132]2,rm
6590 [160]2:[160]15
6600 [142]
6900 [132]15,a$,b$,c$,d$
6910 [139][197](a$)[177]0[167][153]"chr$ame not found.":[129]a[178]1[164]100:[130]a:[138]
6920 [142]
7000 [143] weigh
7010 [139]il%(2)[179][177]l[175]il%(2)[179][177]0[167][153]"(NULL)here is no scale.":[142]
7020 [139]fw%(1)[178]2[167][153]"(NULL)ou can't weigh it on itself!":[142]
7030 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)here is no such item here.":[142]
7040 [139]il%(fw%(1))[179][177]l[175]il%(fw%(1))[179][177]0[167][153]"(NULL)here is no such item here.":[142]
7050 [153]"right$t weighs"iw(fw%(1))"pounds."
7060 [142]
8000 [143] read/examine
8005 [139]fw%(1)[178]200[167][153]"(NULL)he bars look rusty and weak.":[142]
8010 [139]fw%(1)[179]1[176]fw%(1)[177]ni[167][153]"(NULL)o such thing here.":[142]
8020 [139]il%(fw%(1))[179][177]l[175]il%(fw%(1))