master
Jay 6 years ago
parent 07f85a27ce
commit 771b990901

File diff suppressed because it is too large Load Diff

@ -1,207 +1,64 @@
[ rem Drugwar//e - Beta 8
Drugwar //e beta-7 rem Copyright 2018 Jay Moore
(c) 2018 Jay Moore rem Released under GPL v3
Licensed under GPLv3 rem drugwar2e.sourceforge.io
] rem twitter: _nq4t
goto @instructions {because we're sticking subroutines up here} goto @instructions {because we're sticking subroutines up here}
£titlebar {this literally just draws the game title at the top of the screen} £titlebar {this literally just draws the game title at the top of the screen}
print " DRUGWAR//e " print ,"Drugwar//e",
return return
£wait £wait {ubiquitious "Press ENTER to continue}
print chr$(10) print chr$(10)
input "Press enter to continue.";x$ input "Press enter to continue.";x$
return return
[
"Common logic" has been moved to buy/sell subroutines.
This has cleaned the code up a bit
]
£howmuchbuy {some common purchase code} £howmuchbuy {some common purchase code}
print "You can afford ";j print "You can afford ";j
print "You can carry ";fs print "You can carry ";f
£howmanybuy
print chr$(10) print chr$(10)
input "How many? (Enter 0 cancel): ";k input "How many? (Enter 0 cancel): ";k
gosub @nobuysell if K=0 goto @menu
if k>f THEN inverse : print "You can't carry that much!" : normal : goto @howmanybuy
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @howmanybuy
return return
£howmuchsell {common sell code} £howmuchsell {common sell code}
print "You can sell: ";j print "You can sell: ";j
print chr$(10) print chr$(10)
[
I'm using this to test how some of the logic might work for buying
in a subroutine. In theory it should only loop if you put in more
than you can afford; check for 0 with the subroutine; and if that
condition isn't met...return to the subroutine which carries on
with the buy/sell. I just have to watch out for cases where
you do something invalid and it runs the purchase/sell anyway.
Checking valid freespace for buying can be put here too. But
lines that reference a specific drug are still in normal code.
]
£howmanysell £howmanysell
input "How many? (Enter 0 to cancel.): ";k input "How many? (Enter 0 to cancel.): ";k
If k>j then print "You don't have that many!" : goto @howmanysell {this should work according to my testing} If k>j then print "You don't have that many!" : goto @howmanysell
gosub @nobuysell if K=0 goto @menu
return
£nobuysell {I'll be reusing this a lot, so let's subroutine it.}
if K=0 goto @menu
return
£statusbar
inverse:print "DAY: ";D,P$:normal
print chr$(10)
return
£freespace {I'll probably call this from more than the menu}
fs=int(in-(ci+hi+ai+wi+si+li)+(gn*5))
return return
£daily {randomizes drug prices, adds a day, calculates interests, checks day number} £daily {randomizes drug prices, adds a day, calculates interests, checks day number}
c=int(rnd(1)*12000+16000.5) c=int(rnd(1)*12000+16000.5)
h=int(rnd(1)*7000+5000.5) h=int(rnd(1)*7000+5000.5)
a=int((rnd(1)*34+10)*100+.5) a=int((rnd(1)*34+10)*100+.5)
w=int((rnd(1)*42+33)*10+.5) z=int((rnd(1)*42+33)*10+.5)
s=int((rnd(1)*15+7)*10+.5) s=int((rnd(1)*15+7)*10+.5)
l=int((rnd(1)*4+1)*10+.5) l=int((rnd(1)*4+1)*10+.5)
b=int(rnd(1)*20+.5) b=int(rnd(1)*20+.5)
d=d+1 d=d+1
gosub @interest
£interest
if d = 1 then return
ls=int(ls*1.1+.5)
sa=int(sa*1.06+.5)
return
£checkday {so I can check the day by itself} £checkday {so I can check the day by itself}
if D >= 31 GOTO @endgame if D >= 31 GOTO @endgame
return return
£subwayevents
if b=1 then goto @cheapludes
if b=2 then goto @cheepweed
if b=3 then goto @pigheroin
if b=4 then goto @heroinbust
if b=5 then goto @heroinbust
if b=6 then goto @cokebust
if b=7 then goto @cokebust
if b=8 then goto @mugged
if b=9 then goto @cops
if b=10 then goto @cops
if b=11 then goto @cops
if b=12 then goto @gunbuy
if b=13 then goto @gunbuy
if b=14 then goto @dedweed
if b=15 then goto @newcoat
if b=16 then goto @dedguy
if b=17 then goto @homeacid
return
£cheapludes
print "Rival dealers are selling cheap ludes!"
l=2
gosub @wait
goto @menu
£cheepweed
print "Weed prices have bottomed-out!"
w=122
gosub @wait
goto @menu
£pigheroin
print "Pigs are selling cheap heroin"
print "from last week's raid!"
h=int((rnd(1)*1150)+850.5)
gosub @wait
goto @menu
£heroinbust
print "Addicts are buying heroin"
print "at outrageous prices!"
h=int((rnd(1)*25000)+18000.5)
gosub @wait
goto @menu
£cokebust
print "Pigs made a big coke bust!"
print "Prices are outrageous!!!!"
c=int((rnd(1)*60000)+80000.5) {the infamous line 930}
gosub @wait
goto @menu
£mugged
print "You got mugged!"
print chr$(10)
ms=int(wa/3)
ms=int(ms*2)
ml=int(wa-ms)
print "You lost $";ml
wa=ms
gosub @wait
gosub @menu
£cops
we=CI+HI+WI+AI+SI+LI
[
my improved revisions will likely add some additional
conditions on how/when we run cops
]
if we<50 then return
print "It's the cops!"
print chr$(10)
print "Just kidding!"
print "Cops haven't been coded yet."
gosub @wait
goto @menu {goto @police}
£gunbuy
if wa < 500 THEN return
gosub @freespace
if fs < 5 THEN return
gx=int(rnd(1)*2)
if gx = 0 then ax$ = "Baretta"
if gx = 1 then ax$ = "Saturday Night Special"
if gx = 2 then ax$ = ".44 Magnum"
print "Will you buy a ";ax$
input "for $400? (Y/N)";re$
if re$ <> "Y" then goto @menu
gn = int(gn+1)
wa = int(wa-400)
goto @menu
£dedweed
print "There's some weed here that smells"
print "like good stuff!!"
print chr$(10)
input "Will you smoke it? (Y/N)";X$
If X$ = "Y" THEN GOTO @weedend
return
£newcoat
if wa<300 then return
print "Will you buy a new trenchcoat"
input "with more pockets for $200? (Y/N)";X$
if X$ <> "Y" then goto @menu
in=int(in+10)
wa=int(wa-200)
goto @menu
£dedguy
If fs<8 THEN return
dg=int((rnd(1)*7)+1.5)
xg=int(rnd(1)*5+.5)
if xg=0 THEN li=li+dg : ss$ = "Ludes"
if xg=1 THEN si=si+dg : ss$ = "Speed"
if xg=2 THEN wi=wi+dg : ss$ = "Weed"
if xg=3 THEN ai=ai+dg : ss$ = "Acid"
if xg=4 THEN hi=hi+dg : ss$ = "Heroin"
if xg=5 THEN ci=ci+dg : ss$ = "Cocaine"
print "You found ";dg;" units of"
print " ";ss$
print "on a dead dude in the subway!"
print chr$(10)
gosub @wait
goto @menu
£homeacid
print "The market has been flooded"
print "with cheap home-made acid!"
a=int((rnd(1)*550)+250.5)
gosub @wait
goto @menu
£menu {main menu. everything should loop back here}
£menu
home home
f=i-(m+n+o+u+t+q) {former sub-routine}
gosub @titlebar gosub @titlebar
gosub @freespace {it might be more efficient to calculate freespace now} inverse : print "Day:";D,p$, : normal
inverse : print " Day:";D;" ";ph$ : normal print chr$(10)
print "(C)heck Prices" print "(C)heck Prices"
print "(I)nventory" print "(I)nventory"
print "(B)uy" print "(B)uy"
@ -209,47 +66,43 @@ conditions on how/when we run cops
print "(J)et" print "(J)et"
print "See (L)oan shark" print "See (L)oan shark"
print "(V)isit Bank" print "(V)isit Bank"
input "Please make your selection: ";T$ input "Please make your selection: ";x$
if t$ = "C" goto @prices if x$ = "C" goto @prices
if t$ = "I" goto @inventory if x$ = "I" goto @inventory
if t$ = "B" goto @buy if x$ = "B" goto @buy
if t$ = "S" goto @sell if x$ = "S" goto @sell
if t$ = "J" goto @jet if x$ = "J" goto @jet
if t$ = "L" goto @loan if x$ = "L" goto @loan
if t$ = "V" goto @bank if x$ = "V" goto @bank
print "Invalid Selection" {This should be enough to catch errors. I should have a loop timer on this.}
goto @menu goto @menu
£prices £prices
home home
gosub @titlebar {this is literally recycled from the price and gosub demo} gosub @titlebar
inverse:print" PRICES ":normal inverse:print" PRICES ":normal
print chr$(10) print chr$(10)
print"cocaine:","$"c print"cocaine:","$"c
print"heroin:","$"h print"heroin:","$"h
print"acid:","$"a print"acid:","$"a
print"weed:","$"w print"weed:","$"z
print"speed:","$"s print"speed:","$"s
print"ludes:","$"l print"ludes:","$"l
print"wallet:","$"wa print"wallet:","$"w
gosub @wait gosub @wait
goto @menu goto @menu
£inventory £inventory
home home
gosub @titlebar gosub @titlebar
inverse:print" INVENTORY ":normal inverse:print" INVENTORY ":normal
print chr$(10) print chr$(10)
print"cocaine:",ci print"cocaine:",m
print"heroin:",hi print"heroin:",n
print"acid:",ai print"acid:",o
print"weed:",wi print"weed:",u
print"speed:",si print"speed:",t
print"ludes:",li print"ludes:",q
print"free space:",fs print"free space:",f
gosub @wait gosub @wait
goto @menu goto @menu
£buy £buy
home home
gosub @titlebar gosub @titlebar
@ -263,87 +116,68 @@ conditions on how/when we run cops
print "(W)eed" print "(W)eed"
print "(S)peed" print "(S)peed"
print "(L)udes" print "(L)udes"
input "Enter Selection: ";db$ input "Enter Selection: ";x$
if db$="c" goto @cokebuy if x$="c" goto @cokebuy
if db$="h" goto @herbuy if x$="h" goto @herbuy
if db$="a" goto @acidbuy if x$="a" goto @acidbuy
if db$="w" goto @weedbuy if x$="w" goto @weedbuy
if db$="s" goto @spdbuy if x$="s" goto @spdbuy
if db$="l" goto @ludbuy if x$="l" goto @ludbuy
goto @menu goto @menu
[
To "save space" the calculation for how much you can afford and carry
as well as looking for 0 to return to menu are a subroutine. I want to
subroutine some of the logic...but I'll have to try and organize the
code to allow that due to the gotos in the IF statements. Otherwise
it'll screw up. I'll work on that in a revision after the game mostly
works.
]
£cokebuy £cokebuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY COCAINE ":normal inverse:print" BUY COCAINE ":normal
print chr$(10) print chr$(10)
j=int(wa/c) j=int(w/c) {calculate how many we can buy}
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @cokebuy m=m+k : w=w-(c*k) {when the subroutine sends us back when the purchase is valid}
if k<=j then ci=ci+k : wa=wa-(c*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @cokebuy
goto @menu goto @menu
£herbuy £herbuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY HEROIN ":normal inverse:print" BUY HEROIN ":normal
print chr$(10) print chr$(10)
j=int(wa/h) j=int(w/h)
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @herbuy n=n+k : w=w-(h*k)
if k<=j then hi=hi+k : wa=wa-(h*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @herbuy
goto @menu goto @menu
£acidbuy £acidbuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY ACID ":normal inverse:print" BUY ACID ":normal
print chr$(10) print chr$(10)
j=int(wa/a) j=int(w/a)
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @acidbuy o=o+k : w=w-(a*k)
if k<=j THEN ai=ai+k : wa=wa-(a*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @acidbuy
goto @menu goto @menu
£weedbuy £weedbuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY WEED ":normal inverse:print" BUY WEED ":normal
print chr$(10) print chr$(10)
j=int(wa/w) j=int(w/z)
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @weedbuy u=u+k : w=w-(z*k)
if k<=j THEN wi=wi+k : wa=wa-(w*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @weedbuy
goto @menu goto @menu
£spdbuy £spdbuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY SPEED ":normal inverse:print" BUY SPEED ":normal
print chr$(10) print chr$(10)
j=int(wa/s) j=int(w/s)
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @spdbuy t=t+k : w=w-(s*k)
if k<=j THEN si=si+k : wa=wa-(s*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @spdbuy
goto @menu goto @menu
£ludbuy £ludbuy
home home
gosub @titlebar gosub @titlebar
inverse:print" BUY LUDES ":normal inverse:print" BUY LUDES ":normal
print chr$(10) print chr$(10)
j=int(wa/l) j=int(w/l)
gosub @howmuchbuy gosub @howmuchbuy
if k>fs THEN inverse : print "You can't carry that much!" : normal : goto @ludbuy q=q+k : w=w-(l*k)
if k<=j THEN li=li+k : wa=wa-(l*k)
if k>j THEN inverse : print "You can't afford that much!" : normal : goto @ludbuy
goto @menu goto @menu
£sell £sell
home home
@ -359,14 +193,14 @@ works.
print "(S)peed" print "(S)peed"
print "(L)udes" print "(L)udes"
£sellsel £sellsel
input "Enter Selection: (0 to cancel)";db$ input "Enter Selection: (0 to cancel)";x$
if db$="c" goto @cokesell if x$="c" goto @cokesell
if db$="h" goto @hersell if x$="h" goto @hersell
if db$="a" goto @acidsell if x$="a" goto @acidsell
if db$="w" goto @weedsell if x$="w" goto @weedsell
if db$="s" goto @spdsell if x$="s" goto @spdsell
if db$="l" goto @ludsell if x$="l" goto @ludsell
if db$="0" goto @menu if x$="0" goto @menu
print "Invalid Selection!" print "Invalid Selection!"
goto @sellsel goto @sellsel
@ -375,10 +209,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL COCAINE ":normal inverse:print" SELL COCAINE ":normal
print chr$(10) print chr$(10)
j=ci j=m {write amount to variable}
gosub @howmuchsell gosub @howmuchsell
ci=ci-k m=m-k {sub sends back here if valid, adjusts inventory}
wa=wa+(c*k) w=w+(c*k) {adds money to wallet}
goto @menu goto @menu
£hersell £hersell
@ -386,10 +220,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL HEROIN ":normal inverse:print" SELL HEROIN ":normal
print chr$(10) print chr$(10)
j=hi j=n
gosub @howmuchsell gosub @howmuchsell
hi=hi-k n=n-k
wa=wa+(h*k) w=w+(h*k)
goto @menu goto @menu
£acidsell £acidsell
@ -397,10 +231,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL ACID ":normal inverse:print" SELL ACID ":normal
print chr$(10) print chr$(10)
j=ai j=o
gosub @howmuchsell gosub @howmuchsell
ai=ai-k o=o-k
wa=wa+(a*k) w=w+(a*k)
goto @menu goto @menu
£weedsell £weedsell
@ -408,10 +242,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL WEED ":normal inverse:print" SELL WEED ":normal
print chr$(10) print chr$(10)
j=wi j=u
gosub @howmuchsell gosub @howmuchsell
wi=wi-k u=u-k
wa=wa+(w*k) w=w+(z*k)
goto @menu goto @menu
£spdsell £spdsell
@ -419,10 +253,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL SPEED ":normal inverse:print" SELL SPEED ":normal
print chr$(10) print chr$(10)
j=si j=t
gosub @howmuchsell gosub @howmuchsell
si=si-k t=t-k
wa=wa+(s*k) w=w+(s*k)
goto @menu goto @menu
£ludsell £ludsell
@ -430,10 +264,10 @@ works.
gosub @titlebar gosub @titlebar
inverse:print" SELL LUDES ":normal inverse:print" SELL LUDES ":normal
print chr$(10) print chr$(10)
j=li j=q
gosub @howmuchsell gosub @howmuchsell
li=li-k q=q-k
wa=wa+(l*k) w=w+(l*k)
goto @menu goto @menu
£jet £jet
home home
@ -447,18 +281,18 @@ works.
print "Coney (I)sland" print "Coney (I)sland"
print "Broo(K)lyn" print "Broo(K)lyn"
print "(O)ops...stay!" print "(O)ops...stay!"
input "Where to dude? ";jt$ input "Where to dude? ";x$
if jt$="B" then pq$ = "The Bronx" : GOTO @jetb if x$="B" then y$ = "The Bronx" : GOTO @jetb {we can use strings}
if jt$="G" then pq$ = "The Ghetto" : GOTO @jetb if x$="G" then y$ = "The Ghetto" : GOTO @jetb
if jt$="C" then pq$ = "Central Park" : GOTO @jetb if x$="C" then y$ = "Central Park" : GOTO @jetb
if jt$="M" then pq$ = "Manhatten" : goto @jetb if x$="M" then y$ = "Manhatten" : goto @jetb
if jt$="I" then pq$ = "Coney Island" : goto @jetb if x$="I" then y$ = "Coney Island" : goto @jetb
if jt$="K" then pq$ = "Brooklyn" : goto @jetb if x$="K" then y$ = "Brooklyn" : goto @jetb
if jt$="O" then goto @menu if x$="O" then goto @menu
goto @jet goto @jet
£jetb £jetb
if pq$=ph$ then goto @alreadythere if y$=p$ then goto @alreadythere {more advanced thatn Bronx only on TI}
ph$ = pq$ p$ = y$ {it's valid, copy it and move along}
goto @subway goto @subway
£alreadythere £alreadythere
@ -467,23 +301,146 @@ works.
inverse:print" JET ":normal inverse:print" JET ":normal
print chr$(10) print chr$(10)
print "You're already in:" print "You're already in:"
print " ";ph$ print " ";p$
gosub @wait gosub @wait
goto @jet goto @jet
£subway £subway
home home
gosub @daily gosub @daily
V=int(V*1.1+.5) {loan calculation}
E=int(E*1.06+.5) {savings calculation}
gosub @titlebar gosub @titlebar
inverse:print" SUBWAY ":normal inverse:print" SUBWAY ":normal
print chr$(10) print chr$(10)
gosub @subwayevents if b=1 then goto @cheapludes
if b=2 then goto @cheepweed
if b=3 then goto @pigheroin
if b=4 then goto @heroinbust
if b=5 then goto @heroinbust
if b=6 then goto @cokebust
if b=7 then goto @cokebust
if b=8 then goto @mugged
if b=9 then goto @cops
if b=10 then goto @cops
if b=11 then goto @cops
if b=12 then goto @gunbuy
if b=13 then goto @gunbuy
if b=14 then goto @dedweed
if b=15 then goto @newcoat
if b=16 then goto @dedguy
if b=17 then goto @homeacid
print chr$(10) {the only way you should wind up here is if nothing happens} print chr$(10) {the only way you should wind up here is if nothing happens}
print "Welcome to ";ph$ {i hope} print "Welcome to ";p$ {i hope}
print chr$(10) print chr$(10)
input "Press ENTER to continue. ";X$ input "Press ENTER to continue. ";X$
goto @menu goto @menu
£cheapludes
print "Rival dealers are selling cheap ludes!"
l=2
gosub @wait
goto @menu
£cheepweed
print "Weed prices have bottomed-out!"
z=122
gosub @wait
goto @menu
£pigheroin
print "Pigs are selling cheap heroin"
print "from last week's raid!"
h=int((rnd(1)*1150)+850.5)
gosub @wait
goto @menu
£heroinbust
print "Addicts are buying heroin"
print "at outrageous prices!"
h=int((rnd(1)*25000)+18000.5)
gosub @wait
goto @menu
£cokebust
print "Pigs made a big coke bust!"
print "Prices are outrageous!!!!"
c=int((rnd(1)*60000)+80000.5) {the infamous line 930}
gosub @wait
goto @menu
£mugged
print "You got mugged!"
print chr$(10)
j=int(w/3)
j=int(j*2)
k=int(w-j)
print "You lost $";k
w=j
gosub @wait
gosub @menu
£cops
k=m+n+u+o+t+p {cops only active when inventory < 50}
[
my improved revisions will likely add some additional
conditions on how/when we run cops
]
if k<50 then return
print "It's the cops!"
print chr$(10)
print "Just kidding!"
print "Cops haven't been coded yet."
gosub @wait
goto @menu {goto @police}
£gunbuy
if w < 500 THEN return
f=int(i-(m+n+o+u+t+p))
if f < 5 THEN return
j=int(rnd(1)*2)
if j = 0 then y$ = "Baretta"
if j = 1 then y$ = "Saturday Night Special"
if j = 2 then y$ = ".44 Magnum"
print "Will you buy a ";y$
input "for $400? (Y/N)";x$
if x$ <> "Y" then goto @menu
g = int(g+1)
w = int(w-400)
i = int(i-5) {I kept having problems calculating this with free space as guns * 5. gave up. put it here}
goto @menu
£dedweed {don't smoke the weed}
print "There's some weed here that smells"
print "like good stuff!!"
print chr$(10)
input "Will you smoke it? (Y/N)";X$
If X$ = "Y" THEN GOTO @weedend
goto@menu
£newcoat
if w<300 then return {only if you can afford it}
print "Will you buy a new trenchcoat"
input "with more pockets for $200? (Y/N)";X$
if X$ <> "Y" then goto @menu
i=int(i+10)
w=int(w-200)
goto @menu
£dedguy
If f<8 THEN return {only if you have enough freespace}
j=int((rnd(1)*7)+1.5)
k=int(rnd(1)*5+.5)
if k=0 THEN q=q+j : y$ = "Ludes"
if k=1 THEN t=t+j : y$ = "Speed"
if k=2 THEN u=u+j : y$ = "Weed"
if k=3 THEN o=o+j : y$ = "Acid"
if k=4 THEN n=n+j : y$ = "Heroin"
if k=5 THEN m=m+j : y$ = "Cocaine"
print "You found ";j;" units of"
print " ";y$
print "on a dead dude in the subway!"
print chr$(10)
gosub @wait
goto @menu
£homeacid
print "The market has been flooded"
print "with cheap home-made acid!"
a=int((rnd(1)*550)+250.5)
gosub @wait
goto @menu
£notbronx £notbronx
print "you need to head to the bronx" print "you need to head to the bronx"
print "to take care of this business." print "to take care of this business."
@ -493,11 +450,11 @@ works.
£loan £loan
home home
gosub @titlebar gosub @titlebar
inverse : print " LOAN SHARK " :NORMAL inverse : print " LOAN SHARK ":normal
print chr$(10) print chr$(10)
if ph$ <> "THE BRONX" then goto @notbronx if p$ <> "THE BRONX" then goto @notbronx
print "Your debt is: $";ls print "Your debt is: $";v
print "You have: $";wa print "You have: $";w
print chr$(10) print chr$(10)
input "(R)epay, (B)orrow, (L)eave: ";X$ input "(R)epay, (B)orrow, (L)eave: ";X$
If X$ = "R" THEN goto @payme If X$ = "R" THEN goto @payme
@ -505,31 +462,34 @@ works.
If X$ = "L" then goto @Menu If X$ = "L" then goto @Menu
goto @loan goto @loan
£payme £payme
INPUT "Repay how much? ";PL INPUT "Repay how much? ";k
IF WA<PL THEN PRINT "YOU DON'T HAVE THAT MUCH!" : INPUT "PRESS ENTER TO CONTINUE. ";X$ : GOTO @LOAN IF k>w THEN PRINT "YOU DON'T HAVE THAT MUCH!" : INPUT "PRESS ENTER TO CONTINUE. ";X$ : GOTO @LOAN
IF PL>LS THEN PRINT "YOU DON'T OWE THAT MUCH!" : INPUT"PRESS ENTER TO CONTINE. ";X$ : GOTO @LOAN IF k>v THEN PRINT "YOU DON'T OWE THAT MUCH!" : INPUT"PRESS ENTER TO CONTINE. ";X$ : GOTO @LOAN
WA=WA-PL W=W-k
LS=LS-PL v=v-k
PRINT "THANK YOU." PRINT "THANK YOU."
GOSUB @WAIT GOSUB @WAIT
GOTO @MENU GOTO @MENU
£borrow £borrow
Input "How much do you want? ";BL Input "How much do you want? ";K
if bl>5000 then print "He's not that stupid!" : goto @borrow if K>5000 then print "He's not that stupid!" : goto @borrow
ls=ls+bl v=v+k
wa=wa+bl w=w+k
print "Here's your money." : PRINT CHR$(10) : PRINT "Remember, I break thumbs." print "Here's your money." : PRINT CHR$(10) : PRINT "Remember, I break thumbs."
gosub @wait gosub @wait
goto @menu goto @menu
£bank £bank
home home
gosub @titlebar gosub @titlebar
inverse : print " BANK O'MURICA ":NORMAL inverse : print " BANK O'MURICA ":normal
print chr$(10) print chr$(10)
if ph$ <> "THE BRONX" then goto @notbronx if p$ <> "THE BRONX" then goto @notbronx
print "Your balance: $";sa print "Your balance: $";e
print "Your wallet: $";wa print "Your wallet: $";w
print chr$(10) print chr$(10)
INPUT "(D)EPOSIT, (W)ITHDRAW, (L)EAVE: ";X$ INPUT "(D)EPOSIT, (W)ITHDRAW, (L)EAVE: ";X$
if x$ = "d" then goto @deposit if x$ = "d" then goto @deposit
@ -538,18 +498,18 @@ works.
goto @bank goto @bank
£deposit £deposit
INPUT "How much? ";dl INPUT "How much? ";j
If wa<dl then print "You don't have that much cash." : goto @deposit If j>w then print "You don't have that much cash." : goto @deposit
sa=sa+dl e=e+j
wa=wa-dl w=w-j
Print "Thank you for your deposit." Print "Thank you for your deposit."
gosub @wait gosub @wait
goto @menu goto @menu
£mymoney £mymoney
INPUT "How much? ";dl INPUT "How much? ";j
If sa<dl then print "You don't have sufficient funds." : goto @mymoney If j>e then print "You don't have sufficient funds." : goto @mymoney
sa=sa-dl e=e-j
wa=wa+dl w=w+j
print "Thank you for your business." print "Thank you for your business."
gosub @wait gosub @wait
goto @menu goto @menu
@ -558,32 +518,34 @@ works.
home home
gosub @titlebar gosub @titlebar
print chr$(10) print chr$(10)
print "Welcome to DRUGWAR//e" print "Welcome to DRUGWAR//e Beta 8"
print chr$(10) print chr$(10)
print chr$(10) print chr$(10)
input "Would you like instructions? (Y/N): ";Q$ input "Would you like instructions? (Y/N): ";X$
£inserrorhandler {I'm hoping this will prevent crashes} £inserrorhandler {I'm hoping this will prevent crashes}
If Q$ = "Y" THEN GOTO @inst If X$ = "Y" THEN GOTO @inst
IF Q$ = "N" THEN GOTO @gamestart GOTO @gamestart
input "I don't understand you. Y or N only. ";Q$
goto @inserrorhandler
£gamestart {set wallet, debt, location, inventory space, zero out inventory} £gamestart {set wallet, debt, location, inventory space, zero out inventory}
wa=2000 w=2000
sa=0 e=0
ls=5000 v=5000
d=0 {daily subroutine adds a day} d=0 {daily subroutine adds a day}
ph$="The Bronx" p$="The Bronx"
gn=0 g=0
dp=0 i=100
in=100 m=0
ci=0 n=0
hi=0 o=0
ai=0 u=0
wi=0 t=0
si=0 q=0
li=0
gosub @daily {the only time we'll call this outside of the subway} gosub @daily {the only time we'll call this outside of the subway}
goto @menu {the real start of the game} goto @menu {the real start of the game}
£police
£inst £inst
home home
gosub @titlebar gosub @titlebar
@ -615,11 +577,11 @@ works.
goto @ironicend goto @ironicend
£scorecalculate £scorecalculate
sc=(wa+sa)-ls k=(w+e)-v
if sc<0 THEN sc=0 : return if k<0 THEN k=0 : return
sc=sqr((sc/31.5)+.5) k=sqr((k/31.5)+.5)
sc=int(sc) k=int(k)
if sc>100 then sc=100 if k>100 then k=100
return return
£endgame £endgame
@ -628,14 +590,14 @@ works.
gosub @scorecalculate gosub @scorecalculate
inverse : print " GAME OVER " : NORMAL inverse : print " GAME OVER " : NORMAL
print chr$(10) print chr$(10)
print "Your score on a scale of 1 to 100: ";sc print "Your score on a scale of 1 to 100: ";k
print chr$(10) print chr$(10)
input "Would you like to play again? (Y/N)";pa$ input "Would you like to play again? (Y/N)";x$
if pa$ = "Y" then goto @gamestart if x$ = "Y" then goto @gamestart
print "Thanks for playing." print "Thanks for playing."
print "Remember...watch your back." print "Remember, watch your back."
print "Have a nice day!" print "Have a nice day!"
gosub @anticheat clear
end end
£ironicend £ironicend
@ -644,33 +606,15 @@ works.
gosub @scorecalculate gosub @scorecalculate
inverse : print " GAME OVER " : NORMAL inverse : print " GAME OVER " : NORMAL
print chr$(10) print chr$(10)
print "Your final score is: ";sc print "Your final score is: ";k
print chr$(10) print chr$(10)
print "But you died from smoking weed? In a" print "But you died from smoking weed? In a"
print "game about dealing drugs? Buddy, no" print "game about dealing drugs? Buddy, no"
print "score can redeem that stupidity." print "score can redeem that stupidity."
print chr$(10) print chr$(10)
input "Would you like to play again? ";pa$ input "Would you like to play again? ";x$
if pa$= "Y" THEN GOTO @GAMESTART if x$= "Y" THEN GOTO @GAMESTART
if pa$= "N" THEN PRINT "I don't blame you." : end if x$= "N" THEN PRINT "I don't blame you." : end
print "What? If you're that dumb, I'm leaving." print "What? If you're that dumb, I'm leaving."
gosub @anticheat clear
end end
£anticheat {clears out all variables at endgame to force a start-over}
wa=2000
sa=0
ls=5000
d=0 {daily subroutine adds a day}
ph$="The Bronx"
gn=0
dp=0
in=100
ci=0
hi=0
ai=0
wi=0
si=0
li=0
return

Loading…
Cancel
Save