master
Jay 6 years ago
parent 424011a39f
commit 07f85a27ce

File diff suppressed because it is too large Load Diff

@ -36,16 +36,21 @@ lines that reference a specific drug are still in normal code.
If k>j then print "You don't have that many!" : goto @howmanysell {this should work according to my testing}
gosub @nobuysell
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
£daily {randomizes drug prices, adds a day, calculates interests, checks day number}
c=int(rnd(1)*12000+16000.5)
h=int(rnd(1)*7000+5000.5)
@ -55,8 +60,14 @@ lines that reference a specific drug are still in normal code.
l=int((rnd(1)*4+1)*10+.5)
b=int(rnd(1)*20+.5)
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}
if D >= 31 GOTO @endgame
return
@ -79,6 +90,7 @@ lines that reference a specific drug are still in normal code.
if b=16 then goto @dedguy
if b=17 then goto @homeacid
return
£cheapludes
print "Rival dealers are selling cheap ludes!"
l=2
@ -207,6 +219,7 @@ conditions on how/when we run cops
if t$ = "V" goto @bank
print "Invalid Selection" {This should be enough to catch errors. I should have a loop timer on this.}
goto @menu
£prices
home
gosub @titlebar {this is literally recycled from the price and gosub demo}
@ -221,6 +234,7 @@ conditions on how/when we run cops
print"wallet:","$"wa
gosub @wait
goto @menu
£inventory
home
gosub @titlebar
@ -235,6 +249,7 @@ conditions on how/when we run cops
print"free space:",fs
gosub @wait
goto @menu
£buy
home
gosub @titlebar
@ -255,7 +270,7 @@ conditions on how/when we run cops
if db$="w" goto @weedbuy
if db$="s" goto @spdbuy
if db$="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
@ -478,9 +493,9 @@ works.
£loan
home
gosub @titlebar
inverse : print " LOAN SHARK "
inverse : print " LOAN SHARK " :NORMAL
print chr$(10)
if p$ <> "THE BRONX" then goto @notbronx
if ph$ <> "THE BRONX" then goto @notbronx
print "Your debt is: $";ls
print "You have: $";wa
print chr$(10)
@ -491,23 +506,30 @@ works.
goto @loan
£payme
INPUT "Repay how much? ";PL
IF PL>WA THEN PRINT "YOU DON'T HAVE THAT MUCH!" : INPUT "PRESS ENTER TO CONTINUE. ";X$ : GOTO @LOAN
IF WA<PL 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
WA=WA-PL
LS=LS-PL
PRINT "THANK YOU."
GOSUB @WAIT
GOTO @MENU
£borrow
Input "How much do you want? ";BL
if bl>5000 then print "He's not that stupid!" : goto @borrow
ls=ls+bl
wa=wa+bl
print "Here's your money." : PRINT CHR$(10) : PRINT "Remember, I break thumbs."
gosub @wait
goto @menu
£bank
home
gosub @titlebar
inverse : print " BANK O'MURICA "
inverse : print " BANK O'MURICA ":NORMAL
print chr$(10)
if p$ <> "THE BRONX" then goto @notbronx
if ph$ <> "THE BRONX" then goto @notbronx
print "Your balance: $";sa
print "Your wallet: $";sa
print "Your wallet: $";wa
print chr$(10)
INPUT "(D)EPOSIT, (W)ITHDRAW, (L)EAVE: ";X$
if x$ = "d" then goto @deposit
@ -517,7 +539,7 @@ works.
£deposit
INPUT "How much? ";dl
If dl>wa then print "You don't have that much cash." : goto @deposit
If wa<dl then print "You don't have that much cash." : goto @deposit
sa=sa+dl
wa=wa-dl
Print "Thank you for your deposit."
@ -525,7 +547,7 @@ works.
goto @menu
£mymoney
INPUT "How much? ";dl
If dl>sa then print "You don't have sufficient funds." : goto @mymoney
If sa<dl then print "You don't have sufficient funds." : goto @mymoney
sa=sa-dl
wa=wa+dl
print "Thank you for your business."
@ -651,4 +673,4 @@ works.
si=0
li=0
return

Loading…
Cancel
Save