You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
403 lines
12 KiB
QBasic
403 lines
12 KiB
QBasic
1
|
|
2 poke646,1:poke53281,0:poke53280,0:rv=1.02:goto358:
|
|
3
|
|
4 poke53280,int(rnd(1)*16)
|
|
5 poke214,0:poke211,15:sys58640:?"drugwar/64"
|
|
6 ?chr$(18)" ":return
|
|
7
|
|
8 j=rnd(-ti):return
|
|
9
|
|
10 ?:input"press enter to continue.";x$:return
|
|
11
|
|
12 poke214,1:poke211,14:sys58640:return
|
|
13
|
|
14 poke214,1:poke211,15:sys58640:return
|
|
15
|
|
16 poke214,1:poke211,16:sys58640:return
|
|
17
|
|
18 poke214,1:poke211,17:sys58640:return
|
|
19
|
|
20 poke214,1:poke211,18:sys58640:return
|
|
21
|
|
22 gosub20:?chr$(18)"jet":return
|
|
23
|
|
24 forj=1to2500:nextj:k=int(rnd(1)+.5):return
|
|
25
|
|
26 forj=1to1000:nextj:return
|
|
27
|
|
28 forj=1to2000:nextj:return
|
|
29
|
|
30 ?"you can afford ";j:?"you can carry ";f
|
|
31
|
|
32 ?:input"how many?(enter 0 cancel):";k:ifk=0goto74
|
|
33 ifk<acthen?:?chr$(18)"stop cheating!":ad=ad+1:gosub71:gosub28:goto74
|
|
34 ifk<0thenad=ad+1:gosub71:return
|
|
35 ifk>fthen?chr$(18)"you can't carry that much!":goto32
|
|
36 ifk>jthen?chr$(18)"you can't afford that much!":goto32
|
|
37 return
|
|
38
|
|
39 ?"you can sell:";j:?
|
|
40
|
|
41 input"how many?(enter 0 to cancel.):";k
|
|
42 ifk>jthen?"you don't have that many!":goto41
|
|
43 ifk=0goto74
|
|
44 return
|
|
45
|
|
46 f=i-((g*5)+m+n+o+u+t+q):return
|
|
47
|
|
48 gosub12:?chr$(18)"being chased":return
|
|
49
|
|
50 gosub14:?chr$(18)"game over":return
|
|
51
|
|
52 ifp$="the bronx"thenreturn
|
|
53 ?"you need to be in the bronx":?"to take care of this business."
|
|
54 gosub28:goto74
|
|
55
|
|
56 c=int(rnd(1)*12000+16000.5):h=int(rnd(1)*7000+5000.5)
|
|
57 a=int((rnd(1)*34+10)*100+.5):z=int((rnd(1)*42+33)*10+.5)
|
|
58 s=int((rnd(1)*15+7)*10+.5):l=int((rnd(1)*4+1)*10+.5)
|
|
59 b=int(rnd(1)*20+.5):d=d+1:ac=int(((rnd(1)*10)+1)*-1):ifad>0thenad=ad-1
|
|
60
|
|
61 ifd>=31goto392
|
|
62 return
|
|
63
|
|
64 k=(w+e)-v:ifk<0thenk=0:return
|
|
65 k=int(sqr((k/31.5)+.5)):ifk>100thenk=100
|
|
66 return
|
|
67
|
|
68 w=2000:e=0:v=5000:p$="the bronx":g=0:i=100:m=0:n=0:o=0:u=0:t=0:q=0
|
|
69 d=0:bb=100:gosub56:goto74
|
|
70
|
|
71 ifad>=3thengoto381
|
|
72 return
|
|
73
|
|
74 ?chr$(147):gosub46:gosub4:poke214,1:poke211,3:sys58640:?chr$(18)"day:"d
|
|
75 poke214,1:poke211,17:sys58640:?chr$(18)"location:"p$:?:?"(c)heck prices"
|
|
76 ?"(t)renchcoat":?"(b)uy":?"(s)ell":?"(j)et"
|
|
77 ?"(l)oan shark":?"(v)isit bank":?
|
|
78 input "please make your selection:";x$
|
|
79 ifx$="c"goto88
|
|
80 ifx$="t"goto92
|
|
81 ifx$="b"goto96
|
|
82 ifx$="s"goto107
|
|
83 ifx$="j"goto121
|
|
84 ifx$="l"goto137
|
|
85 ifx$="v"goto145
|
|
86 goto74
|
|
87
|
|
88 ?chr$(147):gosub4:gosub18:?chr$(18)"prices":?:?"cocaine:","$"c
|
|
89 ?"heroin:","$"h:?"acid:","$"a:?"weed:","$"z:?"speed:","$"s:?"ludes:","$"l
|
|
90 ?"wallet:","$"w:gosub10:goto74
|
|
91
|
|
92 ?chr$(147):gosub4:gosub14:?chr$(18)"trenchcoat":?:?"cocaine:",m
|
|
93 ?"heroin:",n:?"acid:",o:?"weed:",u:?"speed:",t:?"ludes:",q:?"free space:";f
|
|
94 gosub10:goto74
|
|
95
|
|
96 ?chr$(147):gosub4:gosub20:?chr$(18)"buy":?
|
|
97 ?"what do you want to buy?":?:?"(c)ocaine":?"(h)eroin":?"(a)cid"
|
|
98 ?"(w)eed":?"(s)peed":?"(l)udes":?:input"enter selection:";x$
|
|
99 ifx$="c"goto153
|
|
100 ifx$="h"goto156
|
|
101 ifx$="a"goto159
|
|
102 ifx$="w"goto162
|
|
103 ifx$="s"goto165
|
|
104 ifx$="l"goto168
|
|
105 goto74
|
|
106
|
|
107 ?chr$(147):gosub4:gosub18:?chr$(18)"sell":?
|
|
108 ?"what would you like to sell?":?:?"(c)ocaine":?"(h)eroin":?"(a)cid"
|
|
109 ?"(w)eed":?"(s)peed":?"(l)udes":?
|
|
110
|
|
111 input"enter selection:(0 to cancel)";x$
|
|
112 ifx$="c"goto171
|
|
113 ifx$="h"goto174
|
|
114 ifx$="a"goto177
|
|
115 ifx$="w"goto180
|
|
116 ifx$="s"goto183
|
|
117 ifx$="l"goto186
|
|
118 ifx$="0"goto74
|
|
119 ?"invalid selection!":goto111
|
|
120
|
|
121 ?chr$(147):gosub4:gosub22:?:?"(b)ronx":?"(g)hetto":?"(c)entral park
|
|
122 ?"(m)anhattan":?"coney (i)sland":?"broo(k)lyn":?"(o)ops...stay!":?
|
|
123 input "where to dude";x$
|
|
124 ifx$="b"theny$="the bronx":goto134
|
|
125 ifx$="g"theny$="the ghetto":goto134
|
|
126 ifx$="c"theny$="central park":goto134
|
|
127 ifx$="m"theny$="manhattan":goto134
|
|
128 ifx$="i"theny$="coney island":goto134
|
|
129 ifx$="k"theny$="brooklyn":goto134
|
|
130 ifx$="o"thengoto74
|
|
131 if x$="coptest" then b=5:g=1:goto238
|
|
132 goto121
|
|
133
|
|
134 ify$=p$thengoto189
|
|
135 p$=y$:y$="":goto192
|
|
136
|
|
137 ?chr$(147):gosub4:gosub14:?chr$(18)"loan shark":?:gosub52
|
|
138 ?"your debt is:$";v:?"you have:$";w:?
|
|
139 input"(r)epay, (b)orrow, (l)eave:";x$
|
|
140 ifx$="r"goto334
|
|
141 ifx$="b"goto339
|
|
142 ifx$="l"goto74
|
|
143 goto137
|
|
144
|
|
145 ?chr$(147):gosub4:gosub12:?chr$(18)"bank o'murica":?:gosub52
|
|
146 ?"your balance:$";e:?"your wallet:$";w:?
|
|
147 input"(d)eposit, (w)ithdraw, (l)eave:";x$
|
|
148 ifx$="d"goto346
|
|
149 ifx$="w"goto353
|
|
150 ifx$="l"goto74
|
|
151 goto145
|
|
152
|
|
153 ?chr$(147):gosub4:gosub14:?chr$(18)"buy cocaine"
|
|
154 ac=0:?:j=int(w/c):gosub30:m=m+k:w=w-(c*k):goto74
|
|
155
|
|
156 ?chr$(147):gosub4:gosub14:?chr$(18)"buy heroin"
|
|
157 ac=0:?:j=int(w/h):gosub30:n=n+k:w=w-(h*k):goto74
|
|
158
|
|
159 ?chr$(147):gosub4:gosub16:?chr$(18)"buy acid"
|
|
160 ?:j=int(w/a):gosub30:o=o+k:w=w-(a*k):goto74
|
|
161
|
|
162 ?chr$(147):gosub4:gosub16:?chr$(18)"buy weed"
|
|
163 ?:j=int(w/z):gosub30:u=u+k:w=w-(z*k):goto74
|
|
164
|
|
165 ?chr$(147):gosub4:gosub16:?chr$(18)"buy speed"
|
|
166 ?:j=int(w/s):gosub30:t=t+k:w=w-(s*k):goto74
|
|
167
|
|
168 ?chr$(147):gosub4:gosub16:?chr$(18)"buy ludes"
|
|
169 ?:j=int(w/l):gosub30:q=q+k:w=w-(l*k):goto74
|
|
170
|
|
171 ?chr$(147):gosub4:gosub12:?chr$(18)"sell cocaine"
|
|
172 ?:j=m:gosub39:m=m-k:w=w+(c*k):goto74
|
|
173
|
|
174 ?chr$(147):gosub4:gosub16:?chr$(18)"sell heroin"
|
|
175 ?:j=n:gosub39:n=n-k:w=w+(h*k):goto74
|
|
176
|
|
177 ?chr$(147):gosub4:gosub16:?chr$(18)"sell acid"
|
|
178 ?:j=o:gosub39:o=o-k:w=w+(a*k):goto74
|
|
179
|
|
180 ?chr$(147):gosub4:gosub16:?chr$(18)"sell weed":?:j=u
|
|
181 gosub39:u=u-k:w=w+(z*k):goto74
|
|
182
|
|
183 ?chr$(147):gosub4:gosub14:?chr$(18)"sell speed":?:j=t
|
|
184 gosub39:t=t-k:w=w+(s*k):goto74
|
|
185
|
|
186 ?chr$(147):gosub4:gosub14:?chr$(18)"sell ludes":?:j=q
|
|
187 gosub39:q=q-k:w=w+(l*k):goto74
|
|
188
|
|
189 ?chr$(147):gosub4:gosub22:?
|
|
190 ?"you're already in:":?" ";p$:gosub28:goto121
|
|
191
|
|
192 ?chr$(147):gosub56:v=int(v*1.1+.5):e=int(e*1.06+.5):gosub4:gosub18
|
|
193 ?chr$(18)"subway":?
|
|
194 ifb=1goto214
|
|
195 ifb=2goto216
|
|
196 ifb=3goto218
|
|
197 ifb=4goto221
|
|
198 ifb=5goto221
|
|
199 ifb=6goto224
|
|
200 ifb=7goto224
|
|
201 ifb=8goto227
|
|
202 ifb=9goto230
|
|
203 ifb=10goto230
|
|
204 ifb=11goto230
|
|
205 ifb=12goto297
|
|
206 ifb=13goto297
|
|
207 ifb=14goto308
|
|
208 ifb=15goto313
|
|
209 ifb=16goto319
|
|
210 ifb=17goto331
|
|
211
|
|
212 poke211,8:sys58640:?:?"welcome to ";p$:?:gosub28:goto74
|
|
213
|
|
214 ?"rival dealers are selling cheap ludes!":l=2:gosub28:goto74
|
|
215
|
|
216 ?"weed prices have bottomed-out!":z=122:gosub28:goto74
|
|
217
|
|
218 ?"pigs are selling cheap heroin":?"from last week's raid!"
|
|
219 h=int((rnd(1)*1150)+850.5):gosub28:goto74
|
|
220
|
|
221 ?"addicts are buying heroin":?"at outrageous prices!"
|
|
222 h=int((rnd(1)*25000)+18000.5):gosub28:goto74
|
|
223
|
|
224 ?"pigs made a big coke bust!":?"prices are outrageous!!!!"
|
|
225 c=int((rnd(1)*60000)+80000.5):gosub28:goto74
|
|
226
|
|
227 ?"you got mugged!":?:j=int(w/3):j=int(j*2):k=int(w-j)
|
|
228 ?"you lost $";k:w=j:gosub28:gosub74
|
|
229
|
|
230 gosub 46
|
|
231 iff>i/2thengoto212
|
|
232 ifb=9thenb=2
|
|
233 ifb=10thenb=4
|
|
234 ifb=11thenb=5
|
|
235 ?"it's the cops!":?:?"officer hardass and ";b-1;" of his"
|
|
236 ?"deputies are after you!":?:gosub28
|
|
237
|
|
238 ?chr$(147):gosub4:gosub48:?:?:?"view (g)uns":?"view (d)amage"
|
|
239 ?"(n)umber of pigs":?"(r)un":?"(f)ight":?
|
|
240 input"what do you want to do?";x$
|
|
241 ifx$="g"goto248
|
|
242 ifx$="d"goto252
|
|
243 ifx$="n"goto256
|
|
244 ifx$="r"goto260
|
|
245 ifx$="f"goto266
|
|
246 goto238
|
|
247
|
|
248 ?chr$(147):gosub4:gosub48:?:?
|
|
249 ifg=1then?"you have 1 gun.":gosub10:goto238
|
|
250 ?"you have ";g;" guns.":?:gosub10:goto238
|
|
251
|
|
252 ?chr$(147):gosub4:gosub48
|
|
253 ?:?:?"your current health is ";bb;".":?
|
|
254 ?"0 and you die!":?:gosub10:goto238
|
|
255
|
|
256 ?chr$(147):gosub4:gosub48
|
|
257 ifb=1then?:?:?"there is 1 pig still chasing you!":?:?:gosub10:goto238
|
|
258 ?:?:?"there are ";b;" pigs still chasing you!":?:?:gosub10:goto238
|
|
259
|
|
260 ?chr$(147):gosub4:gosub48:?:?:?"running...":gosub24
|
|
261 ifk=0then?"you lost them in an alley!":goto264
|
|
262 ?"you can't shake them!":?:goto275
|
|
263
|
|
264 ?:gosub10:goto74
|
|
265
|
|
266 ifg>0goto269
|
|
267 ?:?"you don't have any guns!":gosub10:goto238
|
|
268
|
|
269 ?chr$(147):gosub4:gosub48:?:?"you shoot!":gosub24
|
|
270 ifk=0goto273
|
|
271 ?"you got one!":?:?:b=b-1:goto275
|
|
272
|
|
273 ?"you missed!":?:?
|
|
274
|
|
275 ifb<=0goto288
|
|
276 gosub26:?"they're firing at you!":gosub24
|
|
277 ifk=0goto282
|
|
278 ?"you've been hit!":bb=bb-6
|
|
279 ifbb<=0goto286
|
|
280 goto284
|
|
281
|
|
282 ?"they missed!"
|
|
283
|
|
284 gosub28:goto238
|
|
285
|
|
286 ?:?"you've been killed!":gosub10:goto392
|
|
287
|
|
288 ?"you killed all of them!":?:gosub24:j=int(((rnd(1)*1250)+750)+.5)
|
|
289 w=w+j:?"you found $";j;" on officer hardass'":?"carcass!"
|
|
290 ifw>=1200goto293
|
|
291 goto74
|
|
292
|
|
293 gosub28:?:?"will you pay $1000 for a doctor":input"to sew you up?(y/n)";x$
|
|
294 ifx$<>"y"goto74
|
|
295 w=w-1000:bb=0:goto74
|
|
296
|
|
297 ifw<500goto212
|
|
298 gosub46
|
|
299 iff<5goto212
|
|
300 j=int((rnd(1)*2)+.5)
|
|
301 ifj=0then y$="baretta"
|
|
302 ifj=1then y$="saturday night special"
|
|
303 ifj=2then y$=".44 magnum"
|
|
304 ?"will you buy a ";y$:input"for $400?(y/n)";x$
|
|
305 ifx$<>"y"goto74
|
|
306 g=g+1:w=w-400:goto74
|
|
307
|
|
308 ?"there's some weed here that smells"
|
|
309 ?"like good stuff!!":?:input"will you smoke it?(y/n)";x$
|
|
310 ifx$="y"goto385
|
|
311 goto74
|
|
312
|
|
313 ifw<300goto212
|
|
314 ?"will you buy a new trenchcoat"
|
|
315 input"with more pockets for $200?(y/n)";x$
|
|
316 ifx$<>"y"goto74
|
|
317 i=i+10:w=w-200:goto74
|
|
318
|
|
319 gosub46:iff<8goto212
|
|
320 j=int((rnd(1)*7)+1.5):k=int(rnd(1)*5+.5)
|
|
321 ifk=0thenq=q+j:y$="ludes"
|
|
322 ifk=1thent=t+j:y$="speed"
|
|
323 ifk=2thenu=u+j:y$="weed"
|
|
324 ifk=3theno=o+j:y$="acid"
|
|
325 ifk=4thenn=n+j:y$="heroin"
|
|
326 ifk=5thenm=m+j:y$="cocaine"
|
|
327 ?"you found ";j;" units of ";y$
|
|
328 ?"on a dead dude in the subway!":?
|
|
329 gosub28:goto74
|
|
330
|
|
331 ?"the market has been flooded":?"with cheap home-made acid!"
|
|
332 a=int((rnd(1)*550)+250.5):gosub28:goto74
|
|
333
|
|
334 input"repay how much?";k
|
|
335 ifk>wthen?:?"you don't have that much!":gosub26:goto137
|
|
336 if k>v then?:?"you don't owe that much!":gosub26:goto137
|
|
337 w=w-k:v=v-k:?:?"thank you.":gosub28:goto74
|
|
338
|
|
339 ?:input"how much do you want?";k:?:j=int((rnd(1)*10000)+5000)
|
|
340 ifk<0then?"trying to rob me? double debt!":ad=ad+3:v=v*2:gosub28:goto74
|
|
341 ifk>14000then?"he's not that stupid!":gosub28:goto74
|
|
342 ifk>jthen?"he doesn't feel like it.":gosub26:goto74
|
|
343 v=v+k:w=w+k:?:?"here's your money.":?:?"
|
|
344 gosub28:goto74
|
|
345
|
|
346 ?:k=int((rnd(1)*100)+1):input"how much?";j:ifk=64goto350
|
|
347 ifj<0then?"you tried to rob the bank, but failed!":ad=ad+3:gosub26:goto74
|
|
348 ifj>wthen?"you don't have that much cash.":goto346
|
|
349
|
|
350 e=e+j:w=w-j:?:?"thank you for your deposit.":ifw<0thenw=w*-1
|
|
351 gosub28:goto74
|
|
352
|
|
353 ?:input"how much?";j:
|
|
354 ifj<0then?chr$(18)"try making a deposit, idiot.":goto26:goto145
|
|
355 ifj>ethen?"you don't have sufficient funds.":goto353
|
|
356 e=e-j:w=w+j:?:?"thank you for your business.":gosub28:goto74
|
|
357
|
|
358 ?chr$(147):poke211,3:sys58640:?"welcome to drugwar/64 version";rv
|
|
359 poke211,9:sys58640:?"ported from drugwar//e":?:?:?:?:?:?:?
|
|
360 poke211,5:sys58640:?"based on the ti-basic clone of"
|
|
361 poke211,7:sys58640:?"john e. dell's 1984 drugwar"
|
|
362 poke211,11:sys58640:?"for ibm and trs-80":?:?:?:?
|
|
363 poke211,6:sys58640:?"applesoft version by jay moore"
|
|
364 poke211,10:sys58640:?"c64 port by jay moore":poke211,1:poke214,23:sys58640
|
|
365 input "would you like instructions?(y/n)";x$:gosub8
|
|
366 ifx$="y"thengoto369
|
|
367 goto68
|
|
368
|
|
369 ?chr$(147):gosub4:gosub8:?
|
|
370 ?"this is a game of buying and selling."
|
|
371 ?"your goal is to pay off your debt and"
|
|
372 ?"make as much money as possible in a one"
|
|
373 ?"month period. prices change every day"
|
|
374 ?"and interest on your loan is calculated as well."
|
|
375 ?:?"deal too heavily and you'll attract the"
|
|
376 ?"attention of the police.":?
|
|
377 ?"commands are entered using the letter"
|
|
378 ?"highlighted (l)ike (s)o. y is yes and"
|
|
379 ?"anything counts as no.":gosub10:goto68
|
|
380
|
|
381 ?chr$(147):poke211,7:poke214,9:sys58640:?"put a quarter in your ass":gosub26
|
|
382 poke211,6:sys58640:?"'cause you played yourself!":gosub28
|
|
383 poke214,18:poke211,10:sys58640:?"don't cheat so much.":end
|
|
384
|
|
385 ?chr$(147):gosub4:gosub12:?chr$(18)"smoke weed"
|
|
386 ?"you hallucinate on the wildest trip"
|
|
387 ?"of your life, stumble on to the tracks,"
|
|
388 ?"and get creamed by a train!":?:?
|
|
389 poke211,7:sys58640:?"just say no to drugs!"
|
|
390 gosub28:gosub26:goto398
|
|
391
|
|
392 ?chr$(147):gosub4:gosub64:gosub50:?
|
|
393 ?"your score on a scale of 1 to 100:";k
|
|
394 ?:input "would you like to play again?(y/n)";x$:if x$="y" then goto68
|
|
395 ?"thanks for playing.":?"
|
|
396 end
|
|
397
|
|
398 ?chr$(147):gosub4:gosub50
|
|
399 ?:?"you died from smoking weed.":?:?:gosub28
|
|
400 ?"see? games are totally fake.":?:input "would you like to play again?";x$
|
|
401 ifx$="y"thengoto68
|
|
402 end
|