home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/filegate
/
filegate.zip
/
filegate
/
gamesnet
/
g_amiga
/
A85NWR13.ZIP
/
A85NWR13.LHA
/
Dopewars-Source.txt
< prev
next >
Wrap
Text File
|
1999-12-26
|
14KB
|
435 lines
Rem **********************************
Rem ** Dope Wars **
Rem ** ⌐ 2000. AmiDev **
Rem ** Version 1.02b **
Rem ** Amiga version by Mark Gare **
Rem **********************************
Dim GUN$(5),GUN_PRICE(4),DRUG_LIST$(2,9),DRUG_PRICE(2,9),DRUG_CONTENT(9),PLACE$(6),PLCE$(6),_ADD(9)
CASH=4000 : COAT=0 : COATMAX=100 : PLACE=1 : DAY=1 : _MAXDAY=31 : LOAN=2000 : BANK=0 : LOAN_PAID=0 : GUNS=0 : HEALTH=100 : G=1
GUN$(1)="None "
GUN$(2)="Beretta"
GUN$(3)="Colt-45"
GUN$(4)="Shotgun"
GUN$(5)="Uzi"
GUN_PRICE(1)=3000
GUN_PRICE(2)=6000
GUN_PRICE(3)=9500
GUN_PRICE(4)=30000
Global DRUG_LIST$(),COAT,COATMAX,DRUG_PRICE(),DRUG_CONTENT(),PLACE$(),PLCE$(),_ADD(),GUN$(),GUN_PRICE()
Global COAT,COATMAX,CASH,PLACE,DAY,_MAXDAY,LOAN,BANK,LOAN_PAID,GUNS,HEALTH,G
_INTRO
_GAME
Procedure _SCREEN[Z]
If Z=1
Screen Open 0,640,256,16,Hires
Paper 0
Curs Off
Flash Off
Hide
Cls 0
End If
If Z=2
Fade 3
Wait 4
Screen Close 0
End If
End Proc
Do
Procedure _INTRO
_SCREEN[1]
Pen 4
Locate ,3 : Centre "Dope Wars - ⌐ Amidev 2000"
Locate 3,5 : Print "You are about to enter an underground world of trading drugs, fighting"
Locate 3,6 : Print "the police and dealing with loan sharks and petty thieves. No, you"
Locate 3,7 : Print "havent been elected to Government - this is Dope Wars, a rather silly"
Locate 3,8 : Print "and harmless game."
Locate 3,10 : Print "However, to have the level of maturity and wisdom to actually understand"
Locate 3,11 : Print "the difference between real life and a harmless game, conventional thinking"
Locate 3,12 : Print "says that you must be over 18 years of age. If you are under that age, please"
Locate 3,13 : Print "press N now to leave this game. Otherwise press Y now."
Pen 2
Locate ,16 : Centre "Press Y to continue or N to exit Dope Wars"
Repeat
K$=Inkey$
K$=Lower$(K$)
If Key State(69)=True Then End
If K$="y" Then Z=1
If K$="n"
_SCREEN[2]
Wait 1
End
End If
Until Z=1
_SCREEN[2]
End Proc
Procedure _GAME
_SCREEN[1]
_GO:
Repeat
Cls 0
Locate ,1 : Centre "Dope Wars"
Goto _LIST
_LIST:
Locate 5,8 : Print "Drug List"
Locate 45,8 : Print "Stock List"
Locate 20,8 : Print "Drug Price"
Locate 60,8 : Print "Quantity"
Gosub _DATA
Locate 4,3 : Print "Money :";CASH
Locate 36,3 : Print "Bank :";BANK
Locate 4,4 : Print "Location : ";PLACE$(PLACE)
Locate 4,5 : Print "Day :";DAY;" /";_MAXDAY
Locate 36,4 : Print "Health :";HEALTH;"/100"
Locate 36,5 : Print "Current Gun : ";GUN$(G)
Locate 4,6 : Print "Loan :";LOAN
Locate 5,10 : Print DRUG_LIST$(1,1) : Locate 20,10 : Print DRUG_PRICE(2,1) : Locate 45,10 : Print DRUG_LIST$(2,1) : Locate 60,10 : Print DRUG_CONTENT(1)
Locate 5,11 : Print DRUG_LIST$(1,2) : Locate 20,11 : Print DRUG_PRICE(2,2) : Locate 45,11 : Print DRUG_LIST$(2,2) : Locate 60,11 : Print DRUG_CONTENT(2)
Locate 5,12 : Print DRUG_LIST$(1,3) : Locate 20,12 : Print DRUG_PRICE(2,3) : Locate 45,12 : Print DRUG_LIST$(2,3) : Locate 60,12 : Print DRUG_CONTENT(3)
Locate 5,13 : Print DRUG_LIST$(1,4) : Locate 20,13 : Print DRUG_PRICE(2,4) : Locate 45,13 : Print DRUG_LIST$(2,4) : Locate 60,13 : Print DRUG_CONTENT(4)
Locate 5,14 : Print DRUG_LIST$(1,5) : Locate 20,14 : Print DRUG_PRICE(2,5) : Locate 45,14 : Print DRUG_LIST$(2,5) : Locate 60,14 : Print DRUG_CONTENT(5)
Locate 5,15 : Print DRUG_LIST$(1,6) : Locate 20,15 : Print DRUG_PRICE(2,6) : Locate 45,15 : Print DRUG_LIST$(2,6) : Locate 60,15 : Print DRUG_CONTENT(6)
Locate 5,16 : Print DRUG_LIST$(1,7) : Locate 20,16 : Print DRUG_PRICE(2,7) : Locate 45,16 : Print DRUG_LIST$(2,7) : Locate 60,16 : Print DRUG_CONTENT(7)
Locate 5,17 : Print DRUG_LIST$(1,8) : Locate 20,17 : Print DRUG_PRICE(2,8) : Locate 45,17 : Print DRUG_LIST$(2,8) : Locate 60,17 : Print DRUG_CONTENT(8)
Locate 5,18 : Print DRUG_LIST$(1,9) : Locate 20,18 : Print DRUG_PRICE(2,9) : Locate 45,18 : Print DRUG_LIST$(2,9) : Locate 60,18 : Print DRUG_CONTENT(9)
Locate 5,20 : Print "F1 - Buy Drugs" : Locate 30,20 : Print "F2 - Sell Drugs" : Locate 51,20 : Print "F3 - Jet"
Locate 5,21 : Print "F4 - Finances" : Locate 30,21 : Print "F5 - Gun shop" : Locate 51,21 : Print "F6 - Hospital"
Z=0
If DAY>6 Then Gosub _POLICE
Repeat
K$=Inkey$
If Key State(80)=True Then Z=1
If Key State(81)=True Then Z=2
If Key State(82)=True Then Z=3
If Key State(83)=True Then Z=4
If Key State(84)=True Then Z=5
If Key State(85)=True Then Z=6
If Key State(69)=True Then End
Until Z>0
Wait 15
If Z=1 Then Gosub _BUY
If Z=2 Then Gosub _SELL
If Z=3 Then Gosub _JET
If Z=4 Then Gosub _BANK
If Z=5 Then Gosub _GUN_SHOP
If Z=6 Then Gosub _HOSPITAL
If DAY=32 Then MD=1
If DAY<32 Then Goto _GO
Until MD=1
Pop Proc
_BUY:
Locate ,23 : Centre "Press the key representing the drug you want to buy."
B=0
Repeat
K$=Inkey$
K$=Lower$(K$)
If Key State(69)=True Then End
If K$="h" Then B=1
If K$="c" Then B=2
If K$="o" Then B=3
If K$="e" Then B=4
If K$="a" Then B=5
If K$="w" Then B=6
If K$="r" Then B=7
If K$="s" Then B=8
If K$="p" Then B=9
Until B>0
BUY=CASH/DRUG_PRICE(2,B)
Locate 5,24 : Print "You can buy";BUY;" units of the drug ";DRUG_LIST$(2,B)
AGAIN1:
Locate 5,25 : Print "How many units do you want to buy" : Locate 38,25 : Input UNIT
If UNIT>BUY Then Goto AGAIN1
If UNIT<=BUY Then Goto OK1
OK1:
BUY=DRUG_PRICE(2,B)*UNIT
CASH=CASH-BUY
COAT=COAT+UNIT
DRUG_CONTENT(B)=UNIT
Wait 5
Return
_SELL:
Locate ,23 : Centre "Press the key representing the drug you want to sell."
B=0
Repeat
K$=Inkey$
K$=Lower$(K$)
If Key State(69)=True Then End
If K$="h" Then B=1
If K$="c" Then B=2
If K$="o" Then B=3
If K$="e" Then B=4
If K$="a" Then B=5
If K$="w" Then B=6
If K$="r" Then B=7
If K$="s" Then B=8
If K$="p" Then B=9
Until B>0
Locate 5,24 : Print "You can sell";DRUG_CONTENT(B);" units of the drug ";DRUG_LIST$(2,B)
AGAIN2:
Locate 5,25 : Print "How many units do you want to sell" : Locate 39,25 : Input UNIT
If UNIT>DRUG_CONTENT(B) Then Goto AGAIN2
If UNIT<=DRUG_CONTENT(B) Then Goto OK2
OK2:
PRICE=UNIT*DRUG_PRICE(2,B)
DRUG_CONTENT(B)=DRUG_CONTENT(B)-UNIT
CASH=CASH+PRICE
Wait 5
Return
_JET:
Locate 5,23 : Print PLCE$(1) : Locate 30,23 : Print PLCE$(2) : Locate 55,23 : Print PLCE$(3)
Locate 5,24 : Print PLCE$(4) : Locate 30,24 : Print PLCE$(5) : Locate 55,24 : Print PLCE$(6)
P=0
Repeat
K$=Inkey$
If Key State(69)=True Then End
If Key State(80)=True Then P=1
If Key State(81)=True Then P=2
If Key State(82)=True Then P=3
If Key State(83)=True Then P=4
If Key State(84)=True Then P=5
If Key State(85)=True Then P=6
Until P>0
PLACE=P
P=0
Inc DAY
If LOAN_PAID<>1
PLUS=LOAN*0.025
LOAN=LOAN+PLUS
End If
Return
_DATA:
DRUG_PRICE(1,1)=5000
DRUG_PRICE(1,2)=10000
DRUG_PRICE(1,3)=1000
DRUG_PRICE(1,4)=50
DRUG_PRICE(1,5)=500
DRUG_PRICE(1,6)=200
DRUG_PRICE(1,7)=500
DRUG_PRICE(1,8)=100
DRUG_PRICE(1,9)=200
_ADD(1)=Rnd(5000) : _ADD(2)=Rnd(10000) : _ADD(3)=Rnd(1000) : _ADD(4)=Rnd(50)
_ADD(5)=Rnd(500) : _ADD(6)=Rnd(500) : _ADD(7)=Rnd(500) : _ADD(8)=Rnd(100) : _ADD(9)=Rnd(200)
For Z=1 To 9
DRUG_PRICE(2,Z)=DRUG_PRICE(1,Z)+_ADD(Z)
Next Z
DRUG_LIST$(1,1)="(H)erion"
DRUG_LIST$(1,2)="(C)oke"
DRUG_LIST$(1,3)="(O)pium"
DRUG_LIST$(1,4)="(E)cstasy"
DRUG_LIST$(1,5)="(A)cid"
DRUG_LIST$(1,6)="(W)eed"
DRUG_LIST$(1,7)="C(r)ack"
DRUG_LIST$(1,8)="(S)peed"
DRUG_LIST$(1,9)="(P)eyote"
DRUG_LIST$(2,1)="Herion"
DRUG_LIST$(2,2)="Coke"
DRUG_LIST$(2,3)="Opium"
DRUG_LIST$(2,4)="Ecstasy"
DRUG_LIST$(2,5)="Acid"
DRUG_LIST$(2,6)="Weed"
DRUG_LIST$(2,7)="Crack"
DRUG_LIST$(2,8)="Speed"
DRUG_LIST$(2,9)="Peyote"
PLACE$(1)="Bronx "
PLACE$(2)="Getto "
PLACE$(3)="Central Park"
PLACE$(4)="Manhatten "
PLACE$(5)="Coney Island"
PLACE$(6)="Brooklyn "
PLCE$(1)="F1 - Bronx "
PLCE$(2)="F2 - Getto "
PLCE$(3)="F3 - Central Park"
PLCE$(4)="F4 - Manhatten "
PLCE$(5)="F5 - Coney Island"
PLCE$(6)="F6 - Brooklyn "
Return
_POLICE:
A=Rnd(10)
PIGS=Rnd(4)
If A=1 or A=4 or A=7 Then Gosub _PIGS
If A=2 or A=3 or A=5 or A=8 or A=9 or A=10 Then Return
_PIGS:
Locate ,22 : Centre "Oh shit, theres Mr Policeman!"
Locate 5,24 : Print "Gun : ";GUN$(G);" Health :";HEALTH;" "
Locate 5,25 : Print "There are";PIGS;" pig(s), what are you going to do?"
Locate 5,26 : Print "F1 - Fight"
Locate 5,27 : Print "F2 - Run"
Z=0
Repeat
K$=Inkey$
If Key State(80) Then Z=1
If Key State(81) Then Z=2
Until Z>0
If Z=1
If G=1
Locate 5,28 : Print "You have no gun to fight with"
Locate 5,29 : Print "Press any key to continue."
Wait Key
Locate 2,28 : Print " "
Locate 2,29 : Print " "
Goto _PIGS
End If
If G>1
ZZ=Rnd(3)
If ZZ=1
HIT=0
End If
If ZZ=2
HIT=1
End If
If ZZ=3
HIT=2
End If
If HIT=0
Locate 5,28 : Print "You missed, they missed."
Locate 5,29 : Print "Press a key to continue."
Wait Key
End If
If HIT=1
Locate 5,28 : Print "You missed, they hit."
Locate 5,29 : Print "Press a key to continue."
HEALTH=HEALTH-5
Wait Key
End If
If HIT=2
Locate 5,28 : Print "You hit, they missed."
Locate 5,29 : Print "Press a key to continue."
PIGS=PIGS-1
Wait Key
End If
End If
End If
If PIGS<>0 Then Goto _PIGS
If PIGS=0
Locate 5,28 : Print "You killed them all."
Locate 5,29 : Print "Press a key to continue."
Wait Key
Locate 4,28 : Print " "
Locate 4,29 : Print " "
Goto _GO
End If
If Z=2
If PIGS<3
Locate 5,28 : Print "You managed to escape down an alley."
Locate 5,29 : Print "Press a key to continue."
ZZZ=3
Wait Key
Locate 4,28 : Print " "
Locate 4,29 : Print " "
Goto _GO
End If
If PIGS=3 or PIGS=4
H=Rnd(2)
If H=1
Locate 5,28 : Print "You have been shot at. They hit."
HEALTH=HEALTH-5
End If
If H=2
Locate 5,28 : Print "You managed to escape down an alley."
ZZZ=3
End If
Locate 5,29 : Print "Press any key to continue."
Wait Key
Locate 4,28 : Print " "
Locate 4,29 : Print " "
End If
End If
If ZZZ=3 Then Goto _GO
_BANK:
Locate 5,23 : Print "F1 - Deposit" : Locate 25,23 : Print "F2 - Withdraw" : Locate 46,23 : Print "F3 Pay Loan"
Z=0
Repeat
K$=Inkey$
If Key State(69)=True Then End
If Key State(80)=True Then Z=1
If Key State(81)=True Then Z=2
If Key State(82)=True Then Z=3
Until Z>0
If Z=1 Then Gosub DEPOSIT
If Z=2 Then Gosub WITHDRAW
If Z=3 Then Gosub PAYLOAN
Return
DEPOSIT:
A:
Locate 5,24 : Print "You have";CASH;" to deposit."
Locate 5,25 : Print "How much would you like to deposit" : Locate 39,25 : Input D
If D>CASH Then Goto A
CASH=CASH-D
BANK=BANK+D
Return
WITHDRAW:
B:
Locate 5,24 : Print "You have";BANK;" to withdraw."
Locate 5,25 : Print "How much would you like to withdraw" : Locate 40,25 : Input W
If W>BANK Then Goto B
BANK=BANK-W
CAH=CASH+W
Return
PAYLOAN:
Locate 5,24 : Print "Your loan oustanding is at";LOAN
If CASH<LOAN
Wait 5
Locate 5,25 : Print "You do not have suffient funds to pay back your loan."
Locate ,26 : Centre "Press any key to continue"
Wait 10
Wait Key
Return
End If
Locate 5,25 : Print "You have now paid off your loan. Press a key to continue."
CASH=CASH-L
LOAN=0
LOAN_PAID=1
Return
_GUN_SHOP:
Locate ,23 : Centre "Welcome to Billy Blowem Away's Gun Shop"
Locate ,24 : Centre "Choose your weapon"
Locate 5,25 : Print "F1 - ";GUN$(2);" at";GUN_PRICE(1)
Locate 5,26 : Print "F2 - ";GUN$(3);" at";GUN_PRICE(2)
Locate 5,27 : Print "F3 - ";GUN$(4);" at";GUN_PRICE(3)
Locate 5,28 : Print "F4 - ";GUN$(5);" at";GUN_PRICE(4)
Z=0
Repeat
K$=Inkey$
If Key State(80) Then Z=1
If Key State(81) Then Z=2
If Key State(82) Then Z=3
If Key State(83) Then Z=4
Until Z>0
If CASH<GUN_PRICE(Z) Then Return
If CASH>=GUN_PRICE(Z)
CASH=CASH-GUN_PRICE(Z)
G=0
G=Z+1
End If
Return
_HOSPITAL:
Do
A=HEALTH/5
B=100
Locate ,23 : Centre "Welcome to Dodgy Daves Hospital"
Locate 5,24 : Print "Each 5 units of health cost $500. You have";A;"/20 units of health."
Locate 5,25 : Print "F1 - Buy health at $500 per unit."
Locate 5,26 : Print "F2 - Return back to drug dealing."
Z=0
Repeat
K$=Inkey$
If Key State(80)=True Then Z=1
If Key State(81)=True Then Z=2
Until Z>0
If Z=2 Then Return
If Z=1 and CASH>=500 and HEALTH<>100
CASH=CASH-500
HEALTH=HEALTH+5
End If
Loop
End Proc
Loop