Libro: N/A – Anno: 19?? – Trascrizione: Francesco Fiorentini
Torna il Commodore 64 su RetroLiPS con un’avventura testuale che ho trovato su un file di testo che avevo archiviato diversi anni or sono dentro un hard disk portatile.
Non sono riuscito a trovare informazioni riguardo a questa avventura ma ho deciso di pubblicarla ugualmente anche perché la sfida é a dir poco ostica. Se riuscite a portare a termine la sfida, fatemi un fischio, cosí da aggiungere la soluzione all’articolo.
Buon divertimento!
Titolo: Adventure
Piattaforma: Commodore 64
Linguaggio: Basic V2
Versione originale: Sconosciuto
Pubblicazione: N/A
Anno: 19??
Trascrizione: Francesco Fiorentini
Anno: 2023
Download: N/A
Note: il listato originale é stato modificato soltanto da un punto di vista estetico.
Istruzioni
Vi trovate all’interno di una piccola stanza, senza sapere ne’ come vi siete entrati, ne’ perché… Oviamente, come per ogni avventura che si rispetti, dovete trovare il modo di uscire dalla stanza e tornare a casa vostra con il tesoro che si nasconde da qualche parte di questo misterioso mondo.
Oltre ai classici comandi INV, SCO, QUIT, N, S, E, W… dovrete indovinare i verbi da utilizzare per far compiere le azioni al vostro personaggio.
Se non ci riuscite, potete sempre dare un’occhiata al codice. 🙂
Come sempre, qui di seguito trovate il codice ottimizzato per essere copiato direttamente su CBM prg Studio oppure su VICE.
Attenzione – Ci siamo resi conto che nel listato i caratteri ‘>’ e ‘<‘ potrebbero venir sostituiti dai rispettivi encoding html ‘>’ e ‘<’. Nel caso, sostituite questi valori nel listato prima di copiarlo sull’emulatore.
Listato: Adventure – Commodore 64 – Basic V2
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254 10 dim l$(10),e$(10),d$(10),o$(10),p(10),c(10),q$(10),v$(10)
20 for i=0 to 10:read l$(i),e$(i),d$(i):next i
21 for i=0 to 10:read o$(i),p(i),c(i):next i
50 let pn=0 : let in=1 : let ct=0 : let q$(2)="how do i get out of here?"
51 let a$="run"
60 let wv$="takdrolooexapulchoopeclotiejumswieat"
70 let wg$="norsoueaswesup dowoutdoostaladentcotroptre"
80 let wd$="nsewudoafgbchu"
90 let wn$="axepapluntreentropcroumbdoostaladarocupcasdowmoa"
95 print chr$(147): poke 53280,0: poke 53281,0:poke 646,7
99 rem **** start of main program loop ****
100 if pc>0 then let pc=pc+1:goto 103
101 goto 110
103 let p(3)=pn
105 if pc=3 then let pc=0
110 if c(3)=-2 and pn=5 and p(3)=4 then let p(3)=9:goto 112
111 goto 120
112 let o$(3)="tree"
113 let c(3)=-1
114 let q$(3)="oops! tree just fell in moat! "
120 if c(7)=4 and pn<3 and p(7)=55 then let pn=10:goto 122
121 goto 130
122 let q$(1)="open umbrella indoors?": let q$(3)="dead unlucky!"
130 if (p(7)<>55 or c(7)=2) and (pn=3 or pn=4 or pn=9)then cr=cr+1:goto 140
139 let cr=0
140 if cr>0 then let q$(1)="it's raining" :
141 if cr=5 then let q$(3)="i'll catch my death"
150 if cr=7 then let pn=10 : let q$(2)="i caught my death"
200 for i=1 to len (e$(pn))
210 if mid$(e$(pn),i,1)="n" then let ex$=ex$+"north. "
220 if mid$(e$(pn),i,1)="s" then let ex$=ex$+"south. "
230 if mid$(e$(pn),i,1)="e" then let ex$=ex$+"east. "
240 if mid$(e$(pn),i,1)="w" then let ex$=ex$+"west. "
250 if mid$(e$(pn),i,1)="u" then let ex$=ex$+"up. "
260 if mid$(e$(pn),i,1)="d" then let ex$=ex$+"down. "
270 if mid$(e$(pn),i,1)="o" then let ex$=ex$+"out. "
280 next i
290 let ii=0
292 for i=0 to 10:if p(i)=pn then let os$=o$(i):goto 310
293 next i
294 goto 330
310 if len(v$(ii))+len(os$)<37 then let v$(ii)=v$(ii)+os$+".":os$="":goto320
311 let ii=ii+1: goto 310
320 next i
330 print "i am ";l$(pn):print:print"some exits are :":print ex$
331 rem if screen width > 32 insert <"i am ";> after 1st print
340 print"i can see :":for i=0 to 8:if v$(i)<>"" then print v$(i)
350 next i
360 print :poke 646,3: print"------>you said ";a$ :poke 646,7: print
361 for i=1 to 3:if q$(i)<>"" then print q$(i)
362 next i
370 rem
380 print :poke 646,3: print"------>what now";
390 for i=0 to 8:let v$(i)="":let q$(i)="":next i:let a$="":let a1$=""
391 let a2$="":let a3$="":let a4$="":let ex$=""
392 input a$::poke 646,7
400 if len(a$)<3 then goto 40000
401 let a2$=left$(a$,3)
402 if a2$="inv" then goto 4000
403 if a2$="sco" then goto 5000
404 if a2$="hel" then goto 6000
405 if a2$="qui" then goto 7000
406 if a2$="jum" then goto 14000
407 if a2$="swi" then goto 15000
410 let j=0:for i=1 to len(a$):if mid$(a$,i,1)=" "then j=i
411 next i
420 if j=0 then goto 40110
421 let a1$=left$(a$,j-1)
425 let a3$=right$(a$,len(a$)-j):let a4$=left$(a3$,3)
430 if a1$="go" then goto 1000
440 let x$=wv$:let y$=a2$:gosub 35000
441 if j=0 then q$(2)="i don't know how to "+a1$ : goto 100
442 let k1=int((j-1)/3)+1
450 let x$=wn$ : let y$=a4$ : gosub 35000
460 if j=0 then let q$(2)="what is a "+a3$+"?" : goto 100
470 let k2=int((j-1)/3)
489 rem **** found both words - goto verb routine ****
490 onk1goto2000,3000,8000,8000,9000,10000,11000,12000,13000,14000,15000,16000
391 rem
999 rem **** go ****
1000 let x$=wg$ : let y$=a4$: gosub 35000: if j=0 then goto 40010
1001 let x$=e$(pn):let y$=mid$(wd$,int(((j-1)/3)+1),1) : gosub 35000
1002 if j=0 then goto 40010
1003 let pn=val(mid$(d$(pn),int(j-1)*2+1,2)):goto 40020
1004 rem
1999 rem **** take ****
2000 if k2>10 then goto 40030
2001 if p(k2)=55 then goto 40050
2002 if p(k2)<>pn then goto 40050
2003 if c(k2)=-2 then goto 40000
2005 if c(k2)=-1 then goto 40060
2006 if c(k2)=3 then goto 40080
2010 if in>4 then let q$(2)="i'm overloaded already! ":goto 100
2011 let in=in+1:let p(k2)=55:goto 40020
2999 rem **** drop ****
3000 if k2>10 then goto 40070
3001 if p(k2)<>55 then goto 40070
3010 let in=in-1 :if pn=7 then let p(k2)=88 :goto 3015
3011 goto 3016
3015 let q$(2)="it fell off into the moat" : goto 100
3016 let p(k2)=pn :goto 40020
3020 rem
3999 rem **** inventory ****
4000 let q$(2)="i am carrying: ":let j=2
4001 fori=0 to 10
4010 if p(i)=55 then goto 4012
4011 goto 4020
4012 if p(i)=55 then if len(q$(j))+len(o$(i)) > 37 then let j=j+1:goto 4010
4019 let q$(j)=q$(j)+o$(i)+". "
4020 next i : goto 100
4999 rem *** score close****
5000 if p(6)=0 then print"{clr}": print"congratulations!" :goto 5002
5001 goto 5003
5002 print"you have completed your quest" :end
5003 let q$(2)="no score yet !"
5010 let q$(3)="return with the treasure!" : goto 100
5999 rem **** help close****
6000 on pn+1 goto 6010,6040,6040,6040,6020,6030,6040,6050,6060,6040,6070
6010 let q$(2)="isn't the wallpaper lovely ?" : goto 100
6020 let q$(2)="a bridge could prove useful " : goto 100
6030 let q$(2)="must be another way back. . " : goto 100
6040 let q$(2)="examine things & look around ": goto 100
6050 let q$(2)="the only way seems to be down ": goto 100
6060 let q$(2)="tricky isn't it ?" : goto 100
6070 let q$(2)="try <break> and <run> !" : goto 100
6999 rem **** quit ****
7000 print"{clr}": if p(6)=0 then print"you have completed the quest":goto 7010
7001 if p(6)<>99 then print"you were nearly there!": goto 7010
7002 print"better luck next time!"
7010 end
7999 rem **** look/examine ****
8000 if k2<>11 then goto 8110
8001 rem
8002 on pn+1 goto 8010,8110,8110,8110,8020,8030,8040,8050,8020,8110,8060
8003 rem
8010 if c(1)<0 then let q$(2)="the wallpaper's peeling ":goto 100
8011 goto 8110
8020 if p(3)<> pn then let q$(2)="moat is full of poisonous slime ":goto 100
8021 let q$(2)="the tree makes an ideal bridge"
8022 goto 100
8030 let q$(2)="tree has slipped into the moat" : goto 100
8040 if c(6)=2 then goto 8110
8041 let c(6)=2
8042 rem
8043 let l$(6)=l$(6)+"with a cupboard":let q$(2)="i just noticed something "
8045 goto 100
8050 let q$(2)="i don't fell like jumping . ." : goto 100
8060 let q$(2)="i'm in an infinity of misery" : goto 100
8110 if k2=2 then goto 8112
8111 let q$(2)="looks a bit evil to me" : goto 100
8112 if p(2)<>55 then goto 40070
8115 let q$(2)="looks a bit evil to me" : goto 100
8120 if k2=13 then goto 8123
8121 goto 8130
8123 if (pn=6 or pn=4) then let q$(2)="i'd drown in it" :goto 100
8130 if k2=14 then goto 8133
8131 goto 8140
8133 if pn=6 then let q$(2)="a fall would be fatal" : goto 100
8140 let q$(2)="i see nothing special" : goto 100
8999 rem **** pullclose****
9000 if k2=1 then goto 9020
9001 if k2<>3 then goto 40090
9005 if p(3)<>pn then goto 40050
9006 if c(3)=3 then goto 9010
9007 goto 40090
9010 if pn=4 then let c(3)=-2:let o$(3)="tree trunk crossing moat ":goto 9013
9011 rem
9012 goto 9015
9013 let e$(4)=e$(4)+"j" : let pc=0 : goto 40020
9015 let pc=1 : goto 40020
9020 if pn<>0 or c(1)<>-1 then goto 40090
9021 let c(1)=2: let p(8)=0 : e$(0)="a"
9025 let q$(2)="it just fell off!" : goto 100
9999 rem **** chop ****
10000 if p(0)<>55 then let q$(2)="haven't got a chopper" : goto 100
10010 if pn=0 then let q$(2)="you won't get out by force!" : goto 100
10020 if k2=3 then goto 10023
10021 goto 10025
10022 rem
10023 if pn=9 and c(3)=-1 then let c(3)=3
10024 let o$(3)="tree tunk":let q$(3)="timber!":goto 40020
10025 goto 40090
10028 rem
10030 if k2=3 then goto 40050
10040 goto 40020
10999 rem **** open ****
11000 if k2=7 then goto 11020
11001 if k2<>12 then goto 40000
11002 if pn<>6 then goto 40050
11003 if p(6)<>99 then let q$(2)="already open":goto 100
11009 let p(6)=6 : let q$(2)="look what i've found!"
11010 goto 100
11020 if p(7)<>55 then goto 40070
11021 if c(7)>2 then goto 40090
11025 let c(7)=4 : let o$(7)="open umbrella" : goto 40020
11999 rem **** close ****
12000 if k2<>7 then goto 40000
12001 if p(7)<>55 then goto 40070
12003 if c(7)=2 then goto 40090
12005 let c(7)=2:let o$(7)="rolled umbrella" : goto 40020
12999 rem **** tie ****
13000 if k2<>5 then goto 40000
13001 if p(5)<>55 then goto 40070
13005 if pn<>7 then goto 40100
13006 let c(5)=-2 : let p(5)=7
13007 let in=in-1 : let o$(5)=o$(5)+" hanging over parapet "
13008 let e$(7)=e$(7)+"h" : goto 40020
13999 rem **** jump ****
14000 if pn=7 then goto 14010
14001 if pn=8 then goto 14020
14005 let q$(3)="bounce! bounce!": goto 40020
14010 let pn=10 : let q$(2)="sucked into moat's evil slime " : goto 100
14020 if c(5)=-2 then goto 14010
14021 let c(5)=-2 : let pn=4
14022 let q$(3)="over safe ground": goto 40020
14999 rem **** swingclose****
15000 if pn<>8 then let q$(2)="yeah man!" :goto 100
15001 let c(5)=-3 :goto 40020
15999 rem **** eat ****
16000 if k2<>2 then goto 40030
16001 if p(2)<>55 then goto 40070
16002 let pn=10 : let q$(3)="it was poisoned!" : goto 40020
34999 rem **** instring subroutine ****
35000 let j=0
35001 for i=1 to len(x$) step len(y$)
35005 if y$=mid$(x$,i,len(y$)) then j=i: let i=len(x$)
35010 next i : return
39999 rem **** standard replies ****
40000 let q$(2)="impossible!" : goto 100
40010 let q$(2)="i can't go "+ a3$ : goto 100
40020 let q$(2)="ok" : goto 100
40030 let q$(2)="don't be absurd!" : goto 100
40040 let q$(2)="i'm already carrying it!" : goto 100
40050 let q$(2)="i don't see it here" : goto 100
40060 let q$(2)="i can't - yet!" : goto 100
40070 let q$(2)="i'm not carrying it!" : goto 100
40080 let q$(2)="you must be joking!" : goto 100
40090 let q$(2)="ok - nothing happens" : goto 100
40100 let q$(2)="it slips off" : goto 100
40110 let q$(2)="huh ?" : goto 100
50000 data in a small room,"",1*,in a dimly lit hallway,swo,0*2*3*
50001 data in the kitchen of a cottage,e,1*,outside a forest cottage,nec
50002 data 9*4*1*,by the moat of a castle,w,3*5*
50010 data in a crumbling castle,uf,6*6*,in a tower room,dfug,5*5*7*7*
50011 data on a parapet at tower top,d,6*8*,handing on rope above moat,dfug,7*
50012 data in the forest,nesw,9*9*3*9*,dead,neswud,101010101010
50020 data axe,55,2,wallpaper,0,-1,packed lunch,2,2,tree,9,-1,entrance
50021 data 5,-2,rope,0,2,*priceless crown*,99,-2,rolled umbrella,1,2
50022 data door,99,-2,stairs,5,-2,iron ladder,6,-2
60000 dim a$(100)
60001 for i= 1 to 10
60010 read a$(i)
60020 printa$(i);" ";i
60030 next