Drug Cartel

Date: 198x
Type: Program
Platform(s): TS 2068
Tags: Game

Drug Cartel is a trading game in the style of Drug Wars. You have arrived in the USA and must make $100,000,000 for your superiors. You start with about $2000 and a fixed number of hours. You choose a city, travel there by plane ($125, 6 hours) or train ($75, 9 hours), and then buy and sell five illegal goods at prices that change on every trip. A menu lets you buy, sell, check prices, view your stash and move on. Running out of time or money ends the game with “PREPARE TO DIE!” and a burst of gunfire sound effects. Reaching the target in the last week makes you a drug lord yourself, with a flashing border.

The program opens with “From the forests of Columbia comes…” and then “DRUG CARTEL By STONEWARE”. It was found on Phillip Kwitkowski’s Larken disk, along with an earlier copy that has a different turn timer.

Program Analysis

Game loop

Each week (w) starts with less time, t=140-(w*10), and with cash reset to m=2020-(10*w). Moving between cities deducts the fare and the hours. Prices are drawn with RND (lines 740–830), and the program redraws them until cocaine is at least 150 and heroin at least 200. The city menu accepts 1–6, but every city leads to the same code, so the choice has no effect on play. Once cash passes $100,000,000, the program shows it as two numbers, thousands and units.

Input

Menus use INPUT INKEY$ followed by tests on INKEY$, so the key has to be held down to register. Quantities are entered with INPUT LINE, and a loop checks that every character is a digit.

Notable Techniques

  • TS2068 SOUND used for the gunfire effects.
  • A digit-checking loop over INPUT LINE text.

Potential Issues

  • The buy routines add the requested amount to your stock (line 1270 and the matching lines) before checking whether you can afford it. Asking for too many still adds the goods, and then the program asks again.
  • A non-digit entry in a sell routine jumps back into the matching buy routine (for example, line 1770 goes to 1260).
  • With a starting stake near $2000 and prices under $900, the $100,000,000 target appears to be out of reach in normal play.
  • Above $100,000,000, the cash display leaves out the leading zeros of the last three digits.
  • Line 240 resets cash to about $2000 at the start of every week, so money earned in one week does not carry over.
  • Answering N to “PLAY AGAIN?” jumps to line 2750, which does not exist, so the program simply ends.
  • Spelling slips in the messages include “Congradulations” and “the money poor in”.

This copy came from a Larken disk. For tape, the LKDOS prefixes were removed from the SAVE and LOGICALL lines, and the autostart was set to line 10. It was tested in ZEsarUX on a stock TS2068.

Image Gallery

Source Code

   10 CLS 
   20 PAPER 7: BORDER 7: INK 9
   30 RUN 40
   40 LET i=1
   50 LET d=1
   60 LET w=1
   70 LET sh=0
   80 LET op=0
   90 LET po=0
  100 LET co=0
  110 LET he=0
  120 PRINT AT 9,5; "From the forests of             Columbia comes..."
  130 PAUSE 0: BORDER 0
  140 CLS 
  150 PRINT AT 9,10;"DRUG CARTEL"
  160 PRINT AT 11,10;"By STONEWARE"
  170 BEEP 1,.5
  180 BEEP 2,.1
  190 BORDER 7: CLS 
  200 PRINT "Being new in the USA, you are   required by your superiors to   make $100,000,000 in five days. Good luck..."
  210 PAUSE 0
  220 LET w=w+1
  230 LET t=140-(w*10)
  240 LET m=2020-(10*W)
  250 CLS 
  260 PRINT AT 14,0;"Week:";w-1
  270 PRINT AT 16,0;"Time:";t
  280 PRINT AT 5,5;"YOU NOW HAVE $";m
  290 PAUSE 0
  300 CLS 
  310 PRINT AT 5,8;"CHOOSE A CITY!"
  320 PRINT AT 7,8;"1....CHICAGO"
  330 PRINT AT 8,8;"2....BOSTON"
  340 PRINT AT 9,8;"3....LOS ANGELES"
  350 PRINT AT 10,8;"4....NEW YORK"
  360 PRINT AT 11,8;"5....MIAMI"
  370 PRINT AT 12,8;"6....DETROIT"
  380 INPUT INKEY$
  390 IF INKEY$="1" THEN GO TO 460
  400 IF INKEY$="2" THEN GO TO 460
  410 IF INKEY$="3" THEN GO TO 460
  420 IF INKEY$="4" THEN GO TO 460
  430 IF INKEY$="5" THEN GO TO 460
  440 IF INKEY$="6" THEN GO TO 460
  450 GO TO 380
  460 CLS 
  470 PRINT AT 4,5;"Choose form of travel."
  480 PRINT AT 9,0;"Plane: $125  6hours             Train: $75   9hours"
  490 LET h=t
  500 PRINT AT 16,0;"Hours Left",h
  510 IF m>100000000 THEN GO TO 540
  520 PRINT AT 18,0;"Cash Left",m
  530 GO TO 550
  540 PRINT AT 18,0;"Cash Left","$";INT (m/1000);INT (m-(INT (m/1000)*1000))
  550 INPUT INKEY$
  560 PAUSE 0
  570 IF INKEY$="p" OR INKEY$="P" THEN GO TO 600
  580 IF INKEY$="t" OR INKEY$="T" THEN GO TO 650
  590 GO TO 470
  600 LET m=m-125
  610 LET t=t-6
  620 IF t<=0 THEN GO TO 2440
  630 IF m<=0 THEN GO TO 2690
  640 GO TO 720
  650 LET m=m-75
  660 LET t=t-9
  670 IF t<=0 THEN GO TO 2440
  680 IF m<=0 THEN GO TO 2690
  690 GO TO 700
  700 REM money
  710 IF m>100000000 THEN GO TO 2240
  720 REM prices
  730 CLS 
  740 LET shrooms=INT (RND*500)
  750 LET opium=INT (RND*600)
  760 LET pot=INT (RND*500)
  770 LET cocaine=INT (RND*700)
  780 LET heroin=INT (RND*900)
  790 IF cocaine<150 THEN GO TO 740
  800 IF heroin<200 THEN GO TO 740
  810 IF shrooms<2 THEN GO TO 740
  820 IF opium<2 THEN GO TO 740
  830 IF pot<2 THEN GO TO 740
  840 CLS 
  850 PRINT AT 3,8;"PRICES HERE ARE"
  860 PRINT AT 6,2;"SHROOMS: ";shrooms
  870 PRINT AT 8,2;"OPIUM:   ";opium
  880 PRINT AT 10,2;"POT:     ";pot
  890 PRINT AT 12,2;"COCAINE: ";cocaine
  900 PRINT AT 14,2;"HEROIN:  ";heroin
  910 PAUSE 0
  920 REM menu
  930 CLS 
  934 IF m<=0 THEN GO TO 2690
  935 IF m>100000000 THEN GO TO 2240
  940 PRINT AT 5,8;"MAKE A SELECTION"              
  950 PRINT AT 8,2;"1....BUY"
  960 PRINT AT 10,2;"2....SELL"
  970 PRINT AT 12,2;"3....PRICES"
  980 PRINT AT 14,2;"4....STASH"
  990 PRINT AT 16,2;"5....MOVE"
 1000 INPUT INKEY$
 1010 PAUSE 0
 1020 IF INKEY$="1" THEN GO TO 1080
 1030 IF INKEY$="2" THEN GO TO 1590
 1040 IF INKEY$="3" THEN GO TO 810
 1050 IF INKEY$="4" THEN GO TO 2100
 1060 IF INKEY$="5" THEN GO TO 300
 1070 GO TO 1010
 1080 REM BUY
 1090 CLS 
 1100 PRINT AT 5,11;"Buy what?"
 1110 PRINT AT 8,2;"1....SHROOMS"
 1120 PRINT AT 10,2;"2....OPIUM"
 1130 PRINT AT 12,2;"3....POT"
 1140 PRINT AT 14,2;"4....COCAINE"
 1150 PRINT AT 16,2;"5....HEROIN"
 1160 INPUT INKEY$
 1170 PAUSE 0
 1180 IF INKEY$="1" THEN GO TO 1240
 1190 IF INKEY$="2" THEN GO TO 1310
 1200 IF INKEY$="3" THEN GO TO 1380
 1210 IF INKEY$="4" THEN GO TO 1450
 1220 IF INKEY$="5" THEN GO TO 1520
 1230 GO TO 1160
 1240 CLS 
 1250 PRINT AT 5,5;"Buy how many?(";INT (m/shrooms);" max)"
 1260 INPUT LINE a$: FOR i=1 TO LEN a$: IF CODE a$(i)<48 OR CODE a$(i)>57 THEN GO TO 1260: NEXT i: LET a=VAL a$
 1270 LET sh=sh+VAL a$
 1280 IF VAL a$>m/shrooms THEN GO TO 1250
 1290 LET m=m-(VAL a$*shrooms)
 1300 GO TO 920
 1310 CLS 
 1320 PRINT AT 5,5;"Buy how many?(";INT (m/opium);" max)"
 1330 INPUT LINE a$: FOR i=1 TO LEN a$: IF CODE a$(i)<48 OR CODE a$(i)>57 THEN GO TO 1330: NEXT i: LET b=VAL a$
 1340 LET op=op+VAL a$
 1350 IF VAL a$>m/opium THEN GO TO 1320
 1360 LET m=m-(VAL a$*opium)
 1370 GO TO 920
 1380 CLS 
 1390 PRINT AT 5,5;"Buy how many?(";INT (m/pot);" max)"
 1400 INPUT LINE a$: FOR i=1 TO LEN a$: IF CODE a$(i)<48 OR CODE a$(i)>57 THEN GO TO 1400: NEXT i: LET c=VAL a$
 1410 LET po=po+VAL a$
 1420 IF VAL a$>m/pot THEN GO TO 1390
 1430 LET m=m-(VAL a$*pot)
 1440 GO TO 920
 1450 CLS 
 1460 PRINT AT 5,5;"Buy how many?(";INT (m/cocaine);" max)"
 1470 INPUT LINE a$: FOR i=1 TO LEN a$: IF CODE a$(i)<48 OR CODE a$(i)>57 THEN GO TO 1470: NEXT i: LET d=VAL a$
 1480 LET co=co+VAL a$
 1490 IF VAL a$>m/cocaine THEN GO TO 1460
 1500 LET m=m-(VAL a$*cocaine)
 1510 GO TO 920
 1520 CLS 
 1530 PRINT AT 5,5;"Buy how many?(";INT (m/heroin);" max)"
 1540 INPUT LINE a$: FOR i=1 TO LEN a$: IF CODE a$(i)<48 OR CODE a$(i)>57 THEN GO TO 1540: NEXT i: LET e=VAL a$
 1550 LET he=he+VAL a$
 1560 IF VAL a$>m/heroin THEN GO TO 1530
 1570 LET m=m-(VAL a$*heroin)
 1580 GO TO 920
 1590 REM SELL
 1600 CLS 
 1610 PRINT AT 5,10;"SELL WHAT?"
 1620 PRINT AT 8,2;"1....SHROOMS"
 1630 PRINT AT 10,2;"2....OPIUM"
 1640 PRINT AT 12,2;"3....POT"
 1650 PRINT AT 14,2;"4....COCAINE"
 1660 PRINT AT 16,2;"5....HEROIN"
 1670 INPUT INKEY$
 1680 PAUSE 0
 1690 IF INKEY$="1" THEN GO TO 1750
 1700 IF INKEY$="2" THEN GO TO 1820
 1710 IF INKEY$="3" THEN GO TO 1890
 1720 IF INKEY$="4" THEN GO TO 1960
 1730 IF INKEY$="5" THEN GO TO 2030
 1740 GO TO 1670
 1750 CLS 
 1760 PRINT AT 5,5;"Sell how many? (";sh;" max)"
 1770 INPUT LINE b$: FOR i=1 TO LEN b$: IF CODE b$(i)<48 OR CODE b$(i)>57 THEN GO TO 1260: NEXT i: LET a=VAL b$
 1780 IF VAL b$>sh THEN GO TO 1760
 1790 LET sh=sh-VAL b$
 1800 LET m=m+(VAL b$*shrooms)
 1805 IF m>100000000 THEN GO TO 2240
 1810 GO TO 920
 1820 CLS 
 1830 PRINT AT 5,5;"Sell how many? (";op;" max)"
 1840 INPUT LINE b$: FOR i=1 TO LEN b$: IF CODE b$(i)<48 OR CODE b$(i)>57 THEN GO TO 1330: NEXT i: LET a=VAL b$
 1850 IF VAL b$>op THEN GO TO 1830
 1860 LET op=op-VAL b$
 1870 LET m=m+(VAL b$*opium)
 1875 IF m>100000000 THEN GO TO 2240
 1880 GO TO 920
 1890 CLS 
 1900 PRINT AT 5,5;"Sell how many? (";po;" max)"
 1910 INPUT LINE b$: FOR i=1 TO LEN b$: IF CODE b$(i)<48 OR CODE b$(i)>57 THEN GO TO 1400: NEXT i: LET a=VAL b$
 1920 IF VAL b$>po THEN GO TO 1900
 1930 LET po=po-VAL b$
 1940 LET m=m+(VAL b$*pot)
 1945 IF m>100000000 THEN GO TO 2240
 1950 GO TO 920
 1960 CLS 
 1970 PRINT AT 5,5;"Sell how many? (";co;" max)"
 1980 INPUT LINE b$: FOR i=1 TO LEN b$: IF CODE b$(i)<48 OR CODE b$(i)>57 THEN GO TO 1470: NEXT i: LET a=VAL b$
 1990 IF VAL b$>co THEN GO TO 1970
 2000 LET co=co-VAL b$
 2010 LET m=m+(VAL b$*cocaine)
 2015 IF m>100000000 THEN GO TO 2240
 2020 GO TO 920
 2030 CLS 
 2040 PRINT AT 5,5;"Sell how many? (";he;" max)"
 2050 INPUT LINE b$: FOR i=1 TO LEN b$: IF CODE b$(i)<48 OR CODE b$(i)>57 THEN GO TO 1540: NEXT i: LET a=VAL b$
 2060 IF VAL b$>he THEN GO TO 2040
 2070 LET he=he-VAL b$
 2080 LET m=m+(VAL b$*heroin)
 2085 IF m>100000000 THEN GO TO 2240
 2090 GO TO 920
 2100 REM STASH
 2110 CLS 
 2120 PRINT AT 2,11;"YOU HAVE:"
 2130 PRINT AT 8,2;"SHROOMS:",sh
 2140 PRINT AT 10,2;"OPIUM:",op
 2150 PRINT AT 12,2;"POT:",po
 2160 PRINT AT 14,2;"COCAINE:",co
 2170 PRINT AT 16,2;"HEROIN:",he
 2180 IF m>100000000 THEN GO TO 2210
 2190 PRINT AT 4,5;"Cash:  $";m
 2200 GO TO 2220
 2210 PRINT AT 4,5;"Cash:  $";INT (m/1000);INT (m-(INT (m/1000)*1000))
 2220 PAUSE 0
 2230 GO TO 920
 2240 REM you won
 2250 IF w=5 THEN GO TO 2300
 2260 CLS 
 2270 PRINT "Congradulation, you earned over $100,000,000.  You hand the     money over to the drug lord.    Prepare yourself for another    week!"
 2280 PAUSE 0
 2290 GO TO 220
 2300 CLS 
 2310 PRINT AT 5,0; FLASH 1;"Congradulations, you are now a  drug lord yourself. No more hardwork, just sit back and watch   the money poor in!              "
 2320 LET d=d+1: LET i=i+1
 2330 IF d>7 THEN LET d=1
 2340 BORDER d
 2350 IF i>800 THEN GO TO 2370
 2360 GO TO 2320
 2370 CLS 
 2380 PAPER 7: BORDER 7
 2390 PRINT AT 5,11;"PLAY AGAIN?"
 2400 INPUT LINE P$
 2410 IF P$="Y" OR P$="y" THEN GO TO 10
 2420 IF P$="N" OR P$="n" THEN GO TO 2750
 2430 GO TO 2400
 2440 REM loss by time
 2450 CLS 
 2460 PRINT AT 5,6;"YOU RAN OUT OF TIME!"
 2470 PAUSE 0
 2480 CLS 
 2490 PRINT AT 5,9;"PREPARE TO DIE!"
 2500 PAUSE 60
 2510 CLS 
 2520 PRINT AT 5,10; FLASH 1;"B A N G !"
 2530 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2540 PAUSE 10
 2550 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2560 PAUSE 10
 2570 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2580 PAUSE 10
 2590 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2600 PAUSE 10
 2610 PAUSE 10
 2620 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2630 PAUSE 10
 2640 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2650 PAUSE 10
 2660 SOUND 6,15;7,7;8,16;10,16;12,16;13,0
 2670 CLS : PAUSE 0
 2680 GO TO 2370
 2690 REM loss by money
 2700 CLS 
 2710 PRINT AT 5,5;"YOU RAN OUT OF MONEY!"
 2720 PAUSE 0
 2730 GO TO 2480
 2740 GO TO 10
 9992 SAVE "DRUG.B1" LINE 10
 9998 REM  was LKDOS-only

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.