home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
1052a.dms
/
1052a.adf
/
main2
< prev
next >
Wrap
Text File
|
1991-08-23
|
51KB
|
2,086 lines
50 :
RANDOMIZE TIMER
ON MENU GOSUB menumaster
MENU ON
GOSUB sc1
GOSUB newstart
GET (0,0)-(320,8),topline%
loop:
IF gostop%<>0 THEN waiting
GOSUB simulated.time
ON gflag% GOTO gendy
GOSUB movealltrucks
GOSUB journeycomplete
GOTO loop
gendy:
gflag%=0:GOTO loop
movealltrucks:
FOR q%=0 TO 4
FOR w%=0 TO 1
IF truck%(w%,q%,13)>0 THEN laidup
IF truck%(w%,q%,0)>0 THEN GOSUB movetruck
loop5:
NEXT:NEXT
RETURN
laidup:
truck%(w%,q%,13)=truck%(w%,q%,13)-1
truck%(w%,q%,19)=truck%(w%,q%,19)-1
IF truck%(w%,q%,13)=0 AND truck%(w%,q%,14)=0 THEN truck%(w%,q%,0)=-5
IF truck%(w%,q%,13)=0 AND truck%(w%,q%,14)<>0 THEN truck%(w%,q%,14)=0
GOTO loop5
movetruck:
t%=35:'IF w%=0 THEN t%=25:REM was 30
x%=INT(RND*t%):IF x%=q% THEN penalty
tmove!(w%,q%,2)=tmove!(w%,q%,2)+tmove!(w%,q%,0)
tmove!(w%,q%,3)=tmove!(w%,q%,3)+tmove!(w%,q%,1)
OBJECT.X truck%(w%,q%,12),INT(tmove!(w%,q%,2))
OBJECT.Y truck%(w%,q%,12),INT(tmove!(w%,q%,3))
truck%(w%,q%,5)=truck%(w%,q%,5)-1
truck%(w%,q%,19)=truck%(w%,q%,19)-1
IF truck%(w%,q%,5)=<0 THEN
truck%(w%,q%,13)=2*truck%(w%,q%,10)
END IF
truck%(w%,q%,3)=truck%(w%,q%,3)-truck%(w%,q%,11)
IF truck%(w%,q%,3)=<0 THEN nofuel
RETURN
journeycomplete:
FOR q%=0 TO 4
FOR w%=0 TO 1
IF truck%(w%,q%,0)=-5 THEN GOSUB new.truck
NEXT:NEXT
RETURN
flash.truck:
x%=OBJECT.X(truck%(w%,q%,12)):y%=OBJECT.Y(truck%(w%,q%,12))
IF x%>100 THEN x%=x%-100
a%=x%+3:b%=y%+12:c1%=24+w%
COLOR 20,c1%:OBJECT.OFF
GET (x%,y%)-STEP(100,20),getput%
FOR t%=0 TO 5
LINE (x%,y%)-STEP(100,20),c1%,bf
LINE (x%,y%)-STEP(100,20),10,b
xyptab a%,b%
PRINT tname$(w%,q%)
FOR tt%=0 TO 700:NEXT
PUT (x%,y%),getput%,PSET
FOR tt%=0 TO 200:NEXT
NEXT
PUT (x%,y%),getput%,PSET
OBJECT.ON
RETURN
penalty:
MOUSE OFF:TIMER OFF
IF win4%<5 THEN fontaok
WINDOW OUTPUT 4
fontset "topaz",8
fontaok:
WINDOW OUTPUT 3
x%=INT(RND*5)+1
win4%=4
ON x% GOTO spding,ttrouble,rgang,tstuf,rdam
nopen:
WINDOW OUTPUT 3
IF gostop%=0 THEN MOUSE ON:TIMER ON
RETURN
tstuf:
IF truck%(w%,q%,16)>57 OR truck%(w%,q%,18)=1 THEN nopen
truck%(w%,q%,18)=1
pic$="tstuf"
e%=(100-truck%(w%,q%,16))*(truck%(w%,q%,7)*5)
r%=0:IF w%=0 THEN r%=1
GOSUB flash.truck
GOSUB threscreen
COLOR 3,6
xyptab 135,50:PRINT co.name$(w%)
xyptab 135,62:PRINT tname$(w%,q%)
xyptab 180,135:PRINT co.name$(r%)
xyptab 217,185:WRITE e%
WINDOW 4
money&(r%)=money&(r%)+(truck%(w%,q%,8)*10)
truck%(w%,q%,8)=-e%/10:truck%(w%,q%,9)=19
truck%(w%,q%,19)=0:truck%(w%,q%,20)=0
GOTO expenalty
spding:
IF truck%(w%,q%,15)<61 OR truck%(w%,q%,18)=2 THEN nopen
pic$="speeding"
truck%(w%,q%,18)=2
e%=INT((truck%(w%,q%,15)-60)*10)*truck%(w%,q%,7)
r%=INT(RND*9)+1
GOSUB flash.truck
GOSUB threscreen
COLOR 6,7
xyptab 172,121:PRINT co.name$(w%)
xyptab 153,131:PRINT tname$(w%,q%)
xyptab 153,141:PRINT MID$(city$(truck%(w%,q%,6)),2,12)
xyptab 172,151:WRITE e%
xyptab 172,161:PRINT r%
WINDOW 4
truck%(w%,q%,13)=r%
truck%(w%,q%,8)=truck%(w%,q%,8)-(e%\10)
truck%(w%,q%,14)=1
GOTO expenalty
ttrouble:
IF truck%(w%,q%,18)=3 THEN nopen
pic$="blowout":truck%(w%,q%,18)=3
e%=INT(RND*truck%(w%,q%,7)+1)*30
r%=INT(RND*6+2)
GOSUB flash.truck
GOSUB threscreen
COLOR 2,3
xyptab 49,41:PRINT co.name$(w%)
xyptab 67,51:PRINT tname$(w%,q%)
xyptab 228,141:PRINT r%
xyptab 228,151:PRINT "$"e%*10
WINDOW 4
truck%(w%,q%,13)=r%
truck%(w%,q%,8)=truck%(w%,q%,8)-e%
truck%(w%,q%,14)=1
GOTO expenalty
rgang:
IF truck%(w%,q%,18)=4 THEN nopen
pic$="roadfix":truck%(w%,q%,18)=4
e%=0:r%=INT(RND*12)+1
GOSUB flash.truck
GOSUB threscreen
COLOR 7,6
xyptab 237,133:PRINT r%
xyptab 197,143:PRINT tname$(w%,q%)
WINDOW 4
truck%(w%,q%,13)=r%
truck%(w%,q%,14)=1
expenalty:
GOSUB exscreen
win4%=5:GOTO returnmain
rdam:
IF truck%(w%,q%,18)=5 THEN nopen
truck%(w%,q%,18)=5
pic$="rdam"
r%=INT(RND*9)+1
e%=truck%(w%,q%,7)*100
GOSUB flash.truck
GOSUB threscreen
COLOR 3,4
xyptab 124,107:WRITE r%
xyptab 239,167:WRITE e%
WINDOW 4
truck%(w%,q%,13)=r%
truck%(w%,q%,16)=truck%(w%,q%,16)-INT(RND*5+2)
truck%(w%,q%,14)=1
truck%(w%,q%,8)=truck%(w%,q%,8)-e%\10
GOTO expenalty
nofuel:
MOUSE OFF:TIMER OFF
GOSUB flash.truck
pic$="nofuel":GOSUB threscreen
IF win4%>6 THEN fontset "topaz",8
LOCATE 3,4:COLOR 1,0
xyptab 117,28:PRINT co.name$(w%)
xyptab 117,38:PRINT tname$(w%,q%)
xyptab 200,144:WRITE truck%(w%,q%,7)*125
WINDOW 4
nf:
GOSUB exscreen
IF x%<20 OR x%>84 OR y%>144 OR y%<123 THEN nf
truck%(w%,q%,8)=truck%(w%,q%,8)-(truck%(w%,q%,7)*125)\10
truck%(w%,q%,3)=300
truck%(w%,q%,13)=5
truck%(w%,q%,14)=1
win4%=3
returnmain:
contract%=0
WINDOW(3):GOSUB sc1
IF gostop%=0 THEN TIMER ON:MOUSE ON
RETURN
returnmain1:
WINDOW(3):GOSUB sc1:GOTO waiting
exscreen:
GOSUB checkmouse:GOSUB mousepointer
RETURN
new.truck:
MOUSE OFF:TIMER OFF
GOSUB flash.truck
IF win2%=1 THEN WINDOW OUTPUT 2:GOTO des2
pic$="despatch":win2%=1:GOSUB secscreen
WINDOW OUTPUT 2
fontset "small",7
des2:
no%=tc%:IF no%=0 THEN no%=25
pen%=0:c2%=26:IF w%=1 THEN c2%=27
COLOR 25,18
LINE (76,55)-(170,92),1,bf
LINE (88,93)-(170,132),1,bf
LINE (7,163)-(171,233),18,bf
LINE (38,14)-(80,21),18,bf
LINE (110,14)-(170,21),18,bf
xyptab 36,21:PRINT no%-1": 00"
xyptab 110,21:PRINT day$(day%)
IF truck%(w%,q%,17)=>5500 THEN
truck%(w%,q%,16)=truck%(w%,q%,16)-2
truck%(w%,q%,17)=truck%(w%,q%,17)-5500
END IF
IF truck%(w%,q%,20)>0 THEN pic$="CONTRACT"
IF truck%(w%,q%,20)>0 AND truck%(w%,q%,19)<0 THEN
pen%=(truck%(w%,q%,20)*truck%(w%,q%,19))/10
truck%(w%,q%,8)=truck%(w%,q%,8)+pen%
END IF
money&(w%)=money&(w%)+(truck%(w%,q%,8)*10)
COLOR 25,1
xyptab 76,61: PRINT co.name$(w%)
xyptab 76,71: PRINT tname$(w%,q%)
xyptab 76,81: PRINT MID$(city$(truck%(w%,q%,1)),2,12)
xyptab 76,91: PRINT MID$(cargo$(truck%(w%,q%,9)),2,14)
xyptab 88,101: WRITE truck%(w%,q%,8)*10
xyptab 88,111:WRITE money&(w%)
xyptab 88,121:WRITE truck%(w%,q%,16)
xyptab 84,131:PRINT truck%(w%,q%,3)
fuel%=INT(RND*59)+40
truck%(w%,q%,1)=truck%(w%,q%,6)
OPEN "R",#1,"ram:REQUIRES",243
FIELD #1,27 AS a$,27 AS b$,27 AS c$,27 AS d$,27 AS e$,27 AS F$,27 AS g$,27 AS h$,27 AS i$
GET #1,truck%(w%,q%,1)+1
LOCATE 25,1:COLOR 25,18
PRINT TAB(2)a$:PRINT TAB(2)b$:PRINT TAB(2)c$:PRINT TAB(2)d$:PRINT TAB(2)e$
PRINT TAB(2)F$:PRINT TAB(2)g$:PRINT TAB(2)h$:PRINT TAB(2)i$
CLOSE #1
WINDOW 2
IF pic$="CONTRACT" THEN GOSUB conmessage
a%=INT((RND*20)+10)*truck%(w%,q%,7)
w$=MID$(city$(truck%(w%,q%,6)),2,12)
despatch:
GOSUB mousepointer
x1%=203:x2%=283:y1%=18:ystep%=20:gap%=4:no.but%=5
GOSUB check.b.screen
IF mouseclick%<6 THEN GOSUB buttonpress:GOTO desaction
GOTO despatch
conmessage:
IF truck%(w%,q%,19)<0 THEN del%=truck%(w%,q%,19) ELSE del%=0
GET (99,129)-(257,179),getput%
COLOR 1,c2%
LINE (99,129)-(257,179),25,b
LINE (100,130)-(256,178),c2%,bf
xyptab 105,139:PRINT "SPECIAL CONTRACT RESULT"
xyptab 105,150:PRINT "Time Default"del%
xyptab 105,160:PRINT "Penalty:- $";:WRITE ABS(pen%*10)
xyptab 105,175:PRINT "KEEP ON TRUCKIN PARDNER"
GOSUB checkmouse:GOSUB mousepointer:PUT(99,129),getput%,PSET
pic$="":truck%(w%,q%,19)=0:truck%(w%,q%,20)=0
RETURN
desaction:
ON mouseclick% GOTO layup,refuel,contract,repair,xload
repair:
b%=100-truck%(w%,q%,16)
IF win6%=7 THEN
WINDOW OUTPUT 6
LINE (173,19)-(270,27),2,bf
LINE (173,28)-(213,87),2,bf
WINDOW 6:GOTO re6
END IF
pic$="repair":GOSUB sixscreen
WINDOW OUTPUT 2
PUT (59,140),getput%,PSET
WINDOW 6
re6:
COLOR 31,2
xyptab 173,25:WRITE money&(w%)
xyptab 173,40:WRITE truck%(w%,q%,16)
xyptab 173,55:WRITE a%
xyptab 175,70:WRITE b%
xyptab 173,85:WRITE b%*a%
GOSUB checkmouse
win6%=7
rloop:
GOSUB mousepointer
IF y%>44 AND y%<58 AND x%>216 AND x%<276 THEN rup
IF y%>59 AND y%<75 AND x%>216 AND x%<276 THEN rdo
IF y%>102 AND y%<121 AND x%>48 AND x%<136 THEN okrepair
IF y%>102 AND y%<121 AND x%>177 AND x%<265 THEN norepair
GOTO rloop
okrepair:
t%=b%*a%
IF t%>money&(w%) THEN nmoney
money&(w%)=money&(w%)-t%
IF b%<5 THEN b%=5
truck%(w%,q%,13)=b%*2
truck%(w%,q%,16)=truck%(w%,q%,16)+b%
IF truck%(w%,q%,16)>100 THEN truck%(w%,q%,16)=100
truck%(w%,q%,0)=0:truck%(w%,q%,17)=0
truck%(w%,q%,5)=0
truck%(w%,q%,8)=0
truck%(w%,q%,9)=19
truck%(w%,q%,6)=truck%(w%,q%,1)
truck%(w%,q%,1)=19
truck%(w%,q%,19)=0
truck%(w%,q%,20)=0
GOTO exitdespatch
nmoney:
LINE (15,120)-(295,260),1,bf
LINE (14,119)-(296,261),0,b
COLOR 31,1 :LOCATE 17,1
rfile%=4:GOSUB getrand
money&(w%)=money&(w%)-INT(t%/10)
GOSUB checkmouse
GOSUB mousepointer
y%=186:x%=68:t%=5:win6%=0:GOTO leavelay
norepair:
WINDOW 2:GOSUB checkmouse:GOTO despatch
rdo:
IF b%=5 THEN rloop
b%=b%-1:GOTO reupdate
rup:
IF b%=100-truck%(w%,q%,16) THEN rloop
b%=b%+1
reupdate:
xyptab 175,70:PRINT " "
xyptab 175,70:WRITE b%
xyptab 173,85:PRINT " "
xyptab 173,85:WRITE b%*a%
GOTO rloop
layup:
t%=10:IF win4%=1 THEN WINDOW 4:GOSUB laywrite:GOTO loop4
pic$="layup":GOSUB threscreen
IF win4%>6 THEN fontset "topaz",8
WINDOW 4
win4%=1:contract%=0
loop4:
GOSUB mousepointer
IF y%>164 THEN leavelay
IF y% <130 OR y%> 150 THEN loop4
IF x%> 63 AND x%<149 THEN addtime
IF x%> 201 AND x%<251 THEN deducttime
GOTO loop4
deducttime:
t%=t%-10:IF t%<10 THEN t%=10
GOSUB laywrite:GOSUB checkmouse
GOTO loop4
addtime:
t%=t%+10:IF t%>90 THEN t%=90
GOSUB laywrite:GOSUB checkmouse
GOTO loop4
laywrite:
COLOR 5,1
xyptab 157,141: PRINT " "
xyptab 157,141: WRITE t%
RETURN
leavelay:
IF y%>187 THEN loop4
IF x%>66 AND x%<187 THEN
truck%(w%,q%,13)=t%
truck%(w%,q%,0)=0
truck%(w%,q%,8)=0
truck%(w%,q%,9)=19
truck%(w%,q%,6)=truck%(w%,q%,1)
truck%(w%,q%,1)=19
truck%(w%,q%,5)=0
truck%(w%,q%,19)=0
truck%(w%,q%,20)=0
GOTO returnmain
END IF
GOTO loop4
noload:
GET (196,81)-(298,121),getput%
LINE (197,82)-(297,120),25,bf
LINE (196,81)-(298,121),1,b
COLOR 15,25:LOCATE 13,1
PRINT TAB(26)"You seem a bit"
PRINT TAB(26)"CONFUSED!. You"
PRINT TAB(26)"will need a"
PRINT TAB(26)"CONTRACT before"
PRINT TAB(26)"I can LOAD. !!!!"
GOSUB mousepointer
PUT (196,81),getput%,PSET
GOSUB checkmouse
GOTO despatch
xload:
IF truck%(w%,q%,5)<1 THEN noload
WINDOW OUTPUT 4
IF win4%>6 THEN fontset "topaz",8
speed%=80:t%=speed%:IF truck%(w%,q%,20)<1 THEN truck%(w%,q%,19)=0
IF chsp%=1 THEN t%=truck%(player%,q%,15):c1%=(t%-80)*2:speed%=t%-c1%
kpl!=truck%(w%,q%,4)/80
x1%=47:y1%=90:
win4%=2:COLOR 4,3
pic$="speed":GOSUB threscreen
xyptab 209,35:PRINT co.name$(w%)
xyptab 209,45:PRINT tname$(w%,q%)
xyptab 209,55:PRINT MID$(cargo$(truck%(w%,q%,9)),2,12)
xyptab 209,65:PRINT TAB(27)MID$(city$(truck%(w%,q%,6)),2,12)
xyptab 209,75:PRINT truck%(w%,q%,5)
xyptab 209,85:PRINT truck%(w%,q%,19)
GOSUB speedupdate
xyptab 209,105:PRINT truck%(w%,q%,3)
xyptab 209,125:PRINT truck%(w%,q%,7)
WINDOW 4
GET (47,90)-(71,98),getput%
IF chsp%=1 THEN RETURN
loop3:
GOSUB mousepointer
IF x%<72 THEN speedadjust
IF x%>98 AND x%<177 AND y%<183 AND y%>145 THEN exitspeed
GOTO loop3
speedadjust:
IF y%<60 OR y%>170 THEN loop3
IF y%<y1%-4 THEN y2%=-10:GOTO addjust
IF y%>y1%+14 THEN y2%=10:GOTO addjust
GOTO loop3
addjust:
PUT (x1%,y1%),getput%
y1%=y1%+y2%:PUT (x1%,y1%),getput%
speed%=speed%+y2%:t%=t%-y2%:GOSUB speedupdate
GOTO loop3
speedupdate:
xyptab 218,95:PRINT " "
xyptab 209,95:PRINT INT(truck%(w%,q%,5)/t%)
xyptab 218,115:PRINT " "
xyptab 209,115:PRINT INT(truck%(w%,q%,5)/(speed%*kpl!))
RETURN
exitspeed:
truck%(w%,q%,0)=1
x%=INT(truck%(w%,q%,5)/t%)
y%=INT(truck%(w%,q%,5)/(speed%*kpl!))
truck%(w%,q%,17)=truck%(w%,q%,17)+truck%(w%,q%,5)
truck%(w%,q%,11)=INT(y%/x%)
truck%(w%,q%,5)=x%
truck%(w%,q%,15)=t%
IF chsp%=0 THEN
tmove!(w%,q%,2)=cityx%(truck%(w%,q%,1))
tmove!(w%,q%,3)=cityy%(truck%(w%,q%,1))
END IF
tmove!(w%,q%,4)=cityx%(truck%(w%,q%,6))
tmove!(w%,q%,5)=cityy%(truck%(w%,q%,6))
tmove!(w%,q%,0)=(tmove!(w%,q%,4)-tmove!(w%,q%,2))/x%
tmove!(w%,q%,1)=(tmove!(w%,q%,5)-tmove!(w%,q%,3))/x%
IF chsp%<>0 THEN RETURN
truck%(w%,q%,18)=0
exitdespatch:
contract%=0
GOTO returnmain
refuel:
IF win6%=1 THEN erasefuel
pic$="fuel":GOSUB sixscreen
WINDOW OUTPUT 2
PUT (59,140),getput%,PSET
WINDOW OUTPUT 6
IF win6%>3 THEN fontset "topaz",8
win6%=1
fugo:
stepp#=truck%(w%,q%,2)/109
fillhieght%=truck%(w%,q%,3)/stepp#
COLOR 20,7:xyptab 178,6:PRINT w$
COLOR 31,7:xyptab 179,7:PRINT w$
LINE (230,136)-STEP(-53,-fillhieght%+1),2,bf
COLOR 31,23
xyptab 97,166:WRITE fuel%
xyptab 228,196:WRITE money&(w%)
litres!=0:total!=0:tank!=truck%(w%,q%,3)
range%=tank!*truck%(w%,q%,4)
fillhieght%=136-fillhieght%
GOSUB fuelupdate
WINDOW 6
fueldepot:
GOSUB mousepointer
IF x%<254 OR x%>299 THEN fueldepot
IF y%>74 AND y%<116 THEN exitfuel
IF y%>24 AND y%<66 THEN topup
GOTO fueldepot
topup:
FOR t%=fillhieght% TO 26 STEP-1
LINE (177,t%)-(230,t%),2
litres!=litres!+stepp#
total!=total!+(fuel%*stepp#)
tank!=tank!+stepp#
range%=tank!*truck%(w%,q%,4)
NEXT:fillhieght%=t%
money&(w%)=money&(w%)-INT(total!/100)
IF money&(w%)<0 THEN GOTO xnomoney
GOSUB fuelupdate
truck%(w%,q%,3)=INT(tank!)
xyptab 228,196:PRINT " "
xyptab 228,196:WRITE money&(w%)
GOSUB checkmouse:GOTO exitfuel
erasefuel:
WINDOW OUTPUT 6
COLOR 31,7:xyptab 179,7:PRINT " "
LINE (177,26)-(230,136),11,bf
COLOR 31,23
xyptab 97,166:PRINT " "
xyptab 228,196:PRINT " "
xyptab 97,181:PRINT " "
xyptab 105,196:PRINT " "
xyptab 263,166:PRINT " "
xyptab 263,181:PRINT " "
GOTO fugo
fuelupdate:
COLOR 31,23
xyptab 97,181:WRITE INT(litres!)
xyptab 105,196:WRITE INT(total!/100)
xyptab 263,166:WRITE INT(tank!)
xyptab 263,181:WRITE range%
RETURN
xnomoney:
LINE (50,40)-STEP(220,65),21,b
LINE (51,41)-STEP(218,63),7,bf
LOCATE 7,9:COLOR 20,7
PRINT "SORRY PAL: I wasn't born"
PRINT TAB(9)"yesterday. This is a"
PRINT TAB(9)"Service Station not a"
PRINT TAB(9)"bloody BANK!"
PRINT TAB(9)"Come back when you've"
PRINT TAB(9)"got enough dough."
money&(w%)=money&(w%)+INT(total!/100)
win6%=0
exitfuel:
GOSUB exscreen
GOSUB checkmouse
WINDOW OUTPUT 2
COLOR 25,1
xyptab 88,111: PRINT " "
xyptab 88,111: WRITE money&(w%)
xyptab 84,131:PRINT truck%(w%,q%,3)
WINDOW 2:GOTO despatch
contract:
IF contract%=7 THEN WINDOW 4:GOTO page
WINDOW OUTPUT 4
IF win4%<7 OR win4%>13 THEN fontset "despatch",13
PALETTE 0,.6,.58,.57:PALETTE 1,.6,.58,.57
PALETTE 2,.48,.01,0:PALETTE 3,.77,.77,.77
PALETTE 4,1,1,0:PALETTE 5,.02,.56,0
PALETTE 6,1,1,1:PALETTE 7,0,0,1
win4%=7:contract%=7:diff!=(246-finishy%)/2:h!=(RND*1.5)+1:dp%=INT(RND*10)
desgo:
COLOR 0,0:CLS
LOCATE 1,1:COLOR 3,2
randy%=INT(RND*12)
FOR t%=0 TO randy%
go:
double%=0:cargo%=INT(RND*19)
FOR tt%=0 TO t%
IF ABS(cargo%(tt%))=cargo% THEN double%=1
NEXT
ON double% GOTO go
e%=INT(RND*19)
IF e%=cargo% THEN cargo%=-cargo%
cargo%(t%)=cargo%
PRINT TAB(16)cargo$(ABS(cargo%(t%)))
NEXT
destination%=t%
x%=10:IF truck%(w%,q%,1)=9 THEN x%=5
LOCATE 1,1
randy%=INT(RND*x%)
FOR t%=0 TO randy%
goo:
double%=0
cargo%=INT(RND*19)
IF dist%(truck%(w%,q%,1),cargo%)=0 THEN goo
FOR tt%=0 TO t%
IF city%(tt%)=cargo% THEN double%=1
NEXT
ON double% GOTO goo
distt%(t%)=dist%(truck%(w%,q%,1),cargo%)
city%(t%)=cargo%
PRINT city$(cargo%)
NEXT:GOSUB setcargo
cargo%=t%
LOCATE 15,17:COLOR 6,7
PRINT "( OK )"TAB(24)"(CANCEL)";
mouseclick%=1:randy%=0
GOSUB klm
st1%=0:GOSUB rl
st2%=0:GOSUB rr
page:
WINDOW 4
GOSUB mousepointer
IF y%>181 AND x%>161 THEN okcancel
IF x%>146 THEN right
x1%=0:x2%=139:y1%=0:ystep%=13:gap%=2:no.but%=cargo%
GOSUB check.b.screen
IF mouseclick%<cargo%+1 THEN GOSUB reverseleft
GOTO page
right:
x1%=150:x2%=309:y1%=0:ystep%=13:gap%=2:no.but%=destination%
GOSUB check.b.screen
IF mouseclick%<destination%+1 THEN
randy%=mouseclick%-1
GOSUB reverseright
GOSUB cargoprice
END IF
GOTO page
okcancel:
IF x%<221 AND y%<196 THEN
truck%(w%,q%,5)=klm%
truck%(w%,q%,8)=INT(t&/10)
truck%(w%,q%,9)=ABS(cargo%(randy%))
truck%(w%,q%,19)=del%
truck%(w%,q%,20)=pen%
WINDOW 2:GOTO despatch
END IF
IF x%>232 AND x%<312 AND y%<196 THEN WINDOW 2:GOTO despatch
GOTO page
reverseleft:
IF st%=st1% THEN RETURN
GOSUB rl
st1%=st%
GOSUB rl
GOTO klm
rl:
AREA (0,st1%):AREA STEP (139,0)
AREA STEP (0,12):AREA STEP (-139,0)
AREAFILL 1
RETURN
reverseright:
IF st%=st2% THEN BEEP:RETURN
GOSUB rr
st2%=st%
rr:
AREA (150,st2%):AREA STEP (159,0)
AREA STEP (0,12):AREA STEP (-159,0)
AREAFILL 1
RETURN
klm:
truck%(w%,q%,6)=city%(mouseclick%-1)
klm%=distt%(mouseclick%-1)
LOCATE 11,8:COLOR 4,7
PRINT "````":LOCATE 11,8:WRITE klm%
cargoprice:
del%=0:pen%=0
t&=truck%(w%,q%,7)*(klm% * (cargorates!(ABS(cargo%(randy%))))*diff!)
IF cargo%(randy%)<0 AND week%>3 THEN
t&=t&*h!
del%=klm%/80+dp%
pen%=(t&/del%)*2
END IF
COLOR 6,2:LOCATE 12,8
PRINT "``````";:LOCATE 12,8: WRITE t&
PRINT TAB(10)"```";:LOCATE 13,10:WRITE del%
PRINT TAB(10)"````";:LOCATE 14,10:WRITE pen%
GOTO checkmouse
setcargo:
LOCATE 11,1:COLOR 4,7
LINE (0,130)-(139,142),7,bf
PRINT "klm{:`"
COLOR 6,2:LOCATE 12,1
LINE (0,143)-(139,184),2,bf
PRINT TAB(1)"rate:`$"
PRINT TAB(1)"del:hrs:"
PRINT TAB(1)"penalty{$"
RETURN
simulated.time:
IF gostop%<>0 THEN RETURN
COLOR 10,3
IF tc%=24 THEN GOSUB addday
xyptab 5+am%,197:WRITE tc%
tc%=tc%+1:IF tc%>9 THEN am%=0
IF shares%(0,0)>0 THEN shares%(0,0)=shares%(0,0)-1
IF shares%(1,0)>0 THEN shares%(1,0)=shares%(1,0)-1
IF tract%(0,0)>0 THEN tract%(0,0)=tract%(0,0)-1
IF tract%(1,0)>0 THEN tract%(1,0)=tract%(1,0)-1
RETURN
addday:
tc%=0:am%=8
day%=day%+1:IF day%=7 THEN GOSUB addweek
xyptab 64,197:PRINT day$(day%)
xyptab 5,197:PRINT " "
RETURN
addweek:
week%=week%+1:day%=0
IF week%=53 THEN week%=1
xyptab 186,197:WRITE week%
FOR t%=0 TO 1
IF morg&(t%,5)>0 THEN GOSUB paymorg
NEXT
IF week% => duration%+1 THEN gflag%=1:GOTO gameend
RETURN
market:
COLOR 5,10
r%=INT(RND*20)
r%=r%-10
finishy%=starty%+r%
IF finishy%>245 THEN finishy%=245
IF finishy%<196 THEN finishy%=196
SCROLL (224,196)-(304,245),-3,0
LINE(startx%-3,starty%)-(startx%,finishy%),5
starty%=finishy%:COLOR 10,3
RETURN
sc1:
x1%=217:x2%=311:y1%=11:ystep%=39:gap%=3:no.but%=4
RETURN
interuptmouse:
g%=MOUSE(0)
x%=MOUSE(1):y%=MOUSE(2)
IF x%>217 AND x%<310 AND y%>132 AND y%<163 THEN
GOSUB fillstart:GOTO st.stop
END IF
RETURN
st.stop:
MOUSE OFF:TIMER OFF
BEEP
gostop%=1:GOSUB menuset
diff%=220-finishy%
RETURN
waiting:
GOSUB mousepointer
IF x%>x1% AND x%<x2% THEN GOSUB checkpointer:GOTO action
GOTO waiting
fillstart:
AREA (217,129):AREA (311,129)
AREA (311,164):AREA (217,164)
AREAFILL 1
GOTO checkmouse
player:
OBJECT.OFF
GET (142,72)-(260,136),getput%
LINE (142,72)-STEP(118,48),5,b
LINE (143,73)-STEP(116,22),24,bf
LINE (143,96)-STEP(117,0),5
LINE (143,97)-STEP(116,22),25,bf
LINE (142,120)-STEP(118,16),5,b
LINE (143,121)-STEP(116,14),10,bf
COLOR 26,24:LOCATE 11,19
PRINT "Co. "co.name$(0)
PRINT :PRINT:COLOR 26,25
PRINT TAB(19)"Co. "co.name$(1)
COLOR 9,10:xyptab 145,131
PRINT "OOPS! Boo-Boo!"
loopy:
GOSUB mousepointer
IF x%<142 OR x%>260 THEN loopy
IF y%>72 AND y%<94 THEN player%=0:GOTO out
IF y%>97 AND y%<120 THEN player%=1:GOTO out
IF y%>120 AND y%<137 THEN player%=-1:GOTO out
GOTO loopy
out:
PUT (142,72),getput%,PSET
OBJECT.ON
GOSUB checkmouse
RETURN
action:
ON mouseclick% GOTO bank,tdept,salesyard,s.go,loop
GOTO finish
bank:
GOSUB buttonpress:GOSUB player
IF player%=-1 THEN waiting
IF shval%<>diff% THEN GOSUB sprices
shval%=diff%
IF win6%=2 THEN WINDOW(6):GOTO bankscreen
pic$="bank":win6%=2
GOSUB sixscreen
WINDOW OUTPUT 3
PUT (59,140),getput%,PSET
WINDOW 6
GOTO bankscreen
tdept:
GOSUB buttonpress:GOSUB player
IF player%=-1 THEN waiting
IF win6%=3 THEN WINDOW(6):GOTO officescreen
pic$="office":win6%=3
GOSUB sixscreen
WINDOW OUTPUT 3
PUT (59,140),getput%,PSET
WINDOW 6
GOTO officescreen
salesyard:
GOSUB buttonpress:GOSUB player
IF player%=-1 THEN waiting
IF win2%=2 THEN WINDOW(2):GOTO salescreen
pic$="sales":win2%=2
GOSUB secscreen
GOTO salescreen
secscreen:
GOSUB message
WINDOW OUTPUT 2
cblocks%=4:colours&=32:bytes&=10240
GOSUB loadscreen
WINDOW OUTPUT 3
PUT (59,140),getput%,PSET
RETURN
sixscreen:
GOSUB message
WINDOW OUTPUT 6
cblocks%=4:colours&=32:bytes&=10240
GOSUB loadscreen
RETURN
threscreen:
WINDOW OUTPUT 4
cblocks%=2:colours&=8:bytes&=8000
GOSUB loadscreen
RETURN
s.go:
GOSUB fillstart
gostop%=0
GOSUB menuset
ON MOUSE GOSUB interuptmouse
ON TIMER(1) GOSUB market
MOUSE ON:TIMER ON
GOTO loop
message:
GET (59,140)-STEP(88,32),getput%
LINE (59,140)-STEP(88,32),5,b
LINE (60,141)-STEP(86,30),20,bf
COLOR 1,20
xyptab 68,153: PRINT " LOADING "
xyptab 64,165: PRINT "NEW SCREEN"
RETURN
reverseblock:
gg%=x2%-x1%:gb%=x1%-x2%
AREA (x1%,st%):AREA STEP (gg%,0)
AREA STEP (0,ystep%-gap%):AREA STEP (gb%,0)
AREAFILL 1
RETURN
buttonpress:
GOSUB reverseblock:GOSUB checkmouse:GOTO reverseblock
loadscreen:
b&=AllocMem&(64,65537&)
IF b&=0 THEN ERROR 7
file$="screens:"+pic$+CHR$(0)
h&=xOpen&(SADD(file$),1005)
viewport&=PEEKL(WINDOW(7)+46)+44
CALL LoadRGB4(viewport&,b&,colours&)
FOR i%=0 TO cblocks%
ad&=PEEKL(PEEKL(WINDOW(8)+4)+8+4*i%)
r&=xRead&(h&,ad&,bytes&)
NEXT
r&=xRead&(h&,b&,64)
CALL xClose(h&)
CALL LoadRGB4(viewport&,b&,colours&)
CALL FreeMem(b&,64)
RETURN
finish:
MENU RESET
LIBRARY CLOSE
TIMER STOP:MOUSE OFF
OBJECT.CLOSE
WINDOW CLOSE 6
WINDOW CLOSE 5
WINDOW CLOSE 2
WINDOW CLOSE 3
WINDOW CLOSE 4
SCREEN CLOSE 4
SCREEN CLOSE 2
SCREEN CLOSE 3
SCREEN CLOSE 1
WINDOW 1,"OK",(0,0)-(600,30),0,-1
CHDIR "DF0:"
END
salescreen:
WINDOW 2
x1%=116:x2%=206:y1%=38:ystep%=20:gap%=4:no.but%=4
GOSUB mousepointer
IF y%>14 AND x%<92 AND y%<42 THEN WINDOW(3):GOSUB sc1:GOTO waiting
GOSUB check.b.screen
IF mouseclick%<5 THEN
GOSUB buttonpress
IF day%=6 THEN sunday
IF tc%<8 OR tc%>22 THEN yardclosed
IF tract%(player%,0)>0 THEN ttime
ON mouseclick% GOTO newtrucks,owner1,owner2,selltrucks
END IF
GOTO salescreen
newtrucks:
IF win6%=4 THEN sixok
pic$="1owner":GOSUB sixscreen:ttype%=0:win6%=4:GOTO buytrucks
owner1:
IF win6%=5 THEN sixok
pic$="1owner":GOSUB sixscreen:ttype%=2:win6%=5:GOTO buytrucks
owner2:
IF win6%=6 THEN sixok
pic$="2hand":GOSUB sixscreen:ttype%=4:win6%=6:GOTO buytrucks
sixok:
e%=55:WINDOW OUTPUT 6:GOTO buytrucks
bs:
DATA 70,141,100,19,5,3
bs1:
DATA 164,235,100,19,5,3
bankscreen:
GOSUB exscreen
IF x%>124 AND y%>180 AND x%<184 AND y%<200 THEN
WINDOW(3):GOSUB sc1:GOTO waiting
END IF
IF x% <160 THEN RESTORE bs ELSE RESTORE bs1
READ x1%,x2%,y1%,ystep%,gap%,no.but%
GOSUB check.b.screen
IF mouseclick%<4 THEN GOSUB buttonpress:GOTO bankaction
GOTO bankscreen
bankaction:
GOSUB message
IF x%>160 THEN mouseclick%=mouseclick%+3
ON mouseclick% GOTO p.mortgage,plas,bbuyshares,omorg,balance,ssellshares
officescreen:
GOSUB exscreen
IF x%<186 AND x%>129 AND y%<47 AND y%>17 THEN returnmain1
IF y%<11 OR y%>53 THEN officescreen
IF x%<120 AND x%>4 THEN speeding
IF x%>193 AND x%<310 THEN find
GOTO officescreen
checkpointer:
mouseclick%=0
FOR tt%=y1% TO y1%+(no.but%*ystep%) STEP ystep%
mouseclick%=mouseclick%+1
IF y%>tt% AND y%<tt%+(ystep%-gap%) THEN st%=tt%:tt%=y1%+(no.but%*ystep%)
NEXT
RETURN
check.b.screen:
IF x%>x1% AND x%<x2% THEN GOTO checkpointer
mouseclick%=50
RETURN
buytrucks:
IF e%<>55 THEN
WINDOW OUTPUT 2
PUT (59,140),getput%,PSET
WINDOW OUTPUT 6
END IF
GOSUB truprice:COLOR 1,23
IF ttype%=0 THEN
GET (125,20)-STEP(88,34),getput%
LINE (125,20)-STEP(88,34),5,b
LINE (126,21)-STEP(86,32),20,bf
COLOR 1,20
GET (87,141)-STEP(123,32),getput%
LINE (87,141)-STEP(123,32),5,b
LINE (88,142)-STEP(121,30),20,bf
COLOR 1,20
LOCATE 4,18:PRINT "MACK D500"
LOCATE 19,12:PRINT "WHITE ROAD BOSS"
END IF
LOCATE 6,18:PRINT "$"truck&(0)
LOCATE 21,16:PRINT "$"truck&(1)
COLOR 31,21
xyptab 227,155: PRINT co.name$(player%)
rfile%=mouseclick%:e%=0
ccc:
COLOR 5,21
xyptab 236,170: PRINT " "
xyptab 236,170: WRITE money&(player%)
tchoice%=0
WINDOW 6
cccc:
GOSUB mousepointer
IF x%<213 AND y%<126 THEN mack
IF x%<213 AND y%>125 THEN toyo
IF x%>238 AND y%<114 THEN xbuttons
GOTO cccc
xbuttons:
x1%=236:x2%=287:y1%=29:ystep%=34:gap%=18:no.but%=3
GOSUB check.b.screen
IF mouseclick%<4 THEN GOSUB buttonpress:GOTO taction
GOTO cccc
taction:
ON mouseclick% GOTO getname,tinfo,exxit
tinfo:
IF tchoice%=0 THEN cccc
GOTO info2
mack:
IF tchoice%=2 THEN toyo
x1%=135:x2%=209:ystep%=23:gap%=0:st%=26
sh%=135:blocky%=209:randy%=23:batchs%=26
IF ttype%=0 THEN x1%=125:x2%=213:sh%=125:blocky%=213:ystep%=33:st%=21
GOSUB reverseblock
IF tchoice%<>0 THEN tchoice%=0 ELSE tchoice%=1
GOSUB checkmouse
ON tchoice% GOTO cccc
GOTO cccc
toyo:
IF tchoice%=1 THEN mack
x1%=96:x2%=209:ystep%=27:gap%=0:st%=145
sh%=96:blocky%=209:randy%=27:batchs%=145
IF ttype%=0 THEN x1%=87:sh%=87:ystep%=33:st%=140
GOSUB reverseblock
IF tchoice%<>0 THEN tchoice%=0 ELSE tchoice%=2
GOSUB checkmouse
ON tchoice% GOTO cccc,cccc
GOTO cccc
trucks5:
rfile%=5:GOSUB getrand
WINDOW 4:GOSUB checkmouse:GOSUB mousepointer
GOTO gb
getname:
IF tchoice%=0 THEN cccc
WINDOW OUTPUT 4
IF win4%<>14 THEN fontset "t.sales",8
PALETTE 0, .41,.41,.41
PALETTE 1, .41,.41,.41
PALETTE 2, 1,1,1
PALETTE 3, 0,0,0
PALETTE 4, 0,0,1
PALETTE 5, .69,.37,.07
PALETTE 6, .73,0,0
PALETTE 7, .35,.16,.6
COLOR 0,0:CLS:win4%=14
LINE (30,10)-STEP(240,137),5,bf
LINE (271,11)-(271,148),3
LINE (270,148)-(31,148),3
COLOR 3,5:LOCATE 3,1
IF tcount%(player%)=5 THEN trucks5
GOSUB getrand
PRINT:PRINT TAB(22)"%"
LINE (158,44)-STEP(106,15),7,bf
LINE (140,124)-STEP(23,15),7,bf
COLOR 6,2:LOCATE 20,11
PRINT " CLICK IN NAME BOX ";
WINDOW 4
GOSUB mousepointer
y%=7:x%=21:c1%=2:c2%=7:lo%=32:hi%=90:maxlen%=12
GOSUB gtname
IF w$="" THEN gb
tname$(player%,tcount%(player%))=w$
x%=19:y%=17:lo%=48:hi%=57:maxlen%=2
GOSUB gtname
fuel%=VAL(w$)
IF fuel%+deposit%>100 THEN
fuel%=100-deposit%
END IF
mgage%=fuel%+deposit%
tcost&=(truck&(tchoice%-1)/100)*mgage%
IF tcost&>money&(player%) THEN
c1%=4:c2%=6:c3%=tchoice%
tchoice%=7-ttype%:GOTO ext
END IF
RESTORE truckspecs
FOR t%=1 TO tchoice%+ttype%
READ b%,c%,d%,a%
NEXT
IF truck&(tchoice%-1)-tcost&>0 THEN morg&(player%,5)=morg&(player%,5)+1
morg&(player%,tcount%(player%))=truck&(tchoice%-1)-tcost&
truck%(player%,tcount%(player%),0)=-5
truck%(player%,tcount%(player%),1)=homeport%(player%)
truck%(player%,tcount%(player%),6)=homeport%(player%)
truck%(player%,tcount%(player%),2)=b%
truck%(player%,tcount%(player%),3)=INT(RND*b%)+1
truck%(player%,tcount%(player%),4)=d%
truck%(player%,tcount%(player%),7)=c%
truck%(player%,tcount%(player%),9)=19
truck%(player%,tcount%(player%),10)=tchoice%+ttype%
truck%(player%,tcount%(player%),12)=tcount%(player%)+1
truck%(player%,tcount%(player%),16)=a%
truck%(player%,tcount%(player%),17)=0
tract%(player%,0)=12
IF player%=1 THEN
truck%(player%,tcount%(player%),12)=tcount%(player%)+6
END IF
money&(player%)=money&(player%)-tcost&
WINDOW OUTPUT 3
OBJECT.SHAPE truck%(player%,tcount%(player%),12),sprite$(player%)
OBJECT.X truck%(player%,tcount%(player%),12),cityx%(homeport%(player%))
OBJECT.Y truck%(player%,tcount%(player%),12),cityy%(homeport%(player%))
tmove!(player%,tcount%(player%),2)=cityx%(homeport%(player%))
tmove!(player%,tcount%(player%),3)=cityy%(homeport%(player%))
WINDOW 4
tcount%(player%)=tcount%(player%)+1
c1%=6:c2%=4
ext:
LINE (53,20)-STEP(200,68),c2%,bf
LINE (254,21)-(254,89),3
LINE (253,89)-(54,89),3
COLOR 2,c2%:LOCATE 4,13
PRINT "CONGRATULATIONS"
PRINT
GOSUB comment
cc:
LINE (134,65)-STEP(40,20),c1%,bf
LINE (175,66)-(175,86),3
LINE (174,86)-(135,86),3
COLOR 3,c1%:LOCATE 10,19:PRINT "OK"
IF tchoice%+ttype%=7 THEN
tcost&=(truck&(c3%-1)/100)*2
money&(player%)=money&(player%)-tcost&
tchoice%=c3%
tname$(player%,tcount%(player%))=""
END IF
GOSUB exscreen:GOTO exxit
rblock:
add%= WINDOW(0)
x1%=sh%:x2%=blocky%:ystep%=randy%:gap%=0:st%=batchs%
WINDOW OUTPUT 6:GOSUB reverseblock
WINDOW add%:RETURN
gb:
WINDOW 6:GOSUB checkmouse:GOTO cccc
truckspecs:
DATA 1500,35,5,99
DATA 1350,30,5,99
DATA 1300,25,5,80
DATA 950,20,5,80
DATA 850,15,4,60
DATA 550,8,5,60
info2:
WINDOW OUTPUT 4
IF win4%<>14 THEN fontset "t.sales",8
win4%=14
PALETTE 0,.39,.39,.39
PALETTE 1,.39,.39,.39
PALETTE 2,0,0,0
PALETTE 3,1,1,1
COLOR 0,0:CLS
LINE (15,20)-(295,130),2,b
COLOR 3,0 :LOCATE 4,1
GOSUB t.info
WINDOW 4
GOSUB checkmouse:GOSUB mousepointer
GOTO gb
exxit:
IF tchoice% <>0 THEN GOSUB rblock
WINDOW 2:GOSUB checkmouse:GOTO salescreen
truckdata:
DATA 200000,145000,40,75000,45000,50,18000,8000,80
truprice:
RESTORE truckdata
FOR t%=1 TO mouseclick%
READ truck1&,truck2&,deposit%
NEXT
truck&(0)=truck1&+((truck1&/100)*diff%)
truck&(1)=truck2&+((truck2&/100)*diff%)
RETURN
getrand:
OPEN "R",#1,"ram:TRUCKIN.ON.",196
FIELD #1,28 AS a$,28 AS b$,28 AS c$,28 AS d$,28 AS e$,28 AS F$,28 AS g$
GET #1,rfile%
PRINT TAB(6) a$:PRINT
PRINT TAB(6) b$:PRINT
PRINT TAB(6) c$:PRINT
PRINT TAB(6) d$:PRINT
PRINT TAB(6) e$:PRINT
PRINT TAB(6) F$:PRINT
PRINT TAB(6) g$:PRINT
CLOSE#1
RETURN
comment:
OPEN "R",#1,"ram:1MEGABYTE",48
FIELD #1,24 AS a$,24 AS b$
GET #1,tchoice%+ttype%
PRINT TAB(8) a$
PRINT TAB(8) b$
CLOSE #1:RETURN
t.info:
OPEN "R",#1,"ram:OF.MEMORY",275
FIELD #1,33 AS a$,33 AS b$,33 AS c$,33 AS d$,33 AS e$,22 AS F$,22 AS g$,22 AS h$,22 AS i$,22 AS j$
GET #1,tchoice%+ttype%
PRINT TAB(4)a$
PRINT
PRINT TAB(4)b$
PRINT TAB(4)c$
PRINT TAB(4)d$
PRINT
PRINT TAB(4)e$
PRINT
PRINT TAB(4)F$
PRINT TAB(4)g$
PRINT TAB(4)h$
PRINT TAB(4)i$
PRINT TAB(4)j$
CLOSE #1:RETURN
selltrucks:
WINDOW OUTPUT 4
IF win4%<>15 THEN fontset "selltruck",13
PALETTE 0, 0,0,0
PALETTE 1, 1,0,0
PALETTE 2, 0,0,1
PALETTE 3, .5,.5,.5
PALETTE 4, 1,1,0
PALETTE 5, 0,1,1
PALETTE 6, 1,0,1
PALETTE 7, 1,1,1
COLOR 0,0:CLS:win4%=15
IF diff%<-5 THEN a$="(VERY POOR)":GOTO sss
IF diff%<10 THEN a$="(ONLY FAIR)":GOTO sss
IF diff%>9 THEN a$="(DESPERATE)"
sss:
COLOR 7,2:PRINT "( TRUCK DEMAND )";
COLOR 2,7:PRINT TAB(20)a$
COLOR 7,3:PRINT :PRINT "(TRUCK NAME)"TAB(16)"(M/GE)"TAB(25)"(VALUE)"
COLOR 2,4:LOCATE 15,3
PRINT "(SELL RIG)"TAB(19)"(KEEP RIG)";
COLOR 5-player%,player%+1
LOCATE 5,1:x%=0:randy%=0
FOR t%=0 TO 4
y%=LEN(tname$(player%,t%))
IF y%>0 THEN GOSUB nprint ELSE t%=4
x%=x%+1:y%=0
NEXT:tchoice%=52+(13*x%)
WINDOW 4
x1%=0:x2%=139:y1%=53:ystep%=13:gap%=1:no.but%=x%
ctruck:
GOSUB exscreen
IF y%>tchoice% AND y%<182 THEN ctruck
IF y%>182 THEN kbutt
GOSUB check.b.screen
IF mouseclick%<=no.but% THEN chooserig
GOTO ctruck
chooserig:
IF randy%=mouseclick% THEN
st%=39+(13*randy%):GOSUB reverseblock:randy%=0:GOTO ctruck
END IF
IF randy%<>0 THEN st%=39+(13*randy%):GOSUB reverseblock
st%=39+(13*mouseclick%):GOSUB reverseblock
randy%=mouseclick%
GOTO ctruck
outy:
WINDOW 2:GOTO salescreen
nprint:
PRINT "("tname$(player%,t%)STRING$(12-y%," ")")";
a$=STR$(morg&(player%,t%))
y%=LEN(a$):a$=MID$(a$,2,y%-1)
PRINT TAB(15)"("a$")";
GOSUB calprice
a$=STR$(truck&)
y%=LEN(a$):a$=MID$(a$,2,y%-1)
PRINT TAB(24)"("a$")"
RETURN
calprice:
y%=truck%(player%,t%,10)
truck&(1)=((trprice%(y%)*1000)+((trprice%(y%)*10)*diff%))
truck&(1)=truck&(1)-(truck&(1)/15)
truck&(0)=truck&(1)/100
truck&=truck&(0)*truck%(player%,t%,16)
RETURN
kbutt:
IF x%>179 AND x%<281 THEN outy
IF x%>20 AND x%<193 THEN struck
GOTO ctruck
struck:
IF randy%=0 THEN BEEP:GOTO ctruck
t%=mouseclick%-1
GOSUB calprice
truck&=truck&-morg&(player%,t%)
IF morg&(player%,t%)>0 THEN morg&(player%,5)=morg&(player%,5)-1
LOCATE 13,1:COLOR 0,4
PRINT "( YOU COLLECT ) $";
WRITE truck&
WINDOW OUTPUT 3:
randy%=truck%(player%,tcount%(player%)-1,12)
money&(player%)=money&(player%)+truck&
FOR x%=t% TO tcount%(player%)-1
morg&(player%,x%)=morg&(player%,x%+1)
tname$(player%,x%)=tname$(player%,x%+1)
FOR y%=0 TO 20
truck%(player%,x%,y%)=truck%(player%,x%+1,y%)
NEXT y%
FOR y%=0 TO 5
tmove!(player%,x%,y%)=tmove!(player%,x%+1,y%)
NEXT y%
NEXT x%
tcount%(player%)=tcount%(player%)-1
tract%(player%,0)=12
y%=0:IF player%=1 THEN y%=5
FOR x%=1 TO 5:truck%(player%,x%-1,12)=x%+y%:NEXT
IF tcount%(player%)>0 THEN
FOR x%=t% TO tcount%(player%)-1
OBJECT.X truck%(player%,x%,12),tmove!(player%,x%,2)
OBJECT.Y truck%(player%,x%,12),tmove!(player%,x%,3)
NEXT
END IF
OBJECT.CLOSE randy%
GOSUB exscreen
GOTO outy
gameend:
MOUSE OFF:TIMER OFF
OBJECT.OFF
GET (142,72)-(280,119),getput%
LINE (142,72)-(280,119),10,b
LINE (143,73)-(279,118),24,bf
COLOR 5,24:LOCATE 11,20
PRINT "TIME'S EXPIRED"
PRINT TAB(20)"MY FRIENDS."
PRINT TAB(20)"CHECK BANK FOR"
PRINT TAB(20)"THE VICTOR."
IF gostop%=0 THEN GOSUB fillstart
GOSUB st.stop
GOSUB checkmouse
GOSUB mousepointer
PUT (142,72),getput%,PSET
OBJECT.ON
RETURN
paymorg:
MOUSE OFF:TIMER OFF
GOSUB msquare
WINDOW OUTPUT 4
IF win4%>6 THEN fontset "topaz",8
pic$="morg":GOSUB threscreen
WINDOW OUTPUT 3
PUT (142,72),getput%,PSET
WINDOW 4:COLOR 5-t%,1
xyptab 114,69:PRINT co.name$(t%)
y%=102:truck&=0
FOR randy%=0 TO tcount%(t%)-1
xyptab 38,y%:PRINT tname$(t%,randy%)
xyptab 144,y%:PRINT morg&(t%,randy%)
truck&=truck&+(morg&(t%,randy%)/100)*8
xyptab 222,y%:PRINT INT((morg&(t%,randy%)/100)*8)
y%=y%+14
NEXT
xyptab 234,172:WRITE truck&
money&(t%)=money&(t%)-truck&
win4%=5
GOSUB exscreen
WINDOW(3):GOSUB sc1:OBJECT.ON
IF gostop%=0 THEN TIMER ON:MOUSE ON
COLOR 10,3
RETURN
msquare:
OBJECT.OFF
GET (142,72)-(280,119),getput%
LINE (142,72)-(280,119),10,b
LINE (143,73)-(279,118),24+t%,bf
COLOR 26,24+t%:LOCATE 11,20
PRINT "Co. "co.name$(t%)
PRINT
PRINT TAB(20)"WEEKLY MORTGAGE"
PRINT TAB(20)"IS NOW DUE!."
RETURN
sharetime:
GOSUB noen
GET (85,72)-(223,119),getput%
LINE (85,72)-(223,119),2,b
LINE (86,73)-(222,118),5,bf
COLOR 0,5:LOCATE 11,13
PRINT "12 Hours. must"
PRINT TAB(13)" ELAPSE before"
PRINT TAB(13)"entry to market"
PRINT TAB(13)"is granted!. OK"
GOTO noshareboy
noshareboy:
GOSUB exscreen
PUT (85,72),getput%,PSET
GOTO bankscreen
shareclosed:
GOSUB noen
GET (85,72)-(223,119),getput%
LINE (85,72)-(223,119),3,b
LINE (86,73)-(222,118),0,bf
COLOR 31,0:LOCATE 11,13
PRINT "The Stockmarket"
PRINT TAB(13)"opens at 7 AM. "
PRINT TAB(13)"and closes 5 PM"
PRINT TAB(13)"See you then OK"
GOTO noshareboy
sunshare:
GOSUB noen
GET (85,72)-(223,119),getput%
LINE (85,72)-(223,119),0,b
LINE (86,73)-(222,118),16,bf
COLOR 3,16:LOCATE 11,13
PRINT "The Stockmarket"
PRINT TAB(13)"don't open on"
PRINT TAB(13)"the SABBATH."
PRINT TAB(13)"Come back later"
GOTO noshareboy
noyard:
GOSUB exscreen
PUT (85,72),getput%,PSET
GOTO salescreen
yardclosed:
GOSUB setfonty
LINE (86,73)-(222,118),21,bf
COLOR 31,21:LOCATE 11,13
PRINT "Our operating"
PRINT TAB(13)"hours are from"
PRINT TAB(13)"7 AM to 9 PM. "
PRINT TAB(13)"To bad ah!."
GOTO noyard
ttime:
GOSUB setfonty
LINE (86,73)-(222,118),1,bf
COLOR 19,1:LOCATE 11,13
PRINT "We'll only serve"
PRINT TAB(13)"one customer at"
PRINT TAB(13)"a time. You've"
PRINT TAB(13)"been in today."
GOTO noyard
sunday:
GOSUB setfonty
LINE (86,73)-(222,118),16,bf
COLOR 6,16:LOCATE 11,13
PRINT "This yard isn't"
PRINT TAB(13)"allowed to open"
PRINT TAB(13)"on SUNDAY come"
PRINT TAB(13)"back tomorrow."
GOTO noyard
setfonty:
IF win2%<>3 THEN fontset "topaz",8
win2%=3:GET (85,72)-(223,119),getput%
LINE (85,72)-(223,119),0,b
RETURN
win4ok:
WINDOW OUTPUT 6:PUT (59,140),getput%,PSET
WINDOW 4:RETURN
noen:
PUT (59,140),getput%,PSET:RETURN
p.mortgage:
WINDOW OUTPUT 4
IF win4%<15 THEN fontset "selltruck",13
PALETTE 0, 0,0,0
PALETTE 1, 1,0,0
PALETTE 2, 0,0,1
PALETTE 3, .5,.5,.5
PALETTE 4, 1,1,0
PALETTE 5, 0,1,1
PALETTE 6, 1,0,1
PALETTE 7, 1,1,1
COLOR 0,0:CLS:win4%=16
COLOR 1+player%,7:LOCATE 2,2
PRINT "(AUST.BANK PAY MORTGAGE DEPT)"
COLOR 7,1+player%
PRINT :PRINT "("co.name$(player%)")"TAB(13)"(CAPITAL)$ )";
LOCATE 4,23:WRITE money&(player%)
COLOR 5-player%,player%+1
LOCATE 7,1:x%=0:randy%=0
FOR t%=0 TO 4
y%=LEN(tname$(player%,t%))
IF y%>0 THEN
PRINT "("tname$(player%,t%)STRING$(12-y%," ")")"
x%=x%+1
ELSE
t%=4
END IF
NEXT
LOCATE 14,2:COLOR 2,5
PRINT "( SEE YA LATER )"
LOCATE 6,17:COLOR 7,player%+1
PRINT "(AMOUNT OWING)"
PRINT TAB(17)"(ON THIS RIG )"
PRINT TAB(17)"(IS.$ )"
PRINT TAB(17)"(I'LL PAYOFF )"
COLOR 5,2
PRINT TAB(17)"(100%#50%#25%)"
GOSUB win4ok
x1%=0:x2%=139:y1%=79:ystep%=13:gap%=1:no.but%=x%
ptruck:
GOSUB exscreen
IF y%>169 AND y%<185 AND x%>11 AND x%<170 THEN WINDOW 6:GOTO bankscreen
IF x%>162 THEN ppmm
GOSUB check.b.screen
IF mouseclick%<=no.but% THEN chooserigg
GOTO ptruck
chooserigg:
IF randy%=mouseclick% THEN
st%=65+(13*randy%):GOSUB reverseblock:randy%=0
LOCATE 8,22:PRINT " "
GOTO ptruck
END IF
IF randy%<>0 THEN st%=65+(13*randy%):GOSUB reverseblock
st%=65+(13*mouseclick%):GOSUB reverseblock
randy%=mouseclick%
chrig:
COLOR 7,player%+1
LOCATE 8,22:PRINT " "
LOCATE 8,22:WRITE morg&(player%,randy%-1)
GOTO ptruck
ppmm:
IF y% <118 OR y%>130 OR x%>301 THEN ptruck
IF x%<221 THEN e%=100: GOTO payee
IF x%<261 THEN e%=50:GOTO payee
e%=25
payee:
truck#=morg&(player%,randy%-1)/100
morg&(player%,randy%-1)=morg&(player%,randy%-1)-truck#*e%
money&(player%)=money&(player%)-((truck#*e%)+(2*truck#))
COLOR 7,1+player%
LOCATE 4,23:PRINT " "
LOCATE 4,23:WRITE money&(player%)
IF morg&(player%,randy%-1)=0 THEN morg&(player%,5)=morg&(player%,5)-1
GOTO chrig
sprices:
RESTORE share.values
FOR t%=1 TO 5
READ value%
shareprice%(t%)=value%+INT(value%/200)*(diff%*INT(RND*3+1))
NEXT
RETURN
share.values:
DATA 250,450,650,850,1000
bbuyshares:
IF day%=6 THEN sunshare
IF tc%<8 OR tc%>18 THEN shareclosed
IF shares%(player%,0)>0 THEN sharetime
WINDOW OUTPUT 4
IF win4%<20 THEN fontset "truckdata",13
GOSUB shcolor
COLOR 0,1
win4%=21:CLS
LOCATE 1,1:COLOR 6,7
PRINT "(LEWIES ST/BROKERS: PURCHASING)"
xyptab 1,23:COLOR 5,0
PRINT "stocks`sold`in`batches`of`(100)"
xyptab 91,37
PRINT "i`will`spend`$100,000)"
PRINT "brokerage`fee`(1%)
LOCATE 6,4:COLOR 5,2
PRINT "shares"TAB(17)"outlay"TAB(25)"batchs"
COLOR 3,4
FOR t%=0 TO 4
PRINT sharename$(t%)TAB(16)"$ )"TAB(25)"*# #+"
NEXT
PRINT :COLOR 5,6
PRINT "(";co.name$(player%);" CAPITAL)";
COLOR 3,4:PRINT TAB(21)"$ )"
PRINT:COLOR 4,7
PRINT "(EXIT)"TAB(9)"(BUY)"TAB(16)"(CANCEL)";
screenon:
COLOR 3,4
GOSUB putshareprices:GOSUB mmm
GOSUB win4ok
nameshare%=0
waitt:
t%=0:GOSUB pointer
ON t% GOTO bottom,updown,sharetitle,batch100,b100000
GOTO waitt
buyshares:
IF nameshare%<1 THEN waitt
truck&=truck&+INT(truck&/100)
IF truck&>money&(player%) THEN nogoshares
money&(player%)=money&(player%)-truck&
shares%(player%,nameshare%)=shares%(player%,nameshare%)+batchs%
shares%(player%,0)=12
GOSUB mmm
GOTO cancel
nogoshares:
LOCATE 3,1:COLOR 7,6
PRINT "(YOU OVER ESTIMATED YOUR FUNDS)"
PRINT "(PENALTY FOR MY EXPENSES = 10%)"
PRINT "( CLICK TO EXIT )"
money&(player%)=money&(player%)-INT(truck&/10)
GOSUB exscreen
GOTO r.to.bank
up.data:
DATA 241,253,79,13,3,5
down.data:
DATA 296,308,79,13,3,5
updown:
IF x%<265 THEN
RESTORE up.data :add%=1
ELSEIF x%<312 AND x%>284 THEN
RESTORE down.data :add%=-1
ELSE
GOTO waitt
END IF
READ x1%,x2%,y1%,ystep%,gap%,no.but%
GOSUB check.b.screen
IF nameshare% <>mouseclick% THEN waitt
GOSUB reverseblock
batchs%=batchs%+add%
IF batchs%=101 THEN
batchs%=100
ELSEIF batchs%=0 THEN
batchs%=1
ELSE
truck&=truck&+shareprice%(nameshare%)*add%
END IF
GOSUB reverseblock
u.d.screen:
LOCATE 6+mouseclick%,17: PRINT " "
LOCATE 6+mouseclick%,17:WRITE truck&
LOCATE 6+mouseclick%,27:PRINT " "
LOCATE 6+mouseclick%,27:WRITE batchs%
GOTO waitt
batch100:
IF nameshare%<1 THEN waitt
batchs%=100:truck&=shareprice%(nameshare%)*100
GOTO u.d.screen
b100000:
IF nameshare%<1 THEN waitt
batchs%=INT(100000&/shareprice%(nameshare%))
truck&=shareprice%(nameshare%)*batchs%
GOTO u.d.screen
cancel:
IF nameshare%<1 THEN waitt
truck&=shareprice%(nameshare%):batchs%=1
mouseclick%=nameshare%:nameshare%=0
x1%=1:x2%=128:y1%=79:ystep%=13:gap%=3:no.but%=5
st%=blocky%
GOSUB reverseblock
GOSUB checkmouse
GOTO u.d.screen
shtitle:
DATA 1,128,79,13,3,5
sharetitle:
x1%=1:x2%=128:y1%=79:ystep%=13:gap%=3:no.but%=5
GOSUB check.b.screen
IF mouseclick%<6 THEN selectshare
GOTO waitt
selectshare:
IF nameshare%<>0 AND nameshare%<>mouseclick% THEN
mouseclick%=nameshare%:GOTO waitt
END IF
IF nameshare%=mouseclick% THEN GOTO cancel
GOSUB reverseblock:blocky%=st%:GOSUB checkmouse
nameshare%=mouseclick%:truck&=shareprice%(nameshare%)
GOTO waitt
bottom:
IF x%<62 THEN nameshare%=0:GOTO r.to.bank
IF x%>81 AND x%<132 THEN buyshares
IF x%>151 AND x%<232 THEN cancel
GOSUB checkmouse
GOTO waitt
mmm:
LOCATE 13,22:PRINT " )"
LOCATE 13,22:WRITE money&(player%)
RETURN
r.to.bank:
WINDOW (6)
GOTO bankscreen
putshareprices:
batchs%=1
FOR t%=1 TO 5
LOCATE 6+t%,17
WRITE shareprice%(t%)
LOCATE 6+t%,27:WRITE batchs%
NEXT:RETURN
pointer:
GOSUB mousepointer
IF y%>15 AND y%<27 AND x%>260 THEN t%=4:RETURN
IF y%>29 AND y%<41 AND x%>223 THEN t%=5:RETURN
IF y%>182 THEN t%=1:RETURN
IF y%<79 OR y>143 THEN t%=0:RETURN
IF x%>241 THEN t%=2:RETURN
IF x%<132 THEN t%=3:RETURN
RETURN
ssellshares:
IF day%=6 THEN sunshare
IF tc%<8 OR tc%>18 THEN shareclosed
IF shares%(player%,0)>0 THEN sharetime
WINDOW OUTPUT 4
IF win4%<20 THEN fontset "truckdata",13
COLOR 0,1:win4%=20:CLS
GOSUB shcolor
PALETTE 0,0,0,0
PALETTE 1,0,0,0
LOCATE 1,1:COLOR 6,7
PRINT "(LEWIES ST/BROKERS: SELLING)"
PRINT :COLOR 5,0
PRINT "stocks`purchased`as`a`package"
PRINT TAB(14)"brokerage`fee`(1%)
PRINT :COLOR 5,2
PRINT TAB(4)"shares"TAB(17)"value"TAB(25)"batchs"
setup:
LOCATE 7,1:COLOR 3,4 :sh%=0:nameshare%=0
FOR t%=1 TO 5
IF shares%(player%,t%)<>0 THEN GOSUB insert
NEXT
PRINT :COLOR 5,6:LOCATE 13,1
PRINT "(";co.name$(player%);" BANK)";
COLOR 3,4:PRINT TAB(21)"$ )"
GOSUB mmm
PRINT:COLOR 4,7
PRINT "(EXIT)"TAB(9)"(SELL)"TAB(17)"(CANCEL)";
GOSUB win4ok
IF sh%=0 THEN GOSUB noshares
waittt:
t%=0 :GOSUB checkmouse
GOSUB pointer2
ON t% GOTO botto,sharename
GOTO waittt
sharename:
RESTORE shtitle
READ x1%,x2%,y1%,ystep%,gap%,no.but%
no.but%=sh%
GOSUB check.b.screen
IF mouseclick%<sh%+1 THEN hishare
GOTO waittt
hishare:
IF nameshare%<>0 AND nameshare%<>mouseclick% THEN
mouseclick%=nameshare%:GOTO waittt
END IF
IF nameshare%=no%(mouseclick%) THEN cancell
GOSUB reverseblock:blocky%=st%:GOSUB checkmouse
nameshare%=no%(mouseclick%)
GOTO waittt
botto:
IF x%<62 THEN eee
IF x%>81 AND x%<141 THEN sellshares
IF x%>160 AND x%<241 THEN cancell
GOTO waittt
sellshares:
truck&=shareprice%(nameshare%)*shares%(player%,nameshare%)
IF truck& >10 THEN
truck&=truck&-INT(truck&/100)
money&(player%)=money&(player%)+truck&
shares%(player%,nameshare%)=0
shares%(player%,0)=12
END IF
AREA(0,78):AREA(310,78):AREA(310,145):AREA(0,145)
COLOR 0,0: AREAFILL 0
GOTO setup
cancell:
IF nameshare%<1 THEN waittt
GOSUB reverseblock:nameshare%=0
GOTO waittt
eee:
GOTO r.to.bank
noshares:
LOCATE 9,3:COLOR 7,6
PRINT "(YOU HAVE NO VALID SHARES)"
RETURN
insert:
LOCATE 7+sh%,1
PRINT sharename$(t%-1)TAB(16)"$ )"TAB(25)"( )"
LOCATE 7+sh%,1
PRINT TAB(17);:WRITE shareprice%(t%)
LOCATE 7+sh%,1
PRINT TAB(26);:WRITE shares%(player%,t%)
sh%=sh%+1:no%(sh%)=t%
RETURN
pointer2:
GOSUB mousepointer
IF y%>182 THEN t%=1:RETURN
IF y%<79 OR y%>143 THEN t%=0:RETURN
IF x%<132 THEN t%=2:RETURN
RETURN
GOTO bankscreen
menuset:
MENU 1,0,1," TRUCKIN ON OPTIONS "
MENU 1,1,gostop%," RESTART GAME "
MENU 1,2,gostop%," SAVE THIS GAME "
MENU 1,3,gostop%," LOAD A SAVED GAME "
MENU 1,4,gostop%," DELETE a SAVED game"
MENU 1,5,1, " RETURN TO A/BASIC "
MENU 2,0,1,""
MENU 3,0,1,""
MENU 4,0,1,""
RETURN
menumaster:
ON MENU(1) GOSUB rstart,savve,looad,delet,finish
PUT (0,0),topline%,PSET
RETURN
rstart:
ERASE credit&,tcount%,tract%,tname$,morg&,shares%,truck%,tmove!
DIM credit&(1),tcount%(1),tract%(1,1),tname$(1,5)
DIM morg&(1,5),shares%(1,5),truck%(1,5,20),tmove!(1,5,5)
money&(1)=10000&:money&(0)=10000&:finishy%=220
day%=0:tc%=0:am%=8:week%=1:shval%=1:startx%=300:starty%=220
WINDOW OUTPUT 3:OBJECT.CLOSE
GOTO newstart
delet:
b$="SCRUB"
GOSUB setdirectory
IF w$="" THEN WINDOW 3:RETURN
IF RIGHT$(w$,1)<>"*" THEN
LOCATE 10,24:PRINT "FILE NOT FOUND"
BEEP:GOSUB mousepointer
GOTO delet
END IF
LOCATE 10,24:PRINT "DELETING FILE"
KILL "main:games/"+w$
WINDOW 3
RETURN
savve:
b$="SAVE"
GOSUB setdirectory
IF w$="" THEN WINDOW 3:RETURN
IF count%>13 THEN
LOCATE 24,1:PRINT "I CAN'T FIT ANY MORE GAMES ON THE DISC! sorry?";
GOSUB checkmouse:GOSUB mousepointer
WINDOW 3:RETURN
END IF
IF RIGHT$(w$,1)<>"*" THEN w$=w$+"*"
LOCATE 10,24:PRINT "SAVING FILE"
a$="main:games/"+w$
OPEN a$ FOR OUTPUT AS #1
FOR x%=0 TO 1
PRINT #1,credit&(x%):PRINT #1,homeport%(x%):PRINT #1,co.name$(x%)
PRINT #1,tcount%(x%):PRINT #1,money&(x%):PRINT #1,tract%(x%,x%)
FOR y%=0 TO 5
PRINT #1,tname$(x%,y%):PRINT #1,morg&(x%,y%):PRINT #1,shares%(x%,y%)
FOR t%=0 TO 20
PRINT #1,truck%(x%,y%,t%)
NEXT t%
FOR t%=0 TO 5
PRINT#1,tmove!(x%,y%,t%)
NEXT t%,y%,x%
PRINT #1,tc%-1:PRINT #1,am%:PRINT #1,week%:PRINT #1,day%
PRINT #1,finishy%:PRINT #1,startx%:PRINT #1,starty%:PRINT #1,duration%
CLOSE #1
WINDOW 3
RETURN
setime:
COLOR 10,3
xyptab 5+am%,197:WRITE tc%
xyptab 21,197:PRINT ":00"
xyptab 64,197:PRINT day$(day%)
xyptab 186,197:WRITE week%
RETURN
newstart:
WINDOW OUTPUT 3
pic$="main":cblocks%=4:colours&=32:gamestop%=1
bytes&=10240&:GOSUB loadscreen
LINE (225,220)-(300,finishy%),5
GOSUB setime
GOSUB st.stop
WINDOW 3:OBJECT.ON
RETURN
find:
GOSUB message
pic$="find":GOSUB threscreen
IF win4%>6 THEN fontset "topaz",8
win4%=6:x%=214:y%=40:COLOR 2,4+player%
FOR t%=0 TO tcount%(player%)-1
l%=LEN(tname$(player%,t%))
x1%=12-l%
xyptab x%,y%:PRINT tname$(player%,t%)SPACE$(x1%)
y%=y%+10:NEXT
WINDOW OUTPUT 6
PUT (59,140),getput%,PSET
WINDOW 4
GET (4,14)-(18,29),getput%
e%=t%:x1%=0
findloop:
GOSUB checkmouse
GOSUB mousepointer
IF x%<214 THEN findloop
IF y%<27 THEN backtooffice
IF y%<34 OR y%>33+10*e% THEN findloop
posinfo:
ON x1% GOTO pinfo
COLOR 2,0:t%=(y%-34)\10
GOSUB fillfind
xyptab 216,125:PRINT MID$(city$(truck%(player%,t%,6)),2,14)
xyptab 216,144:PRINT MID$(cargo$(truck%(player%,t%,9)),2,14)
xyptab 216,163:PRINT "$"truck%(player%,t%,8)*10
xyptab 216,182:PRINT truck%(player%,t%,5)+truck%(player%,t%,13)"Hrs."
PUT (tmove!(player%,t%,2)-7,tmove!(player%,t%,3)-7),getput%
x1%=1: GOTO findloop
pinfo:
GOSUB fillfind
xyptab 216,125:PRINT " "
xyptab 216,144:PRINT " "
xyptab 216,163:PRINT " "
xyptab 216,182:PRINT " "
PUT (tmove!(player%,t%,2)-7,tmove!(player%,t%,3)-7),getput%
x1%=0:GOTO findloop
fillfind:
AREA (213,33+t%*10):AREA (309,33+t%*10)
AREA (309,42+t%*10):AREA (213,42+t%*10)
AREAFILL 1
RETURN
shcolor:
PALETTE 0,.65,.42,.4
PALETTE 1,.65,.42,.4
PALETTE 2,.99,0,0
PALETTE 3,0,.86,.86
PALETTE 4,0,0,.66
PALETTE 5,1,1,1
PALETTE 6,.54,.27,.26
PALETTE 7,1,1,0
RETURN
backtooffice:
IF win2%<>1 THEN:WINDOW 6:WINDOW OUTPUT 2:fontset "topaz",8
WINDOW 6:GOSUB checkmouse:GOTO officescreen
speeding:
GOSUB message
WINDOW OUTPUT 2
fontset "truckdata",13
GOSUB shcolor
PALETTE 26,0,0,0
PALETTE 27,0,1,1
PALETTE 29,1,0,1
COLOR 0,0:CLS:COLOR 5,6:e%=0
PRINT "(BASE CALLING ALL MOBILE RIGS)
COLOR 4,0:PRINT "``report`your`current`speeds"
PRINT :COLOR 7,6:PRINT "(TRUCKS NAME)"TAB(16)"(KPH)"TAB(23)"(HOURS)"
spset:
win2%=3:COLOR 5,2+player%*2:LOCATE 6,1
FOR t%=0 TO tcount%(player%)-1
l%=LEN(tname$(player%,t%))
x1%=12-l%
PRINT "("tname$(player%,t%)SPACE$(x1%)")";
IF truck%(player%,t%,5)<1 THEN truck%(player%,t%,15)=0
PRINT TAB(16)"("truck%(player%,t%,15)")";
PRINT TAB(23)"("truck%(player%,t%,5)")"
NEXT
LOCATE 12,1:COLOR 6,7
PRINT "(ADJUST SPEED)"TAB(20)"(10/4 OUT)"
ON e% GOTO hklk
WINDOW OUTPUT 6
PUT (59,140),getput%,PSET
hklk:
WINDOW 2:e%=0
speedaddloop:
GOSUB mousepointer
IF y%>143 THEN bspeed
IF x%>142 THEN speedaddloop
IF y%<66 OR y%>64+t%*13 THEN speedaddloop
e%=e%+1:IF e%=2 THEN e%=0
IF e%=1 THEN
x1%=(y%-65)\13:GOSUB speedfill
ELSE
GOSUB speedfill
END IF
GOTO speedaddloop
speedfill:
AREA (0,65+x1%*13):AREA (139,65+x1%*13)
AREA (139,77+x1%*13):AREA (0,77+x1%*13)
AREAFILL 1:GOTO checkmouse
bspeed:
IF y%>156 THEN speedaddloop
IF x%<142 THEN adjustspeed
IF x%>192 AND x%<292 THEN backtooffice
adjustspeed:
IF e%<>1 THEN speedaddloop
IF truck%(player%,x1%,5)<1 THEN BEEP:GOTO speedaddloop
chsp%=1:q%=x1%:w%=player%
truck%(player%,q%,5)=truck%(player%,q%,5)*truck%(player%,q%,15)
LOCATE 14,1:COLOR 26,0:PRINT "base`calling`("tname$(w%,q%)")"
GOSUB xload
PUT (47,90),getput%
y1%=90+(80-t%)
PUT (47,y1%),getput%
GOSUB checkmouse
GOSUB loop3
WINDOW 2:x1%=q%:chsp%=0
COLOR 0,0:LOCATE 14,1:PRINT " "
GOTO spset
plas:
WINDOW OUTPUT 4
IF win4%<20 THEN fontset "truckdata",13
win4%=22
GOSUB shcolor
COLOR 0,0:CLS
COLOR 7,6:PRINT "(COMPANY ASSESSMENT DEPARTMENT)"
xyptab 7,25:COLOR 7,2:PRINT "(CLICK TO EXIT)"
LOCATE 15,1:COLOR 5,6
PRINT "(MONEY)"TAB(12)"(ASSETS)"TAB(24)"(TOTAL)";
LINE (1,45)-(1,178),6
LINE (2,178)-(300,178),6
x1%=7:c1%=2:add%=player%
FOR player%=0 TO 1
GOSUB plpr
LINE (x1%,177)-(x1%+25,177-x%),c1%,bf
LINE (x1%+115,177)-(x1%+140,177-y%),c1%,bf
LINE (x1%+229,177)-(x1%+254,177-e%),c1%,bf
x1%=37:c1%=4
NEXT
GOSUB win4ok
GOSUB mousepointer
player%=add%
WINDOW 6:GOTO bankscreen
plpr:
assets&=0
x%=money&(player%)/7500:IF x%<0 THEN x%=0
IF x%>137 THEN x%=137
FOR t%=0 TO tcount%(player%)-1
GOSUB calprice
assets&=assets&+(truck&-morg&(player%,t%))
NEXT:truck&=0
FOR t%=1 TO 5
IF shares%(player%,t%)<>0 THEN
truck&=truck&+shareprice%(t%)*shares%(player%,t%)
END IF
NEXT
assets&=assets&+truck&
y%=assets&/7500:IF y%>130 THEN y%=130
e%=(x%+y%):IF e%>137 THEN e%=137
RETURN
omorg:
WINDOW OUTPUT 4
IF win4%<20 THEN fontset "truckdata",13
win4%=22
GOSUB shcolor
COLOR 0,0:CLS
COLOR 7,6:PRINT "(MORTGAGE AND LOAN DEPARTMENT)"
GOSUB mormon
LOCATE 5,1:COLOR 6,0:PRINT "which`truck"
LOCATE 6,1
COLOR 5,2+player%*2
FOR t%=0 TO tcount%(player%)-1
l%=LEN(tname$(player%,t%))
x1%=12-l%
PRINT "("tname$(player%,t%)SPACE$(x1%)")"
NEXT:e%=0:x2%=t%
LOCATE 15,1:COLOR 6,7
PRINT "(STREWTH THANKS FOR NOTHING:-)";
LINE (148,64)-(311,133),4,b
PAINT (155,77),5,4
LOCATE 6,1:COLOR 6,5
PRINT TAB(16)"loan`is`````````"
PRINT TAB(16)"amount`";:COLOR 4,5:PRINT "$ )"
COLOR 6,5
PRINT TAB(16)"loan`charge(10%)"
PRINT:COLOR 7,6
PRINT TAB(16)"(THANK YOU SIR.)"
GOSUB win4ok
orgloop:
GOSUB mousepointer
IF y%>182 THEN WINDOW 6:GOTO bankscreen
IF y%>118 AND y%<130 AND x%>152 AND x%<312 THEN accmorg
IF x%>142 THEN orgloop
IF y%<66 OR y%>64+x2%*13 THEN orgloop
e%=e%+1:IF e%=2 THEN e%=0
IF e%=1 THEN
t%=(y%-65)\13:x1%=t%:GOSUB speedfill:GOTO calmorg
ELSE
GOSUB speedfill:GOTO erasemorg
END IF
GOTO orgloop
accmorg:
IF e%<>1 OR truck&<100 THEN orgloop
money&(player%)=money&(player%)+truck&
money&(player%)=money&(player%)-truck&/10
GOSUB mormon
morg&(player%,t%)=morg&(player%,t%)+truck&
GOSUB speedfill:e%=0:GOTO erasemorg
mormon:
xyptab 7,25:COLOR 2+player%*2,5
PRINT "("co.name$(player%)" BANK )"TAB(20)"$"money&(player%)")"
RETURN
calmorg:
GOSUB calprice
IF y%>4 THEN reject
truck&=truck&/2
truck&=truck&-morg&(player%,t%)
IF truck&<100 THEN reject
COLOR 4,5
xyptab 226,74:PRINT "accepted"
xyptab 237,87:WRITE truck&
GOTO orgloop
reject:
COLOR 2,5
xyptab 226,74:PRINT "rejected"
COLOR 4,5
xyptab 237,87:PRINT "ZILCH"
GOTO orgloop
erasemorg:
COLOR 4,5
xyptab 226,74:PRINT "````````"
xyptab 237,87:PRINT " "
GOTO orgloop
balance:
WINDOW OUTPUT 4
IF win4%<20 THEN fontset "truckdata",13
win4%=22:sh%=player%
GOSUB shcolor
PALETTE 0,1,1,1:PALETTE 1,1,1,1
COLOR 0,0:CLS
COLOR 7,6:PRINT "( COMPANY AUDITORS DEPARTMENT)";
COLOR 2,0
FOR player%=0 TO 1
GOSUB balprint
COLOR 4,0: NEXT
LINE (0,22)-(310,104),6,b
LINE (0,113)-(310,195),6,b
GOSUB win4ok
GOSUB mousepointer
WINDOW 6:player%=sh%:GOTO bankscreen
balprint:
cal&=0:ccal&=0:truck&(2)=0
FOR t%=0 TO 4
IF truck%(player%,t%,10)<>0 THEN
GOSUB calprice
cal&=cal&+truck&
END IF
IF morg&(player%,t%)<>0 THEN ccal&=ccal&+morg&(player%,t%)
NEXT
FOR t%=1 TO 5
IF shares%(player%,t%)<>0 THEN
truck&(2)=truck&(2)+shareprice%(t%)* shares%(player%,t%)
END IF
NEXT
truck&=money&(player%)+cal&+truck&(2)-ccal&
PRINT:PRINT
PRINT "company`name"TAB(18)"("co.name$(player%)")"
PRINT "truck`assets"TAB(18)"$"cal&")"
PRINT "stock`assets"TAB(18)"$"truck&(2)")"
PRINT "present`capital"TAB(18)"$"money&(player%)")"
PRINT "truck`mortgages"TAB(18)"$"ccal&")"
PRINT "total`nett`worth"TAB(18)"$"truck&")";
RETURN