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 >
Text File  |  1991-08-23  |  51KB  |  2,086 lines

  1. 50 :
  2. RANDOMIZE TIMER
  3. ON MENU GOSUB menumaster
  4. MENU ON
  5. GOSUB sc1
  6. GOSUB newstart
  7. GET (0,0)-(320,8),topline%
  8. loop:
  9. IF gostop%<>0 THEN waiting
  10. GOSUB simulated.time
  11. ON gflag% GOTO gendy
  12. GOSUB movealltrucks
  13. GOSUB journeycomplete 
  14. GOTO loop
  15. gendy:
  16. gflag%=0:GOTO loop
  17. movealltrucks:
  18. FOR q%=0 TO 4
  19. FOR w%=0 TO 1
  20. IF truck%(w%,q%,13)>0 THEN laidup
  21. IF truck%(w%,q%,0)>0 THEN GOSUB movetruck
  22. loop5:   
  23. NEXT:NEXT
  24. RETURN
  25. laidup:
  26. truck%(w%,q%,13)=truck%(w%,q%,13)-1
  27. truck%(w%,q%,19)=truck%(w%,q%,19)-1
  28. IF truck%(w%,q%,13)=0 AND truck%(w%,q%,14)=0 THEN truck%(w%,q%,0)=-5
  29. IF truck%(w%,q%,13)=0 AND truck%(w%,q%,14)<>0 THEN truck%(w%,q%,14)=0
  30. GOTO loop5
  31. movetruck:
  32. t%=35:'IF w%=0 THEN t%=25:REM was 30
  33. x%=INT(RND*t%):IF x%=q% THEN penalty
  34. tmove!(w%,q%,2)=tmove!(w%,q%,2)+tmove!(w%,q%,0)
  35. tmove!(w%,q%,3)=tmove!(w%,q%,3)+tmove!(w%,q%,1)
  36. OBJECT.X truck%(w%,q%,12),INT(tmove!(w%,q%,2))
  37. OBJECT.Y truck%(w%,q%,12),INT(tmove!(w%,q%,3))
  38. truck%(w%,q%,5)=truck%(w%,q%,5)-1
  39. truck%(w%,q%,19)=truck%(w%,q%,19)-1
  40. IF truck%(w%,q%,5)=<0 THEN
  41. truck%(w%,q%,13)=2*truck%(w%,q%,10)
  42. END IF
  43. truck%(w%,q%,3)=truck%(w%,q%,3)-truck%(w%,q%,11)
  44. IF truck%(w%,q%,3)=<0 THEN nofuel
  45. RETURN
  46. journeycomplete:
  47. FOR q%=0 TO 4
  48. FOR w%=0 TO 1
  49. IF truck%(w%,q%,0)=-5 THEN GOSUB new.truck
  50. NEXT:NEXT
  51. RETURN
  52. flash.truck:
  53. x%=OBJECT.X(truck%(w%,q%,12)):y%=OBJECT.Y(truck%(w%,q%,12))
  54. IF x%>100 THEN x%=x%-100
  55. a%=x%+3:b%=y%+12:c1%=24+w%
  56. COLOR 20,c1%:OBJECT.OFF
  57. GET (x%,y%)-STEP(100,20),getput%
  58. FOR t%=0 TO 5
  59. LINE (x%,y%)-STEP(100,20),c1%,bf
  60. LINE (x%,y%)-STEP(100,20),10,b
  61. xyptab a%,b%
  62. PRINT tname$(w%,q%)
  63. FOR tt%=0 TO 700:NEXT
  64. PUT (x%,y%),getput%,PSET
  65. FOR tt%=0 TO 200:NEXT
  66. NEXT
  67. PUT (x%,y%),getput%,PSET
  68. OBJECT.ON
  69. RETURN
  70. penalty:
  71. MOUSE OFF:TIMER OFF
  72. IF win4%<5 THEN fontaok
  73. WINDOW OUTPUT 4
  74. fontset "topaz",8
  75. fontaok:
  76. WINDOW OUTPUT 3
  77. x%=INT(RND*5)+1
  78. win4%=4
  79. ON x% GOTO spding,ttrouble,rgang,tstuf,rdam
  80. nopen:
  81. WINDOW OUTPUT 3
  82. IF gostop%=0 THEN MOUSE ON:TIMER ON
  83. RETURN
  84. tstuf:
  85. IF truck%(w%,q%,16)>57 OR truck%(w%,q%,18)=1 THEN nopen
  86. truck%(w%,q%,18)=1
  87. pic$="tstuf"
  88. e%=(100-truck%(w%,q%,16))*(truck%(w%,q%,7)*5)
  89. r%=0:IF w%=0 THEN r%=1
  90. GOSUB flash.truck
  91. GOSUB threscreen
  92. COLOR 3,6
  93. xyptab 135,50:PRINT co.name$(w%)
  94. xyptab 135,62:PRINT tname$(w%,q%)
  95. xyptab 180,135:PRINT co.name$(r%)
  96. xyptab 217,185:WRITE e%
  97. WINDOW 4
  98. money&(r%)=money&(r%)+(truck%(w%,q%,8)*10)
  99. truck%(w%,q%,8)=-e%/10:truck%(w%,q%,9)=19
  100. truck%(w%,q%,19)=0:truck%(w%,q%,20)=0
  101. GOTO expenalty
  102. spding:
  103. IF truck%(w%,q%,15)<61 OR truck%(w%,q%,18)=2 THEN nopen
  104. pic$="speeding"
  105. truck%(w%,q%,18)=2
  106. e%=INT((truck%(w%,q%,15)-60)*10)*truck%(w%,q%,7)
  107. r%=INT(RND*9)+1
  108. GOSUB flash.truck
  109. GOSUB threscreen
  110. COLOR 6,7 
  111. xyptab 172,121:PRINT co.name$(w%)
  112. xyptab 153,131:PRINT tname$(w%,q%)
  113. xyptab 153,141:PRINT MID$(city$(truck%(w%,q%,6)),2,12)
  114. xyptab 172,151:WRITE e%
  115. xyptab 172,161:PRINT r%
  116. WINDOW 4 
  117. truck%(w%,q%,13)=r%
  118. truck%(w%,q%,8)=truck%(w%,q%,8)-(e%\10)
  119. truck%(w%,q%,14)=1
  120. GOTO expenalty
  121. ttrouble:
  122. IF truck%(w%,q%,18)=3 THEN nopen
  123. pic$="blowout":truck%(w%,q%,18)=3
  124. e%=INT(RND*truck%(w%,q%,7)+1)*30
  125. r%=INT(RND*6+2)
  126. GOSUB flash.truck
  127. GOSUB threscreen
  128. COLOR 2,3
  129. xyptab 49,41:PRINT co.name$(w%)
  130. xyptab 67,51:PRINT tname$(w%,q%)
  131. xyptab 228,141:PRINT r%
  132. xyptab 228,151:PRINT "$"e%*10
  133. WINDOW 4
  134. truck%(w%,q%,13)=r%
  135. truck%(w%,q%,8)=truck%(w%,q%,8)-e%
  136. truck%(w%,q%,14)=1
  137. GOTO expenalty
  138. rgang:
  139. IF truck%(w%,q%,18)=4 THEN nopen
  140. pic$="roadfix":truck%(w%,q%,18)=4
  141. e%=0:r%=INT(RND*12)+1
  142. GOSUB flash.truck
  143. GOSUB threscreen
  144. COLOR 7,6
  145. xyptab 237,133:PRINT r% 
  146. xyptab 197,143:PRINT tname$(w%,q%)
  147. WINDOW 4
  148. truck%(w%,q%,13)=r%
  149. truck%(w%,q%,14)=1
  150. expenalty:
  151. GOSUB exscreen
  152. win4%=5:GOTO returnmain
  153. rdam:
  154. IF truck%(w%,q%,18)=5 THEN nopen
  155. truck%(w%,q%,18)=5
  156. pic$="rdam"
  157. r%=INT(RND*9)+1
  158. e%=truck%(w%,q%,7)*100
  159. GOSUB flash.truck
  160. GOSUB threscreen
  161. COLOR 3,4
  162. xyptab 124,107:WRITE r%
  163. xyptab 239,167:WRITE e%
  164. WINDOW 4
  165. truck%(w%,q%,13)=r%                        
  166. truck%(w%,q%,16)=truck%(w%,q%,16)-INT(RND*5+2)
  167. truck%(w%,q%,14)=1
  168. truck%(w%,q%,8)=truck%(w%,q%,8)-e%\10
  169. GOTO expenalty
  170. nofuel:              
  171. MOUSE OFF:TIMER OFF
  172. GOSUB flash.truck
  173. pic$="nofuel":GOSUB threscreen
  174. IF win4%>6 THEN fontset "topaz",8
  175. LOCATE 3,4:COLOR 1,0
  176. xyptab 117,28:PRINT co.name$(w%)
  177. xyptab 117,38:PRINT tname$(w%,q%)
  178. xyptab 200,144:WRITE truck%(w%,q%,7)*125
  179. WINDOW 4
  180. nf:
  181. GOSUB exscreen
  182. IF x%<20 OR x%>84 OR y%>144 OR y%<123 THEN nf
  183. truck%(w%,q%,8)=truck%(w%,q%,8)-(truck%(w%,q%,7)*125)\10
  184. truck%(w%,q%,3)=300
  185. truck%(w%,q%,13)=5
  186. truck%(w%,q%,14)=1
  187. win4%=3
  188. returnmain:
  189. contract%=0
  190. WINDOW(3):GOSUB sc1
  191. IF gostop%=0 THEN TIMER ON:MOUSE ON
  192. RETURN
  193. returnmain1:
  194. WINDOW(3):GOSUB sc1:GOTO waiting
  195. exscreen:
  196. GOSUB checkmouse:GOSUB mousepointer
  197. RETURN 
  198. new.truck:
  199. MOUSE OFF:TIMER OFF     
  200. GOSUB flash.truck
  201. IF win2%=1 THEN WINDOW OUTPUT 2:GOTO des2
  202. pic$="despatch":win2%=1:GOSUB secscreen
  203. WINDOW OUTPUT 2
  204. fontset "small",7
  205. des2:
  206. no%=tc%:IF no%=0 THEN no%=25
  207. pen%=0:c2%=26:IF w%=1 THEN c2%=27
  208. COLOR 25,18
  209. LINE (76,55)-(170,92),1,bf
  210. LINE (88,93)-(170,132),1,bf
  211. LINE (7,163)-(171,233),18,bf
  212. LINE (38,14)-(80,21),18,bf
  213. LINE (110,14)-(170,21),18,bf
  214. xyptab 36,21:PRINT no%-1": 00"
  215. xyptab 110,21:PRINT day$(day%)
  216. IF truck%(w%,q%,17)=>5500 THEN
  217. truck%(w%,q%,16)=truck%(w%,q%,16)-2
  218. truck%(w%,q%,17)=truck%(w%,q%,17)-5500
  219. END IF
  220. IF truck%(w%,q%,20)>0 THEN pic$="CONTRACT"
  221. IF truck%(w%,q%,20)>0 AND truck%(w%,q%,19)<0 THEN
  222. pen%=(truck%(w%,q%,20)*truck%(w%,q%,19))/10
  223. truck%(w%,q%,8)=truck%(w%,q%,8)+pen%
  224. END IF
  225. money&(w%)=money&(w%)+(truck%(w%,q%,8)*10)
  226. COLOR 25,1
  227. xyptab 76,61: PRINT co.name$(w%)
  228. xyptab 76,71: PRINT tname$(w%,q%) 
  229. xyptab 76,81: PRINT MID$(city$(truck%(w%,q%,1)),2,12)
  230. xyptab 76,91: PRINT MID$(cargo$(truck%(w%,q%,9)),2,14)
  231. xyptab 88,101: WRITE truck%(w%,q%,8)*10
  232. xyptab 88,111:WRITE money&(w%)
  233. xyptab 88,121:WRITE truck%(w%,q%,16)
  234. xyptab 84,131:PRINT truck%(w%,q%,3)
  235. fuel%=INT(RND*59)+40
  236. truck%(w%,q%,1)=truck%(w%,q%,6)
  237. OPEN "R",#1,"ram:REQUIRES",243
  238. 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$
  239. GET #1,truck%(w%,q%,1)+1
  240. LOCATE 25,1:COLOR 25,18
  241. PRINT TAB(2)a$:PRINT TAB(2)b$:PRINT TAB(2)c$:PRINT TAB(2)d$:PRINT TAB(2)e$
  242. PRINT TAB(2)F$:PRINT TAB(2)g$:PRINT TAB(2)h$:PRINT TAB(2)i$
  243. CLOSE #1
  244. WINDOW 2
  245. IF pic$="CONTRACT" THEN GOSUB conmessage
  246. a%=INT((RND*20)+10)*truck%(w%,q%,7)
  247. w$=MID$(city$(truck%(w%,q%,6)),2,12)
  248. despatch:                         
  249. GOSUB mousepointer
  250. x1%=203:x2%=283:y1%=18:ystep%=20:gap%=4:no.but%=5
  251. GOSUB check.b.screen
  252. IF mouseclick%<6 THEN GOSUB buttonpress:GOTO desaction
  253. GOTO despatch
  254. conmessage:
  255. IF truck%(w%,q%,19)<0 THEN del%=truck%(w%,q%,19) ELSE del%=0
  256. GET (99,129)-(257,179),getput%
  257. COLOR 1,c2%
  258. LINE (99,129)-(257,179),25,b
  259. LINE (100,130)-(256,178),c2%,bf
  260. xyptab 105,139:PRINT "SPECIAL CONTRACT RESULT"
  261. xyptab 105,150:PRINT "Time Default"del%
  262. xyptab 105,160:PRINT "Penalty:-  $";:WRITE ABS(pen%*10)
  263. xyptab 105,175:PRINT "KEEP ON TRUCKIN PARDNER"
  264. GOSUB checkmouse:GOSUB mousepointer:PUT(99,129),getput%,PSET
  265. pic$="":truck%(w%,q%,19)=0:truck%(w%,q%,20)=0
  266. RETURN
  267. desaction:
  268. ON mouseclick% GOTO layup,refuel,contract,repair,xload
  269. repair:
  270. b%=100-truck%(w%,q%,16)
  271. IF win6%=7 THEN 
  272. WINDOW OUTPUT 6
  273. LINE (173,19)-(270,27),2,bf
  274. LINE (173,28)-(213,87),2,bf
  275. WINDOW 6:GOTO re6
  276. END IF
  277. pic$="repair":GOSUB sixscreen
  278. WINDOW OUTPUT 2
  279. PUT (59,140),getput%,PSET
  280. WINDOW 6
  281. re6:
  282. COLOR 31,2
  283. xyptab 173,25:WRITE money&(w%)
  284. xyptab 173,40:WRITE truck%(w%,q%,16)
  285. xyptab 173,55:WRITE a%
  286. xyptab 175,70:WRITE b%
  287. xyptab 173,85:WRITE b%*a%
  288. GOSUB checkmouse
  289. win6%=7
  290. rloop:
  291. GOSUB mousepointer
  292. IF y%>44 AND y%<58 AND x%>216 AND x%<276 THEN rup
  293. IF y%>59 AND y%<75 AND x%>216 AND x%<276 THEN rdo
  294. IF y%>102 AND y%<121 AND x%>48 AND x%<136 THEN okrepair
  295. IF y%>102 AND y%<121 AND x%>177 AND x%<265 THEN norepair
  296. GOTO rloop
  297. okrepair:
  298. t%=b%*a%
  299. IF t%>money&(w%) THEN nmoney
  300. money&(w%)=money&(w%)-t%
  301. IF b%<5 THEN b%=5
  302. truck%(w%,q%,13)=b%*2
  303. truck%(w%,q%,16)=truck%(w%,q%,16)+b%
  304. IF truck%(w%,q%,16)>100 THEN truck%(w%,q%,16)=100
  305. truck%(w%,q%,0)=0:truck%(w%,q%,17)=0
  306. truck%(w%,q%,5)=0
  307. truck%(w%,q%,8)=0
  308. truck%(w%,q%,9)=19
  309. truck%(w%,q%,6)=truck%(w%,q%,1)
  310. truck%(w%,q%,1)=19
  311. truck%(w%,q%,19)=0
  312. truck%(w%,q%,20)=0
  313. GOTO exitdespatch
  314. nmoney:
  315. LINE (15,120)-(295,260),1,bf
  316. LINE (14,119)-(296,261),0,b
  317. COLOR 31,1 :LOCATE 17,1  
  318. rfile%=4:GOSUB getrand
  319. money&(w%)=money&(w%)-INT(t%/10)
  320. GOSUB checkmouse       
  321. GOSUB mousepointer
  322. y%=186:x%=68:t%=5:win6%=0:GOTO leavelay
  323. norepair:
  324. WINDOW 2:GOSUB checkmouse:GOTO despatch
  325. rdo:
  326. IF b%=5 THEN rloop
  327. b%=b%-1:GOTO reupdate
  328. rup:
  329. IF b%=100-truck%(w%,q%,16) THEN rloop
  330. b%=b%+1
  331. reupdate:
  332. xyptab 175,70:PRINT "  "
  333. xyptab 175,70:WRITE b%
  334. xyptab 173,85:PRINT "      "
  335. xyptab 173,85:WRITE b%*a%
  336. GOTO rloop
  337. layup:
  338. t%=10:IF win4%=1 THEN WINDOW 4:GOSUB laywrite:GOTO loop4
  339. pic$="layup":GOSUB threscreen
  340. IF win4%>6 THEN fontset "topaz",8
  341. WINDOW 4
  342. win4%=1:contract%=0
  343. loop4:
  344. GOSUB mousepointer
  345. IF y%>164 THEN leavelay
  346. IF y% <130 OR y%> 150 THEN loop4
  347. IF x%> 63 AND x%<149 THEN addtime
  348. IF x%> 201 AND x%<251 THEN deducttime
  349. GOTO loop4
  350. deducttime:
  351. t%=t%-10:IF t%<10 THEN t%=10
  352. GOSUB laywrite:GOSUB checkmouse
  353. GOTO loop4
  354. addtime:
  355. t%=t%+10:IF t%>90 THEN t%=90
  356. GOSUB laywrite:GOSUB checkmouse
  357. GOTO loop4
  358. laywrite:
  359. COLOR 5,1
  360. xyptab 157,141: PRINT "  "
  361. xyptab 157,141: WRITE t%
  362. RETURN
  363. leavelay:
  364. IF y%>187 THEN loop4
  365. IF x%>66 AND x%<187 THEN 
  366. truck%(w%,q%,13)=t%
  367. truck%(w%,q%,0)=0
  368. truck%(w%,q%,8)=0
  369. truck%(w%,q%,9)=19
  370. truck%(w%,q%,6)=truck%(w%,q%,1)
  371. truck%(w%,q%,1)=19
  372. truck%(w%,q%,5)=0
  373. truck%(w%,q%,19)=0
  374. truck%(w%,q%,20)=0
  375. GOTO returnmain
  376. END IF
  377. GOTO loop4
  378. noload: 
  379. GET (196,81)-(298,121),getput%
  380. LINE (197,82)-(297,120),25,bf
  381. LINE (196,81)-(298,121),1,b
  382. COLOR 15,25:LOCATE 13,1
  383. PRINT TAB(26)"You seem a bit"
  384. PRINT TAB(26)"CONFUSED!.  You"
  385. PRINT TAB(26)"will need a"
  386. PRINT TAB(26)"CONTRACT before"
  387. PRINT TAB(26)"I can LOAD. !!!!"
  388. GOSUB mousepointer
  389. PUT (196,81),getput%,PSET
  390. GOSUB checkmouse
  391. GOTO despatch 
  392. xload:
  393. IF truck%(w%,q%,5)<1 THEN noload
  394. WINDOW OUTPUT 4
  395. IF win4%>6 THEN fontset "topaz",8
  396. speed%=80:t%=speed%:IF truck%(w%,q%,20)<1 THEN truck%(w%,q%,19)=0
  397. IF chsp%=1 THEN t%=truck%(player%,q%,15):c1%=(t%-80)*2:speed%=t%-c1%
  398. kpl!=truck%(w%,q%,4)/80
  399. x1%=47:y1%=90:
  400. win4%=2:COLOR 4,3
  401. pic$="speed":GOSUB threscreen
  402. xyptab 209,35:PRINT  co.name$(w%)
  403. xyptab 209,45:PRINT tname$(w%,q%)
  404. xyptab 209,55:PRINT MID$(cargo$(truck%(w%,q%,9)),2,12)
  405. xyptab 209,65:PRINT TAB(27)MID$(city$(truck%(w%,q%,6)),2,12)
  406. xyptab 209,75:PRINT truck%(w%,q%,5)
  407. xyptab 209,85:PRINT truck%(w%,q%,19)
  408. GOSUB speedupdate
  409. xyptab 209,105:PRINT truck%(w%,q%,3)
  410. xyptab 209,125:PRINT truck%(w%,q%,7)
  411. WINDOW 4
  412. GET (47,90)-(71,98),getput%
  413. IF chsp%=1 THEN RETURN
  414. loop3:
  415. GOSUB mousepointer
  416. IF x%<72 THEN speedadjust 
  417. IF x%>98 AND x%<177 AND y%<183 AND y%>145 THEN exitspeed
  418. GOTO loop3
  419. speedadjust:
  420. IF y%<60 OR y%>170 THEN loop3
  421. IF y%<y1%-4 THEN y2%=-10:GOTO addjust
  422. IF y%>y1%+14 THEN y2%=10:GOTO addjust
  423. GOTO loop3
  424. addjust:
  425. PUT (x1%,y1%),getput%
  426. y1%=y1%+y2%:PUT (x1%,y1%),getput%
  427. speed%=speed%+y2%:t%=t%-y2%:GOSUB speedupdate
  428. GOTO loop3
  429. speedupdate:
  430. xyptab 218,95:PRINT "    "
  431. xyptab 209,95:PRINT INT(truck%(w%,q%,5)/t%)
  432. xyptab 218,115:PRINT "    "
  433. xyptab 209,115:PRINT INT(truck%(w%,q%,5)/(speed%*kpl!))
  434. RETURN    
  435. exitspeed:
  436. truck%(w%,q%,0)=1
  437. x%=INT(truck%(w%,q%,5)/t%)
  438. y%=INT(truck%(w%,q%,5)/(speed%*kpl!))
  439. truck%(w%,q%,17)=truck%(w%,q%,17)+truck%(w%,q%,5)
  440. truck%(w%,q%,11)=INT(y%/x%)
  441. truck%(w%,q%,5)=x%
  442. truck%(w%,q%,15)=t%
  443. IF chsp%=0 THEN
  444. tmove!(w%,q%,2)=cityx%(truck%(w%,q%,1))
  445. tmove!(w%,q%,3)=cityy%(truck%(w%,q%,1))
  446. END IF
  447. tmove!(w%,q%,4)=cityx%(truck%(w%,q%,6))
  448. tmove!(w%,q%,5)=cityy%(truck%(w%,q%,6))
  449. tmove!(w%,q%,0)=(tmove!(w%,q%,4)-tmove!(w%,q%,2))/x%
  450. tmove!(w%,q%,1)=(tmove!(w%,q%,5)-tmove!(w%,q%,3))/x%
  451. IF chsp%<>0 THEN RETURN
  452. truck%(w%,q%,18)=0
  453. exitdespatch:
  454. contract%=0
  455. GOTO returnmain
  456. refuel:
  457. IF win6%=1 THEN erasefuel
  458. pic$="fuel":GOSUB sixscreen
  459. WINDOW OUTPUT 2
  460. PUT (59,140),getput%,PSET
  461. WINDOW OUTPUT 6
  462. IF win6%>3 THEN fontset "topaz",8
  463. win6%=1
  464. fugo:
  465. stepp#=truck%(w%,q%,2)/109
  466. fillhieght%=truck%(w%,q%,3)/stepp#
  467. COLOR 20,7:xyptab 178,6:PRINT w$
  468. COLOR 31,7:xyptab 179,7:PRINT w$
  469. LINE (230,136)-STEP(-53,-fillhieght%+1),2,bf
  470. COLOR 31,23
  471. xyptab 97,166:WRITE fuel%
  472. xyptab 228,196:WRITE money&(w%)
  473. litres!=0:total!=0:tank!=truck%(w%,q%,3)
  474. range%=tank!*truck%(w%,q%,4)
  475. fillhieght%=136-fillhieght%
  476. GOSUB fuelupdate
  477. WINDOW 6
  478. fueldepot:
  479. GOSUB mousepointer
  480. IF x%<254 OR x%>299 THEN fueldepot
  481. IF y%>74 AND y%<116 THEN exitfuel
  482. IF y%>24 AND y%<66 THEN topup
  483. GOTO fueldepot
  484. topup:
  485. FOR t%=fillhieght% TO 26 STEP-1
  486. LINE (177,t%)-(230,t%),2
  487. litres!=litres!+stepp#
  488. total!=total!+(fuel%*stepp#)
  489. tank!=tank!+stepp#
  490. range%=tank!*truck%(w%,q%,4)
  491. NEXT:fillhieght%=t%
  492. money&(w%)=money&(w%)-INT(total!/100)
  493. IF money&(w%)<0 THEN GOTO xnomoney
  494. GOSUB fuelupdate
  495. truck%(w%,q%,3)=INT(tank!)
  496. xyptab 228,196:PRINT "         "
  497. xyptab 228,196:WRITE money&(w%)
  498. GOSUB checkmouse:GOTO exitfuel
  499. erasefuel:
  500. WINDOW OUTPUT 6
  501. COLOR 31,7:xyptab 179,7:PRINT "             "
  502. LINE (177,26)-(230,136),11,bf
  503. COLOR 31,23
  504. xyptab 97,166:PRINT "  "
  505. xyptab 228,196:PRINT "         "
  506. xyptab 97,181:PRINT "    "
  507. xyptab 105,196:PRINT "    "
  508. xyptab 263,166:PRINT "    "
  509. xyptab 263,181:PRINT "    "
  510. GOTO fugo
  511. fuelupdate:
  512. COLOR 31,23
  513. xyptab 97,181:WRITE INT(litres!)
  514. xyptab 105,196:WRITE INT(total!/100)
  515. xyptab 263,166:WRITE INT(tank!)
  516. xyptab 263,181:WRITE range%
  517. RETURN
  518. xnomoney:
  519. LINE (50,40)-STEP(220,65),21,b
  520. LINE (51,41)-STEP(218,63),7,bf
  521. LOCATE 7,9:COLOR 20,7
  522. PRINT "SORRY PAL: I wasn't born"
  523. PRINT TAB(9)"yesterday. This is a"
  524. PRINT TAB(9)"Service Station not a"
  525. PRINT TAB(9)"bloody BANK!"
  526. PRINT TAB(9)"Come back when you've"
  527. PRINT TAB(9)"got enough dough."
  528. money&(w%)=money&(w%)+INT(total!/100)
  529. win6%=0
  530. exitfuel:
  531. GOSUB exscreen
  532. GOSUB checkmouse
  533. WINDOW OUTPUT 2
  534. COLOR 25,1
  535. xyptab 88,111: PRINT "           "
  536. xyptab 88,111: WRITE money&(w%)
  537. xyptab 84,131:PRINT truck%(w%,q%,3)
  538. WINDOW 2:GOTO despatch
  539. contract:
  540. IF contract%=7 THEN WINDOW 4:GOTO page
  541. WINDOW OUTPUT 4
  542. IF win4%<7 OR win4%>13 THEN fontset "despatch",13
  543. PALETTE 0,.6,.58,.57:PALETTE 1,.6,.58,.57
  544. PALETTE 2,.48,.01,0:PALETTE 3,.77,.77,.77
  545. PALETTE 4,1,1,0:PALETTE 5,.02,.56,0
  546. PALETTE 6,1,1,1:PALETTE 7,0,0,1
  547. win4%=7:contract%=7:diff!=(246-finishy%)/2:h!=(RND*1.5)+1:dp%=INT(RND*10)
  548. desgo:                                     
  549. COLOR 0,0:CLS
  550. LOCATE 1,1:COLOR 3,2
  551. randy%=INT(RND*12)
  552. FOR t%=0 TO randy%
  553. go:
  554. double%=0:cargo%=INT(RND*19)
  555. FOR tt%=0 TO t%
  556. IF ABS(cargo%(tt%))=cargo% THEN double%=1
  557. NEXT
  558. ON double% GOTO go
  559. e%=INT(RND*19)
  560. IF e%=cargo% THEN cargo%=-cargo%
  561. cargo%(t%)=cargo%
  562. PRINT TAB(16)cargo$(ABS(cargo%(t%)))
  563. NEXT
  564. destination%=t%
  565. x%=10:IF truck%(w%,q%,1)=9 THEN x%=5
  566. LOCATE 1,1
  567. randy%=INT(RND*x%)
  568. FOR t%=0 TO randy%
  569. goo:
  570. double%=0
  571. cargo%=INT(RND*19)
  572. IF dist%(truck%(w%,q%,1),cargo%)=0 THEN goo
  573. FOR tt%=0 TO t%
  574. IF city%(tt%)=cargo% THEN double%=1
  575. NEXT
  576. ON double% GOTO goo
  577. distt%(t%)=dist%(truck%(w%,q%,1),cargo%)
  578. city%(t%)=cargo%
  579. PRINT city$(cargo%)
  580. NEXT:GOSUB setcargo
  581. cargo%=t%
  582. LOCATE 15,17:COLOR 6,7
  583. PRINT "( OK )"TAB(24)"(CANCEL)";
  584. mouseclick%=1:randy%=0
  585. GOSUB klm
  586. st1%=0:GOSUB rl
  587. st2%=0:GOSUB rr
  588. page: 
  589. WINDOW 4                   
  590. GOSUB mousepointer
  591. IF y%>181 AND x%>161 THEN okcancel
  592. IF x%>146 THEN right
  593. x1%=0:x2%=139:y1%=0:ystep%=13:gap%=2:no.but%=cargo%
  594. GOSUB check.b.screen
  595. IF mouseclick%<cargo%+1 THEN GOSUB reverseleft
  596. GOTO page
  597. right:
  598. x1%=150:x2%=309:y1%=0:ystep%=13:gap%=2:no.but%=destination%
  599. GOSUB check.b.screen
  600. IF mouseclick%<destination%+1 THEN
  601. randy%=mouseclick%-1
  602. GOSUB reverseright    
  603. GOSUB cargoprice
  604. END IF
  605. GOTO page
  606. okcancel:
  607. IF x%<221 AND y%<196 THEN 
  608. truck%(w%,q%,5)=klm%
  609. truck%(w%,q%,8)=INT(t&/10)
  610. truck%(w%,q%,9)=ABS(cargo%(randy%))
  611. truck%(w%,q%,19)=del%
  612. truck%(w%,q%,20)=pen%
  613. WINDOW 2:GOTO despatch
  614. END IF
  615. IF x%>232 AND x%<312 AND y%<196 THEN WINDOW 2:GOTO despatch
  616. GOTO page
  617. reverseleft:
  618. IF st%=st1% THEN RETURN
  619. GOSUB rl
  620. st1%=st%
  621. GOSUB rl
  622. GOTO klm
  623. rl:
  624. AREA (0,st1%):AREA STEP (139,0)
  625. AREA STEP (0,12):AREA STEP (-139,0)
  626. AREAFILL 1
  627. RETURN
  628. reverseright:
  629. IF st%=st2% THEN BEEP:RETURN
  630. GOSUB rr
  631. st2%=st%
  632. rr:
  633. AREA (150,st2%):AREA STEP (159,0)
  634. AREA STEP (0,12):AREA STEP (-159,0)
  635. AREAFILL 1
  636. RETURN
  637. klm:
  638. truck%(w%,q%,6)=city%(mouseclick%-1)
  639. klm%=distt%(mouseclick%-1)
  640. LOCATE 11,8:COLOR 4,7
  641. PRINT "````":LOCATE 11,8:WRITE klm%
  642. cargoprice:
  643. del%=0:pen%=0
  644. t&=truck%(w%,q%,7)*(klm% * (cargorates!(ABS(cargo%(randy%))))*diff!)
  645. IF cargo%(randy%)<0 AND week%>3 THEN
  646. t&=t&*h!
  647. del%=klm%/80+dp%
  648. pen%=(t&/del%)*2
  649. END IF
  650. COLOR 6,2:LOCATE 12,8
  651. PRINT "``````";:LOCATE 12,8: WRITE t&
  652. PRINT TAB(10)"```";:LOCATE 13,10:WRITE del%
  653. PRINT TAB(10)"````";:LOCATE 14,10:WRITE pen%
  654. GOTO checkmouse
  655. setcargo:
  656. LOCATE 11,1:COLOR 4,7
  657. LINE (0,130)-(139,142),7,bf
  658. PRINT "klm{:`"
  659. COLOR 6,2:LOCATE 12,1
  660. LINE (0,143)-(139,184),2,bf
  661. PRINT TAB(1)"rate:`$"
  662. PRINT TAB(1)"del:hrs:"
  663. PRINT TAB(1)"penalty{$"
  664. RETURN
  665. simulated.time:
  666. IF gostop%<>0 THEN RETURN
  667. COLOR 10,3
  668. IF tc%=24 THEN GOSUB addday
  669. xyptab 5+am%,197:WRITE tc%
  670. tc%=tc%+1:IF tc%>9 THEN am%=0 
  671. IF shares%(0,0)>0 THEN shares%(0,0)=shares%(0,0)-1
  672. IF shares%(1,0)>0 THEN shares%(1,0)=shares%(1,0)-1
  673. IF tract%(0,0)>0 THEN tract%(0,0)=tract%(0,0)-1
  674. IF tract%(1,0)>0 THEN tract%(1,0)=tract%(1,0)-1
  675. RETURN
  676. addday:
  677. tc%=0:am%=8
  678. day%=day%+1:IF day%=7 THEN GOSUB addweek
  679. xyptab 64,197:PRINT day$(day%)
  680. xyptab 5,197:PRINT " "
  681. RETURN
  682. addweek:
  683. week%=week%+1:day%=0
  684. IF week%=53 THEN week%=1
  685. xyptab 186,197:WRITE week%
  686. FOR t%=0 TO 1
  687. IF morg&(t%,5)>0 THEN GOSUB paymorg
  688. NEXT
  689. IF week% => duration%+1 THEN gflag%=1:GOTO gameend
  690. RETURN
  691. market:
  692. COLOR 5,10
  693. r%=INT(RND*20)
  694. r%=r%-10
  695. finishy%=starty%+r%
  696. IF finishy%>245 THEN finishy%=245
  697. IF finishy%<196 THEN finishy%=196
  698. SCROLL (224,196)-(304,245),-3,0
  699. LINE(startx%-3,starty%)-(startx%,finishy%),5
  700. starty%=finishy%:COLOR 10,3
  701. RETURN
  702. sc1:
  703. x1%=217:x2%=311:y1%=11:ystep%=39:gap%=3:no.but%=4
  704. RETURN
  705. interuptmouse:
  706. g%=MOUSE(0)
  707. x%=MOUSE(1):y%=MOUSE(2)
  708. IF x%>217 AND x%<310 AND y%>132 AND y%<163 THEN 
  709. GOSUB fillstart:GOTO st.stop
  710. END IF
  711. RETURN
  712. st.stop:
  713. MOUSE OFF:TIMER OFF
  714. BEEP
  715. gostop%=1:GOSUB menuset
  716. diff%=220-finishy%
  717. RETURN
  718. waiting:
  719. GOSUB mousepointer
  720. IF x%>x1% AND x%<x2% THEN GOSUB checkpointer:GOTO action
  721. GOTO waiting
  722. fillstart:
  723. AREA (217,129):AREA (311,129)
  724. AREA (311,164):AREA (217,164)
  725. AREAFILL 1
  726. GOTO checkmouse
  727. player:
  728. OBJECT.OFF
  729. GET (142,72)-(260,136),getput%
  730. LINE (142,72)-STEP(118,48),5,b
  731. LINE (143,73)-STEP(116,22),24,bf
  732. LINE (143,96)-STEP(117,0),5
  733. LINE (143,97)-STEP(116,22),25,bf
  734. LINE (142,120)-STEP(118,16),5,b
  735. LINE (143,121)-STEP(116,14),10,bf
  736. COLOR 26,24:LOCATE 11,19
  737. PRINT "Co. "co.name$(0)
  738. PRINT :PRINT:COLOR 26,25 
  739. PRINT TAB(19)"Co. "co.name$(1)
  740. COLOR 9,10:xyptab 145,131
  741. PRINT "OOPS! Boo-Boo!"
  742. loopy:
  743. GOSUB mousepointer
  744. IF x%<142 OR x%>260 THEN loopy
  745. IF y%>72 AND y%<94 THEN player%=0:GOTO out
  746. IF y%>97 AND y%<120 THEN player%=1:GOTO out
  747. IF y%>120 AND y%<137 THEN player%=-1:GOTO out
  748. GOTO loopy
  749. out: 
  750. PUT (142,72),getput%,PSET
  751. OBJECT.ON
  752. GOSUB checkmouse
  753. RETURN
  754. action:
  755. ON mouseclick% GOTO bank,tdept,salesyard,s.go,loop
  756. GOTO finish
  757. bank:
  758. GOSUB buttonpress:GOSUB player
  759. IF player%=-1 THEN waiting
  760. IF shval%<>diff% THEN GOSUB sprices
  761. shval%=diff%
  762. IF win6%=2 THEN WINDOW(6):GOTO bankscreen 
  763. pic$="bank":win6%=2
  764. GOSUB sixscreen
  765. WINDOW OUTPUT 3
  766. PUT (59,140),getput%,PSET
  767. WINDOW 6
  768. GOTO bankscreen          
  769. tdept:
  770. GOSUB buttonpress:GOSUB player
  771. IF player%=-1 THEN waiting
  772. IF win6%=3 THEN WINDOW(6):GOTO officescreen  
  773. pic$="office":win6%=3
  774. GOSUB sixscreen
  775. WINDOW OUTPUT 3
  776. PUT (59,140),getput%,PSET
  777. WINDOW 6
  778. GOTO officescreen 
  779. salesyard:
  780. GOSUB buttonpress:GOSUB player
  781. IF player%=-1 THEN waiting
  782. IF win2%=2 THEN WINDOW(2):GOTO salescreen
  783. pic$="sales":win2%=2
  784. GOSUB secscreen 
  785. GOTO salescreen
  786. secscreen:          
  787. GOSUB message
  788. WINDOW OUTPUT 2
  789. cblocks%=4:colours&=32:bytes&=10240
  790. GOSUB loadscreen
  791. WINDOW OUTPUT 3
  792. PUT (59,140),getput%,PSET
  793. RETURN
  794. sixscreen:
  795. GOSUB message
  796. WINDOW OUTPUT 6
  797. cblocks%=4:colours&=32:bytes&=10240
  798. GOSUB loadscreen
  799. RETURN
  800. threscreen:
  801. WINDOW OUTPUT 4
  802. cblocks%=2:colours&=8:bytes&=8000
  803. GOSUB loadscreen
  804. RETURN
  805. s.go:
  806. GOSUB fillstart
  807. gostop%=0
  808. GOSUB menuset
  809. ON MOUSE GOSUB interuptmouse
  810. ON TIMER(1) GOSUB market
  811. MOUSE ON:TIMER ON
  812. GOTO loop
  813. message:
  814. GET (59,140)-STEP(88,32),getput%
  815. LINE (59,140)-STEP(88,32),5,b
  816. LINE (60,141)-STEP(86,30),20,bf
  817. COLOR 1,20
  818. xyptab 68,153: PRINT " LOADING "
  819. xyptab 64,165: PRINT "NEW SCREEN"
  820. RETURN
  821. reverseblock:
  822. gg%=x2%-x1%:gb%=x1%-x2%
  823. AREA (x1%,st%):AREA STEP (gg%,0)
  824. AREA STEP (0,ystep%-gap%):AREA STEP (gb%,0)
  825. AREAFILL 1
  826. RETURN
  827. buttonpress:
  828. GOSUB reverseblock:GOSUB checkmouse:GOTO reverseblock
  829. loadscreen:
  830. b&=AllocMem&(64,65537&)
  831. IF b&=0 THEN ERROR 7
  832. file$="screens:"+pic$+CHR$(0)
  833. h&=xOpen&(SADD(file$),1005)
  834. viewport&=PEEKL(WINDOW(7)+46)+44
  835. CALL LoadRGB4(viewport&,b&,colours&)
  836. FOR i%=0 TO cblocks%
  837. ad&=PEEKL(PEEKL(WINDOW(8)+4)+8+4*i%)
  838. r&=xRead&(h&,ad&,bytes&)
  839. NEXT
  840. r&=xRead&(h&,b&,64)
  841. CALL xClose(h&)
  842. CALL LoadRGB4(viewport&,b&,colours&)
  843. CALL FreeMem(b&,64)
  844. RETURN
  845. finish:
  846. MENU RESET
  847. LIBRARY CLOSE
  848. TIMER STOP:MOUSE OFF
  849. OBJECT.CLOSE
  850. WINDOW CLOSE 6
  851. WINDOW CLOSE 5
  852. WINDOW CLOSE 2
  853. WINDOW CLOSE 3
  854. WINDOW CLOSE 4
  855. SCREEN CLOSE 4
  856. SCREEN CLOSE 2
  857. SCREEN CLOSE 3
  858. SCREEN CLOSE 1
  859. WINDOW 1,"OK",(0,0)-(600,30),0,-1
  860. CHDIR "DF0:"
  861. END
  862. salescreen:
  863. WINDOW 2
  864. x1%=116:x2%=206:y1%=38:ystep%=20:gap%=4:no.but%=4
  865. GOSUB mousepointer     
  866. IF y%>14 AND x%<92 AND y%<42 THEN WINDOW(3):GOSUB sc1:GOTO waiting
  867. GOSUB check.b.screen
  868. IF mouseclick%<5 THEN
  869. GOSUB buttonpress
  870. IF day%=6 THEN sunday
  871. IF tc%<8 OR tc%>22 THEN yardclosed
  872. IF tract%(player%,0)>0 THEN ttime
  873. ON mouseclick% GOTO newtrucks,owner1,owner2,selltrucks
  874. END IF
  875. GOTO salescreen
  876. newtrucks: 
  877. IF win6%=4 THEN sixok
  878. pic$="1owner":GOSUB sixscreen:ttype%=0:win6%=4:GOTO buytrucks
  879. owner1:
  880. IF win6%=5 THEN sixok       
  881. pic$="1owner":GOSUB sixscreen:ttype%=2:win6%=5:GOTO buytrucks
  882. owner2:
  883. IF win6%=6 THEN sixok
  884. pic$="2hand":GOSUB sixscreen:ttype%=4:win6%=6:GOTO buytrucks        
  885. sixok:
  886. e%=55:WINDOW OUTPUT 6:GOTO buytrucks          
  887. bs:
  888. DATA 70,141,100,19,5,3
  889. bs1:
  890. DATA 164,235,100,19,5,3
  891. bankscreen:
  892. GOSUB exscreen
  893. IF x%>124 AND y%>180 AND x%<184 AND y%<200 THEN
  894. WINDOW(3):GOSUB sc1:GOTO waiting 
  895. END IF
  896. IF x% <160 THEN RESTORE bs ELSE RESTORE bs1
  897. READ x1%,x2%,y1%,ystep%,gap%,no.but%
  898. GOSUB check.b.screen
  899. IF mouseclick%<4 THEN GOSUB buttonpress:GOTO bankaction
  900. GOTO bankscreen
  901. bankaction:
  902. GOSUB message
  903. IF x%>160 THEN mouseclick%=mouseclick%+3
  904. ON mouseclick% GOTO p.mortgage,plas,bbuyshares,omorg,balance,ssellshares
  905. officescreen:
  906. GOSUB exscreen
  907. IF x%<186 AND x%>129 AND y%<47 AND y%>17 THEN returnmain1
  908. IF y%<11 OR y%>53 THEN officescreen
  909. IF x%<120 AND x%>4 THEN speeding
  910. IF x%>193 AND x%<310 THEN find
  911. GOTO officescreen
  912. checkpointer:
  913. mouseclick%=0
  914. FOR tt%=y1% TO y1%+(no.but%*ystep%) STEP ystep%
  915. mouseclick%=mouseclick%+1
  916. IF y%>tt% AND y%<tt%+(ystep%-gap%) THEN st%=tt%:tt%=y1%+(no.but%*ystep%)
  917. NEXT
  918. RETURN
  919. check.b.screen:
  920. IF x%>x1% AND x%<x2% THEN GOTO checkpointer
  921. mouseclick%=50
  922. RETURN
  923. buytrucks:
  924. IF e%<>55 THEN
  925. WINDOW OUTPUT 2
  926. PUT (59,140),getput%,PSET
  927. WINDOW OUTPUT 6
  928. END IF
  929. GOSUB truprice:COLOR 1,23
  930.  IF ttype%=0 THEN
  931.    GET (125,20)-STEP(88,34),getput%
  932. LINE (125,20)-STEP(88,34),5,b
  933. LINE (126,21)-STEP(86,32),20,bf
  934. COLOR 1,20
  935.  
  936.    GET (87,141)-STEP(123,32),getput%
  937. LINE (87,141)-STEP(123,32),5,b
  938. LINE (88,142)-STEP(121,30),20,bf
  939. COLOR 1,20
  940.  
  941.    LOCATE 4,18:PRINT "MACK D500"
  942.    LOCATE 19,12:PRINT "WHITE ROAD BOSS"
  943. END IF
  944.  
  945. LOCATE 6,18:PRINT "$"truck&(0)
  946. LOCATE 21,16:PRINT "$"truck&(1)
  947. COLOR 31,21
  948. xyptab 227,155: PRINT co.name$(player%)
  949. rfile%=mouseclick%:e%=0
  950. ccc:
  951. COLOR 5,21
  952. xyptab 236,170: PRINT "        "
  953. xyptab 236,170: WRITE money&(player%) 
  954. tchoice%=0
  955. WINDOW 6
  956. cccc:
  957. GOSUB mousepointer
  958. IF x%<213 AND y%<126 THEN mack
  959. IF x%<213 AND y%>125 THEN toyo
  960. IF x%>238 AND y%<114 THEN xbuttons
  961. GOTO cccc
  962. xbuttons:
  963. x1%=236:x2%=287:y1%=29:ystep%=34:gap%=18:no.but%=3
  964. GOSUB check.b.screen
  965. IF mouseclick%<4 THEN GOSUB buttonpress:GOTO taction
  966. GOTO cccc
  967. taction:
  968. ON mouseclick% GOTO getname,tinfo,exxit
  969. tinfo:
  970. IF tchoice%=0 THEN cccc
  971. GOTO info2
  972. mack: 
  973. IF tchoice%=2 THEN toyo 
  974. x1%=135:x2%=209:ystep%=23:gap%=0:st%=26
  975. sh%=135:blocky%=209:randy%=23:batchs%=26
  976. IF ttype%=0 THEN x1%=125:x2%=213:sh%=125:blocky%=213:ystep%=33:st%=21
  977. GOSUB reverseblock
  978. IF tchoice%<>0 THEN tchoice%=0 ELSE tchoice%=1
  979. GOSUB checkmouse
  980. ON tchoice% GOTO cccc
  981. GOTO cccc
  982. toyo:
  983. IF tchoice%=1 THEN mack
  984. x1%=96:x2%=209:ystep%=27:gap%=0:st%=145
  985. sh%=96:blocky%=209:randy%=27:batchs%=145
  986. IF ttype%=0 THEN x1%=87:sh%=87:ystep%=33:st%=140
  987. GOSUB reverseblock
  988. IF tchoice%<>0 THEN tchoice%=0 ELSE tchoice%=2
  989. GOSUB checkmouse
  990. ON tchoice% GOTO cccc,cccc
  991. GOTO cccc
  992. trucks5:
  993. rfile%=5:GOSUB getrand
  994. WINDOW 4:GOSUB checkmouse:GOSUB mousepointer
  995. GOTO gb     
  996. getname:
  997. IF tchoice%=0 THEN cccc
  998. WINDOW OUTPUT 4
  999. IF win4%<>14 THEN fontset "t.sales",8
  1000. PALETTE 0, .41,.41,.41
  1001. PALETTE 1, .41,.41,.41
  1002. PALETTE 2, 1,1,1
  1003. PALETTE 3, 0,0,0
  1004. PALETTE 4, 0,0,1
  1005. PALETTE 5, .69,.37,.07
  1006. PALETTE 6, .73,0,0
  1007. PALETTE 7, .35,.16,.6
  1008. COLOR 0,0:CLS:win4%=14
  1009. LINE (30,10)-STEP(240,137),5,bf
  1010. LINE (271,11)-(271,148),3
  1011. LINE (270,148)-(31,148),3
  1012. COLOR 3,5:LOCATE 3,1
  1013. IF tcount%(player%)=5 THEN trucks5
  1014. GOSUB getrand
  1015. PRINT:PRINT TAB(22)"%"
  1016. LINE (158,44)-STEP(106,15),7,bf
  1017. LINE (140,124)-STEP(23,15),7,bf
  1018. COLOR 6,2:LOCATE 20,11
  1019. PRINT " CLICK IN NAME BOX ";
  1020. WINDOW 4
  1021. GOSUB mousepointer
  1022. y%=7:x%=21:c1%=2:c2%=7:lo%=32:hi%=90:maxlen%=12
  1023. GOSUB gtname
  1024. IF w$="" THEN gb
  1025. tname$(player%,tcount%(player%))=w$
  1026. x%=19:y%=17:lo%=48:hi%=57:maxlen%=2
  1027. GOSUB gtname
  1028. fuel%=VAL(w$)
  1029. IF fuel%+deposit%>100 THEN 
  1030. fuel%=100-deposit%
  1031. END IF
  1032. mgage%=fuel%+deposit%
  1033. tcost&=(truck&(tchoice%-1)/100)*mgage%
  1034. IF tcost&>money&(player%) THEN 
  1035. c1%=4:c2%=6:c3%=tchoice%
  1036. tchoice%=7-ttype%:GOTO ext
  1037. END IF
  1038. RESTORE truckspecs
  1039. FOR t%=1 TO tchoice%+ttype%
  1040. READ b%,c%,d%,a%
  1041. NEXT
  1042. IF truck&(tchoice%-1)-tcost&>0 THEN morg&(player%,5)=morg&(player%,5)+1
  1043. morg&(player%,tcount%(player%))=truck&(tchoice%-1)-tcost&
  1044. truck%(player%,tcount%(player%),0)=-5
  1045. truck%(player%,tcount%(player%),1)=homeport%(player%)
  1046. truck%(player%,tcount%(player%),6)=homeport%(player%)
  1047. truck%(player%,tcount%(player%),2)=b%
  1048. truck%(player%,tcount%(player%),3)=INT(RND*b%)+1
  1049. truck%(player%,tcount%(player%),4)=d%
  1050. truck%(player%,tcount%(player%),7)=c%
  1051. truck%(player%,tcount%(player%),9)=19
  1052. truck%(player%,tcount%(player%),10)=tchoice%+ttype%
  1053. truck%(player%,tcount%(player%),12)=tcount%(player%)+1
  1054. truck%(player%,tcount%(player%),16)=a%
  1055. truck%(player%,tcount%(player%),17)=0
  1056. tract%(player%,0)=12
  1057. IF player%=1 THEN
  1058. truck%(player%,tcount%(player%),12)=tcount%(player%)+6
  1059. END IF
  1060. money&(player%)=money&(player%)-tcost&
  1061. WINDOW OUTPUT 3
  1062. OBJECT.SHAPE truck%(player%,tcount%(player%),12),sprite$(player%)
  1063. OBJECT.X truck%(player%,tcount%(player%),12),cityx%(homeport%(player%))
  1064. OBJECT.Y truck%(player%,tcount%(player%),12),cityy%(homeport%(player%))
  1065. tmove!(player%,tcount%(player%),2)=cityx%(homeport%(player%))
  1066. tmove!(player%,tcount%(player%),3)=cityy%(homeport%(player%))
  1067. WINDOW 4
  1068. tcount%(player%)=tcount%(player%)+1
  1069. c1%=6:c2%=4
  1070. ext:
  1071. LINE (53,20)-STEP(200,68),c2%,bf
  1072. LINE (254,21)-(254,89),3
  1073. LINE (253,89)-(54,89),3
  1074. COLOR 2,c2%:LOCATE 4,13
  1075. PRINT "CONGRATULATIONS"
  1076. PRINT 
  1077. GOSUB comment
  1078. cc:
  1079. LINE (134,65)-STEP(40,20),c1%,bf
  1080. LINE (175,66)-(175,86),3
  1081. LINE (174,86)-(135,86),3
  1082. COLOR 3,c1%:LOCATE 10,19:PRINT "OK"
  1083. IF tchoice%+ttype%=7 THEN
  1084. tcost&=(truck&(c3%-1)/100)*2
  1085. money&(player%)=money&(player%)-tcost&
  1086. tchoice%=c3%
  1087. tname$(player%,tcount%(player%))=""
  1088. END IF
  1089. GOSUB exscreen:GOTO exxit 
  1090. rblock:
  1091. add%= WINDOW(0)
  1092. x1%=sh%:x2%=blocky%:ystep%=randy%:gap%=0:st%=batchs%
  1093. WINDOW OUTPUT 6:GOSUB reverseblock
  1094. WINDOW add%:RETURN 
  1095. gb:
  1096. WINDOW 6:GOSUB checkmouse:GOTO cccc
  1097. truckspecs:
  1098. DATA 1500,35,5,99
  1099. DATA 1350,30,5,99
  1100. DATA 1300,25,5,80
  1101. DATA 950,20,5,80
  1102. DATA 850,15,4,60
  1103. DATA 550,8,5,60
  1104. info2:
  1105. WINDOW OUTPUT 4
  1106. IF win4%<>14 THEN fontset "t.sales",8
  1107. win4%=14
  1108. PALETTE 0,.39,.39,.39
  1109. PALETTE 1,.39,.39,.39
  1110. PALETTE 2,0,0,0
  1111. PALETTE 3,1,1,1
  1112. COLOR 0,0:CLS
  1113. LINE (15,20)-(295,130),2,b
  1114. COLOR 3,0 :LOCATE 4,1  
  1115. GOSUB t.info       
  1116. WINDOW 4
  1117. GOSUB checkmouse:GOSUB mousepointer
  1118. GOTO gb             
  1119. exxit:
  1120. IF tchoice% <>0 THEN GOSUB rblock
  1121. WINDOW 2:GOSUB checkmouse:GOTO salescreen
  1122. truckdata:
  1123. DATA 200000,145000,40,75000,45000,50,18000,8000,80
  1124. truprice:
  1125. RESTORE truckdata
  1126. FOR t%=1 TO mouseclick%
  1127. READ truck1&,truck2&,deposit%
  1128. NEXT
  1129. truck&(0)=truck1&+((truck1&/100)*diff%)
  1130. truck&(1)=truck2&+((truck2&/100)*diff%)
  1131. RETURN
  1132. getrand:
  1133. OPEN "R",#1,"ram:TRUCKIN.ON.",196
  1134. FIELD #1,28 AS a$,28 AS b$,28 AS c$,28 AS d$,28 AS e$,28 AS F$,28 AS g$
  1135. GET #1,rfile%
  1136. PRINT TAB(6) a$:PRINT 
  1137. PRINT TAB(6) b$:PRINT 
  1138. PRINT TAB(6) c$:PRINT 
  1139. PRINT TAB(6) d$:PRINT 
  1140. PRINT TAB(6) e$:PRINT 
  1141. PRINT TAB(6) F$:PRINT 
  1142. PRINT TAB(6) g$:PRINT 
  1143. CLOSE#1
  1144. RETURN
  1145. comment:
  1146. OPEN "R",#1,"ram:1MEGABYTE",48
  1147. FIELD #1,24 AS a$,24 AS b$
  1148. GET #1,tchoice%+ttype%
  1149. PRINT TAB(8) a$
  1150. PRINT TAB(8) b$
  1151. CLOSE #1:RETURN
  1152. t.info:
  1153. OPEN "R",#1,"ram:OF.MEMORY",275
  1154. 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$
  1155. GET #1,tchoice%+ttype%
  1156. PRINT TAB(4)a$
  1157. PRINT 
  1158. PRINT TAB(4)b$
  1159. PRINT TAB(4)c$
  1160. PRINT TAB(4)d$
  1161. PRINT 
  1162. PRINT TAB(4)e$
  1163. PRINT 
  1164. PRINT TAB(4)F$
  1165. PRINT TAB(4)g$
  1166. PRINT TAB(4)h$
  1167. PRINT TAB(4)i$
  1168. PRINT TAB(4)j$
  1169. CLOSE #1:RETURN
  1170. selltrucks:
  1171. WINDOW OUTPUT 4
  1172. IF win4%<>15 THEN fontset "selltruck",13
  1173. PALETTE 0, 0,0,0
  1174. PALETTE 1, 1,0,0
  1175. PALETTE 2, 0,0,1
  1176. PALETTE 3, .5,.5,.5
  1177. PALETTE 4, 1,1,0
  1178. PALETTE 5, 0,1,1
  1179. PALETTE 6, 1,0,1
  1180. PALETTE 7, 1,1,1
  1181. COLOR 0,0:CLS:win4%=15
  1182. IF diff%<-5 THEN a$="(VERY POOR)":GOTO sss
  1183. IF diff%<10 THEN a$="(ONLY FAIR)":GOTO sss
  1184. IF diff%>9 THEN a$="(DESPERATE)"      
  1185. sss:
  1186. COLOR 7,2:PRINT "( TRUCK DEMAND )";
  1187. COLOR 2,7:PRINT TAB(20)a$
  1188. COLOR 7,3:PRINT :PRINT "(TRUCK NAME)"TAB(16)"(M/GE)"TAB(25)"(VALUE)"
  1189. COLOR 2,4:LOCATE 15,3
  1190. PRINT "(SELL RIG)"TAB(19)"(KEEP RIG)";
  1191. COLOR 5-player%,player%+1
  1192. LOCATE 5,1:x%=0:randy%=0
  1193. FOR t%=0 TO 4
  1194. y%=LEN(tname$(player%,t%))
  1195. IF y%>0 THEN GOSUB nprint ELSE t%=4
  1196. x%=x%+1:y%=0
  1197. NEXT:tchoice%=52+(13*x%)
  1198. WINDOW 4
  1199. x1%=0:x2%=139:y1%=53:ystep%=13:gap%=1:no.but%=x%
  1200. ctruck:
  1201. GOSUB exscreen
  1202. IF y%>tchoice% AND y%<182 THEN ctruck
  1203. IF y%>182 THEN kbutt
  1204. GOSUB check.b.screen
  1205. IF mouseclick%<=no.but% THEN chooserig
  1206. GOTO ctruck
  1207. chooserig:
  1208. IF randy%=mouseclick% THEN
  1209. st%=39+(13*randy%):GOSUB reverseblock:randy%=0:GOTO ctruck
  1210. END IF
  1211. IF randy%<>0 THEN st%=39+(13*randy%):GOSUB reverseblock
  1212. st%=39+(13*mouseclick%):GOSUB reverseblock
  1213. randy%=mouseclick%
  1214. GOTO ctruck
  1215. outy:
  1216. WINDOW 2:GOTO salescreen       
  1217. nprint:
  1218. PRINT "("tname$(player%,t%)STRING$(12-y%," ")")";
  1219. a$=STR$(morg&(player%,t%))
  1220. y%=LEN(a$):a$=MID$(a$,2,y%-1)
  1221. PRINT TAB(15)"("a$")";
  1222. GOSUB calprice
  1223. a$=STR$(truck&)
  1224. y%=LEN(a$):a$=MID$(a$,2,y%-1)
  1225. PRINT TAB(24)"("a$")"
  1226. RETURN
  1227. calprice:
  1228. y%=truck%(player%,t%,10)
  1229. truck&(1)=((trprice%(y%)*1000)+((trprice%(y%)*10)*diff%))
  1230. truck&(1)=truck&(1)-(truck&(1)/15)
  1231. truck&(0)=truck&(1)/100
  1232. truck&=truck&(0)*truck%(player%,t%,16)
  1233. RETURN
  1234. kbutt:
  1235. IF x%>179 AND x%<281 THEN outy
  1236. IF x%>20 AND x%<193 THEN struck
  1237. GOTO ctruck
  1238. struck:
  1239. IF randy%=0 THEN BEEP:GOTO ctruck
  1240. t%=mouseclick%-1
  1241. GOSUB calprice
  1242. truck&=truck&-morg&(player%,t%)
  1243. IF morg&(player%,t%)>0 THEN morg&(player%,5)=morg&(player%,5)-1
  1244. LOCATE 13,1:COLOR 0,4
  1245. PRINT "( YOU COLLECT ) $";
  1246. WRITE truck&
  1247. WINDOW OUTPUT 3:
  1248. randy%=truck%(player%,tcount%(player%)-1,12)
  1249. money&(player%)=money&(player%)+truck&
  1250. FOR x%=t% TO tcount%(player%)-1
  1251. morg&(player%,x%)=morg&(player%,x%+1)
  1252. tname$(player%,x%)=tname$(player%,x%+1)
  1253. FOR y%=0 TO 20
  1254. truck%(player%,x%,y%)=truck%(player%,x%+1,y%)
  1255. NEXT y%
  1256. FOR y%=0 TO 5
  1257. tmove!(player%,x%,y%)=tmove!(player%,x%+1,y%)
  1258. NEXT y%
  1259. NEXT x%
  1260. tcount%(player%)=tcount%(player%)-1
  1261. tract%(player%,0)=12
  1262. y%=0:IF player%=1 THEN y%=5
  1263. FOR x%=1 TO 5:truck%(player%,x%-1,12)=x%+y%:NEXT
  1264. IF tcount%(player%)>0 THEN
  1265. FOR x%=t% TO tcount%(player%)-1
  1266. OBJECT.X truck%(player%,x%,12),tmove!(player%,x%,2)
  1267. OBJECT.Y truck%(player%,x%,12),tmove!(player%,x%,3)
  1268. NEXT
  1269. END IF
  1270. OBJECT.CLOSE randy%
  1271. GOSUB exscreen
  1272. GOTO outy
  1273. gameend:
  1274. MOUSE OFF:TIMER OFF
  1275. OBJECT.OFF
  1276. GET (142,72)-(280,119),getput%
  1277. LINE (142,72)-(280,119),10,b
  1278. LINE (143,73)-(279,118),24,bf
  1279. COLOR 5,24:LOCATE 11,20
  1280. PRINT "TIME'S EXPIRED"
  1281. PRINT TAB(20)"MY FRIENDS." 
  1282. PRINT TAB(20)"CHECK BANK FOR"  
  1283. PRINT TAB(20)"THE VICTOR."
  1284. IF gostop%=0 THEN GOSUB fillstart
  1285. GOSUB st.stop
  1286. GOSUB checkmouse
  1287. GOSUB mousepointer
  1288. PUT (142,72),getput%,PSET
  1289. OBJECT.ON
  1290. RETURN
  1291. paymorg:
  1292. MOUSE OFF:TIMER OFF
  1293. GOSUB msquare
  1294. WINDOW OUTPUT 4
  1295. IF win4%>6 THEN fontset "topaz",8
  1296. pic$="morg":GOSUB threscreen
  1297. WINDOW OUTPUT 3
  1298. PUT (142,72),getput%,PSET
  1299. WINDOW 4:COLOR 5-t%,1
  1300. xyptab 114,69:PRINT co.name$(t%)
  1301. y%=102:truck&=0
  1302. FOR randy%=0 TO tcount%(t%)-1
  1303. xyptab 38,y%:PRINT tname$(t%,randy%)
  1304. xyptab 144,y%:PRINT morg&(t%,randy%)
  1305. truck&=truck&+(morg&(t%,randy%)/100)*8
  1306. xyptab 222,y%:PRINT INT((morg&(t%,randy%)/100)*8)
  1307. y%=y%+14
  1308. NEXT
  1309. xyptab 234,172:WRITE truck&
  1310. money&(t%)=money&(t%)-truck&
  1311. win4%=5
  1312. GOSUB exscreen
  1313. WINDOW(3):GOSUB sc1:OBJECT.ON
  1314. IF gostop%=0 THEN TIMER ON:MOUSE ON
  1315. COLOR 10,3
  1316. RETURN
  1317. msquare:
  1318. OBJECT.OFF
  1319. GET (142,72)-(280,119),getput%
  1320. LINE (142,72)-(280,119),10,b
  1321. LINE (143,73)-(279,118),24+t%,bf
  1322. COLOR 26,24+t%:LOCATE 11,20
  1323. PRINT "Co. "co.name$(t%)
  1324. PRINT  
  1325. PRINT TAB(20)"WEEKLY MORTGAGE"  
  1326. PRINT TAB(20)"IS NOW DUE!."
  1327. RETURN
  1328. sharetime:
  1329. GOSUB noen
  1330. GET (85,72)-(223,119),getput%
  1331. LINE (85,72)-(223,119),2,b
  1332. LINE (86,73)-(222,118),5,bf
  1333. COLOR 0,5:LOCATE 11,13
  1334. PRINT "12 Hours. must"
  1335. PRINT TAB(13)" ELAPSE before"
  1336. PRINT TAB(13)"entry to market"
  1337. PRINT TAB(13)"is granted!. OK"
  1338. GOTO noshareboy
  1339. noshareboy:
  1340. GOSUB exscreen
  1341. PUT (85,72),getput%,PSET
  1342. GOTO bankscreen
  1343. shareclosed:
  1344. GOSUB noen
  1345. GET (85,72)-(223,119),getput%
  1346. LINE (85,72)-(223,119),3,b
  1347. LINE (86,73)-(222,118),0,bf
  1348. COLOR 31,0:LOCATE 11,13
  1349. PRINT "The Stockmarket"
  1350. PRINT TAB(13)"opens at 7 AM. "
  1351. PRINT TAB(13)"and closes 5 PM"
  1352. PRINT TAB(13)"See you then OK"
  1353. GOTO noshareboy
  1354. sunshare:
  1355. GOSUB noen
  1356. GET (85,72)-(223,119),getput%
  1357. LINE (85,72)-(223,119),0,b
  1358. LINE (86,73)-(222,118),16,bf
  1359. COLOR 3,16:LOCATE 11,13
  1360. PRINT "The Stockmarket"
  1361. PRINT TAB(13)"don't open on"
  1362. PRINT TAB(13)"the SABBATH."
  1363. PRINT TAB(13)"Come back later"
  1364. GOTO noshareboy
  1365. noyard:
  1366. GOSUB exscreen
  1367. PUT (85,72),getput%,PSET
  1368. GOTO salescreen
  1369. yardclosed:
  1370. GOSUB setfonty
  1371. LINE (86,73)-(222,118),21,bf
  1372. COLOR 31,21:LOCATE 11,13
  1373. PRINT "Our operating"
  1374. PRINT TAB(13)"hours are from"
  1375. PRINT TAB(13)"7 AM to 9 PM. "
  1376. PRINT TAB(13)"To bad ah!."
  1377. GOTO noyard
  1378. ttime:
  1379. GOSUB setfonty
  1380. LINE (86,73)-(222,118),1,bf
  1381. COLOR 19,1:LOCATE 11,13
  1382. PRINT "We'll only serve"
  1383. PRINT TAB(13)"one customer at"
  1384. PRINT TAB(13)"a time. You've"
  1385. PRINT TAB(13)"been in today."
  1386. GOTO noyard
  1387. sunday:
  1388. GOSUB setfonty
  1389. LINE (86,73)-(222,118),16,bf
  1390. COLOR 6,16:LOCATE 11,13
  1391. PRINT "This yard isn't"
  1392. PRINT TAB(13)"allowed to open"
  1393. PRINT TAB(13)"on SUNDAY come"
  1394. PRINT TAB(13)"back tomorrow."
  1395. GOTO noyard
  1396. setfonty:
  1397. IF win2%<>3 THEN fontset "topaz",8
  1398. win2%=3:GET (85,72)-(223,119),getput%
  1399. LINE (85,72)-(223,119),0,b
  1400. RETURN
  1401. win4ok:
  1402. WINDOW OUTPUT 6:PUT (59,140),getput%,PSET
  1403. WINDOW 4:RETURN
  1404. noen:
  1405. PUT (59,140),getput%,PSET:RETURN
  1406. p.mortgage:
  1407. WINDOW OUTPUT 4
  1408. IF win4%<15 THEN fontset "selltruck",13
  1409. PALETTE 0, 0,0,0
  1410. PALETTE 1, 1,0,0
  1411. PALETTE 2, 0,0,1
  1412. PALETTE 3, .5,.5,.5
  1413. PALETTE 4, 1,1,0
  1414. PALETTE 5, 0,1,1
  1415. PALETTE 6, 1,0,1
  1416. PALETTE 7, 1,1,1
  1417. COLOR 0,0:CLS:win4%=16
  1418. COLOR 1+player%,7:LOCATE 2,2       
  1419. PRINT "(AUST.BANK PAY MORTGAGE DEPT)"
  1420. COLOR 7,1+player%
  1421. PRINT :PRINT "("co.name$(player%)")"TAB(13)"(CAPITAL)$        )";
  1422. LOCATE 4,23:WRITE money&(player%)
  1423. COLOR 5-player%,player%+1
  1424. LOCATE 7,1:x%=0:randy%=0
  1425. FOR t%=0 TO 4
  1426. y%=LEN(tname$(player%,t%))
  1427. IF y%>0 THEN 
  1428. PRINT "("tname$(player%,t%)STRING$(12-y%," ")")"
  1429. x%=x%+1
  1430. ELSE 
  1431. t%=4
  1432. END IF
  1433. NEXT
  1434. LOCATE 14,2:COLOR 2,5
  1435. PRINT "( SEE YA LATER )"
  1436. LOCATE 6,17:COLOR 7,player%+1
  1437. PRINT "(AMOUNT OWING)"
  1438. PRINT TAB(17)"(ON THIS RIG )"
  1439. PRINT TAB(17)"(IS.$        )"
  1440. PRINT TAB(17)"(I'LL PAYOFF )"
  1441. COLOR 5,2
  1442. PRINT TAB(17)"(100%#50%#25%)"
  1443. GOSUB win4ok
  1444. x1%=0:x2%=139:y1%=79:ystep%=13:gap%=1:no.but%=x%
  1445. ptruck:
  1446. GOSUB exscreen
  1447. IF y%>169 AND y%<185 AND x%>11 AND x%<170 THEN WINDOW 6:GOTO bankscreen
  1448. IF x%>162 THEN ppmm
  1449. GOSUB check.b.screen
  1450. IF mouseclick%<=no.but% THEN chooserigg
  1451. GOTO ptruck
  1452. chooserigg:
  1453. IF randy%=mouseclick% THEN
  1454. st%=65+(13*randy%):GOSUB reverseblock:randy%=0
  1455. LOCATE 8,22:PRINT "        "
  1456. GOTO ptruck
  1457. END IF
  1458. IF randy%<>0 THEN st%=65+(13*randy%):GOSUB reverseblock
  1459. st%=65+(13*mouseclick%):GOSUB reverseblock
  1460. randy%=mouseclick%
  1461. chrig:
  1462. COLOR 7,player%+1
  1463. LOCATE 8,22:PRINT "        "
  1464. LOCATE 8,22:WRITE morg&(player%,randy%-1)
  1465. GOTO ptruck
  1466. ppmm:
  1467. IF y% <118 OR y%>130 OR x%>301 THEN ptruck
  1468. IF x%<221 THEN e%=100: GOTO payee
  1469. IF x%<261 THEN e%=50:GOTO payee
  1470. e%=25
  1471. payee:
  1472. truck#=morg&(player%,randy%-1)/100
  1473. morg&(player%,randy%-1)=morg&(player%,randy%-1)-truck#*e%
  1474. money&(player%)=money&(player%)-((truck#*e%)+(2*truck#))
  1475. COLOR 7,1+player%
  1476. LOCATE 4,23:PRINT "        "
  1477. LOCATE 4,23:WRITE money&(player%)
  1478. IF morg&(player%,randy%-1)=0 THEN morg&(player%,5)=morg&(player%,5)-1
  1479. GOTO chrig
  1480. sprices:
  1481. RESTORE share.values
  1482. FOR t%=1 TO 5
  1483. READ value%
  1484. shareprice%(t%)=value%+INT(value%/200)*(diff%*INT(RND*3+1))
  1485. NEXT
  1486. RETURN
  1487. share.values:
  1488. DATA 250,450,650,850,1000
  1489. bbuyshares:
  1490. IF day%=6 THEN sunshare
  1491. IF tc%<8 OR tc%>18 THEN shareclosed
  1492. IF shares%(player%,0)>0 THEN sharetime
  1493. WINDOW OUTPUT 4
  1494. IF win4%<20 THEN fontset "truckdata",13
  1495. GOSUB shcolor
  1496. COLOR 0,1
  1497. win4%=21:CLS
  1498. LOCATE 1,1:COLOR 6,7
  1499. PRINT "(LEWIES ST/BROKERS: PURCHASING)"
  1500. xyptab 1,23:COLOR 5,0
  1501. PRINT "stocks`sold`in`batches`of`(100)"
  1502. xyptab 91,37
  1503. PRINT "i`will`spend`$100,000)" 
  1504. PRINT "brokerage`fee`(1%)
  1505. LOCATE 6,4:COLOR 5,2
  1506. PRINT "shares"TAB(17)"outlay"TAB(25)"batchs"
  1507. COLOR 3,4
  1508. FOR t%=0 TO 4
  1509. PRINT sharename$(t%)TAB(16)"$      )"TAB(25)"*#   #+"
  1510. NEXT
  1511. PRINT :COLOR 5,6 
  1512. PRINT "(";co.name$(player%);" CAPITAL)";
  1513. COLOR 3,4:PRINT TAB(21)"$         )"
  1514. PRINT:COLOR 4,7 
  1515. PRINT "(EXIT)"TAB(9)"(BUY)"TAB(16)"(CANCEL)";
  1516. screenon:
  1517. COLOR 3,4
  1518. GOSUB putshareprices:GOSUB mmm
  1519. GOSUB win4ok
  1520. nameshare%=0
  1521. waitt:
  1522. t%=0:GOSUB pointer
  1523. ON t% GOTO bottom,updown,sharetitle,batch100,b100000
  1524. GOTO waitt
  1525. buyshares:
  1526. IF nameshare%<1 THEN waitt
  1527. truck&=truck&+INT(truck&/100)
  1528. IF truck&>money&(player%) THEN nogoshares
  1529. money&(player%)=money&(player%)-truck&
  1530. shares%(player%,nameshare%)=shares%(player%,nameshare%)+batchs%
  1531. shares%(player%,0)=12
  1532. GOSUB mmm
  1533. GOTO cancel
  1534. nogoshares:
  1535. LOCATE 3,1:COLOR 7,6
  1536. PRINT "(YOU OVER ESTIMATED YOUR FUNDS)"
  1537. PRINT "(PENALTY FOR MY EXPENSES = 10%)"
  1538. PRINT "(        CLICK TO EXIT        )"
  1539. money&(player%)=money&(player%)-INT(truck&/10)
  1540. GOSUB exscreen
  1541. GOTO r.to.bank
  1542. up.data:
  1543. DATA 241,253,79,13,3,5
  1544. down.data:
  1545. DATA 296,308,79,13,3,5
  1546. updown:
  1547. IF x%<265 THEN 
  1548. RESTORE up.data :add%=1
  1549. ELSEIF x%<312 AND x%>284 THEN
  1550. RESTORE down.data :add%=-1
  1551. ELSE
  1552. GOTO waitt
  1553. END IF
  1554. READ x1%,x2%,y1%,ystep%,gap%,no.but%
  1555. GOSUB check.b.screen
  1556. IF nameshare% <>mouseclick% THEN waitt
  1557. GOSUB reverseblock
  1558. batchs%=batchs%+add%
  1559. IF batchs%=101 THEN
  1560. batchs%=100
  1561. ELSEIF batchs%=0 THEN
  1562. batchs%=1
  1563. ELSE
  1564. truck&=truck&+shareprice%(nameshare%)*add%
  1565. END IF
  1566. GOSUB reverseblock
  1567. u.d.screen:
  1568. LOCATE 6+mouseclick%,17: PRINT "      "
  1569. LOCATE 6+mouseclick%,17:WRITE truck&
  1570. LOCATE 6+mouseclick%,27:PRINT "   "
  1571. LOCATE 6+mouseclick%,27:WRITE batchs%
  1572. GOTO waitt
  1573. batch100:
  1574. IF nameshare%<1 THEN waitt
  1575. batchs%=100:truck&=shareprice%(nameshare%)*100
  1576. GOTO u.d.screen
  1577. b100000:
  1578. IF nameshare%<1 THEN waitt
  1579. batchs%=INT(100000&/shareprice%(nameshare%))
  1580. truck&=shareprice%(nameshare%)*batchs%
  1581. GOTO u.d.screen
  1582. cancel:
  1583. IF nameshare%<1 THEN waitt
  1584. truck&=shareprice%(nameshare%):batchs%=1
  1585. mouseclick%=nameshare%:nameshare%=0
  1586. x1%=1:x2%=128:y1%=79:ystep%=13:gap%=3:no.but%=5
  1587. st%=blocky%
  1588. GOSUB reverseblock
  1589. GOSUB checkmouse
  1590. GOTO u.d.screen
  1591. shtitle:
  1592. DATA 1,128,79,13,3,5
  1593. sharetitle:
  1594. x1%=1:x2%=128:y1%=79:ystep%=13:gap%=3:no.but%=5
  1595. GOSUB check.b.screen
  1596. IF mouseclick%<6 THEN selectshare  
  1597. GOTO waitt
  1598. selectshare:
  1599. IF nameshare%<>0 AND nameshare%<>mouseclick% THEN
  1600. mouseclick%=nameshare%:GOTO waitt
  1601. END IF
  1602. IF nameshare%=mouseclick% THEN GOTO cancel
  1603. GOSUB reverseblock:blocky%=st%:GOSUB checkmouse
  1604. nameshare%=mouseclick%:truck&=shareprice%(nameshare%)
  1605. GOTO waitt
  1606. bottom:
  1607. IF x%<62 THEN nameshare%=0:GOTO r.to.bank
  1608. IF x%>81 AND x%<132 THEN buyshares
  1609. IF x%>151 AND x%<232 THEN cancel
  1610. GOSUB checkmouse
  1611. GOTO waitt
  1612. mmm:
  1613. LOCATE 13,22:PRINT "         )"
  1614. LOCATE 13,22:WRITE money&(player%)
  1615. RETURN
  1616. r.to.bank:
  1617. WINDOW (6)
  1618. GOTO bankscreen
  1619. putshareprices:
  1620. batchs%=1
  1621. FOR t%=1 TO 5
  1622. LOCATE 6+t%,17
  1623. WRITE shareprice%(t%)
  1624. LOCATE 6+t%,27:WRITE batchs%
  1625. NEXT:RETURN
  1626. pointer:
  1627. GOSUB mousepointer
  1628. IF y%>15 AND y%<27 AND x%>260 THEN t%=4:RETURN
  1629. IF y%>29 AND y%<41 AND x%>223 THEN t%=5:RETURN
  1630. IF y%>182 THEN t%=1:RETURN  
  1631. IF y%<79 OR y>143 THEN t%=0:RETURN 
  1632. IF x%>241 THEN t%=2:RETURN  
  1633. IF x%<132 THEN t%=3:RETURN
  1634. RETURN
  1635. ssellshares:
  1636. IF day%=6 THEN sunshare
  1637. IF tc%<8 OR tc%>18 THEN shareclosed
  1638. IF shares%(player%,0)>0 THEN sharetime
  1639. WINDOW OUTPUT 4
  1640. IF win4%<20 THEN fontset "truckdata",13
  1641. COLOR 0,1:win4%=20:CLS
  1642. GOSUB shcolor
  1643. PALETTE 0,0,0,0
  1644. PALETTE 1,0,0,0
  1645. LOCATE 1,1:COLOR 6,7
  1646. PRINT "(LEWIES ST/BROKERS:    SELLING)"
  1647. PRINT :COLOR 5,0
  1648. PRINT "stocks`purchased`as`a`package" 
  1649. PRINT TAB(14)"brokerage`fee`(1%)
  1650. PRINT :COLOR 5,2
  1651. PRINT TAB(4)"shares"TAB(17)"value"TAB(25)"batchs"
  1652. setup:
  1653. LOCATE 7,1:COLOR 3,4 :sh%=0:nameshare%=0
  1654. FOR t%=1 TO 5
  1655. IF shares%(player%,t%)<>0 THEN GOSUB insert
  1656. NEXT
  1657. PRINT :COLOR 5,6:LOCATE 13,1
  1658. PRINT "(";co.name$(player%);" BANK)";
  1659. COLOR 3,4:PRINT TAB(21)"$         )"
  1660. GOSUB mmm
  1661. PRINT:COLOR 4,7 
  1662. PRINT "(EXIT)"TAB(9)"(SELL)"TAB(17)"(CANCEL)";
  1663. GOSUB win4ok
  1664. IF sh%=0 THEN GOSUB noshares
  1665. waittt:
  1666. t%=0 :GOSUB checkmouse
  1667. GOSUB pointer2
  1668. ON t% GOTO botto,sharename
  1669. GOTO waittt
  1670. sharename:
  1671. RESTORE shtitle
  1672. READ x1%,x2%,y1%,ystep%,gap%,no.but%
  1673. no.but%=sh%
  1674. GOSUB check.b.screen
  1675. IF mouseclick%<sh%+1 THEN hishare  
  1676. GOTO waittt
  1677. hishare:
  1678. IF nameshare%<>0 AND nameshare%<>mouseclick% THEN
  1679. mouseclick%=nameshare%:GOTO waittt
  1680. END IF
  1681. IF nameshare%=no%(mouseclick%) THEN cancell
  1682. GOSUB reverseblock:blocky%=st%:GOSUB checkmouse
  1683. nameshare%=no%(mouseclick%)
  1684. GOTO waittt
  1685. botto:
  1686. IF x%<62 THEN eee
  1687. IF x%>81 AND x%<141 THEN sellshares
  1688. IF x%>160 AND x%<241 THEN cancell
  1689. GOTO waittt
  1690. sellshares:
  1691. truck&=shareprice%(nameshare%)*shares%(player%,nameshare%)
  1692. IF truck& >10 THEN
  1693. truck&=truck&-INT(truck&/100)
  1694. money&(player%)=money&(player%)+truck&
  1695. shares%(player%,nameshare%)=0
  1696. shares%(player%,0)=12
  1697. END IF
  1698. AREA(0,78):AREA(310,78):AREA(310,145):AREA(0,145)
  1699. COLOR 0,0: AREAFILL 0
  1700. GOTO setup
  1701. cancell:
  1702. IF nameshare%<1 THEN waittt
  1703. GOSUB reverseblock:nameshare%=0
  1704. GOTO waittt
  1705. eee:
  1706. GOTO r.to.bank
  1707. noshares:
  1708. LOCATE 9,3:COLOR 7,6
  1709. PRINT "(YOU HAVE NO VALID SHARES)"
  1710. RETURN
  1711. insert:
  1712. LOCATE 7+sh%,1
  1713. PRINT sharename$(t%-1)TAB(16)"$      )"TAB(25)"(    )"
  1714. LOCATE 7+sh%,1
  1715. PRINT TAB(17);:WRITE shareprice%(t%)
  1716. LOCATE 7+sh%,1
  1717. PRINT TAB(26);:WRITE shares%(player%,t%)
  1718. sh%=sh%+1:no%(sh%)=t%
  1719. RETURN
  1720. pointer2:
  1721. GOSUB mousepointer
  1722. IF y%>182 THEN t%=1:RETURN  
  1723. IF y%<79 OR y%>143 THEN t%=0:RETURN 
  1724. IF x%<132 THEN t%=2:RETURN 
  1725. RETURN
  1726. GOTO bankscreen
  1727. menuset:
  1728. MENU 1,0,1," TRUCKIN ON OPTIONS "
  1729. MENU 1,1,gostop%,"   RESTART GAME     "
  1730. MENU 1,2,gostop%,"   SAVE THIS GAME   "
  1731. MENU 1,3,gostop%,"  LOAD A SAVED GAME "
  1732. MENU 1,4,gostop%," DELETE a SAVED game"
  1733. MENU 1,5,1,     "  RETURN TO A/BASIC "
  1734. MENU 2,0,1,""
  1735. MENU 3,0,1,""
  1736. MENU 4,0,1,""
  1737. RETURN
  1738. menumaster:
  1739. ON MENU(1) GOSUB rstart,savve,looad,delet,finish
  1740. PUT (0,0),topline%,PSET
  1741. RETURN
  1742. rstart:
  1743. ERASE credit&,tcount%,tract%,tname$,morg&,shares%,truck%,tmove!
  1744. DIM credit&(1),tcount%(1),tract%(1,1),tname$(1,5)
  1745. DIM morg&(1,5),shares%(1,5),truck%(1,5,20),tmove!(1,5,5)
  1746. money&(1)=10000&:money&(0)=10000&:finishy%=220
  1747. day%=0:tc%=0:am%=8:week%=1:shval%=1:startx%=300:starty%=220
  1748. WINDOW OUTPUT 3:OBJECT.CLOSE
  1749. GOTO newstart
  1750. delet:
  1751. b$="SCRUB"
  1752. GOSUB setdirectory
  1753. IF w$="" THEN WINDOW 3:RETURN
  1754. IF RIGHT$(w$,1)<>"*" THEN 
  1755. LOCATE 10,24:PRINT "FILE NOT FOUND"
  1756. BEEP:GOSUB mousepointer
  1757. GOTO delet
  1758. END IF
  1759. LOCATE 10,24:PRINT "DELETING FILE"
  1760. KILL "main:games/"+w$
  1761. WINDOW 3
  1762. RETURN
  1763. savve:
  1764. b$="SAVE"
  1765. GOSUB setdirectory
  1766. IF w$="" THEN WINDOW 3:RETURN
  1767. IF count%>13 THEN
  1768. LOCATE 24,1:PRINT "I CAN'T FIT ANY MORE GAMES ON THE DISC! sorry?";
  1769. GOSUB checkmouse:GOSUB mousepointer
  1770. WINDOW 3:RETURN
  1771. END IF 
  1772. IF RIGHT$(w$,1)<>"*" THEN w$=w$+"*"
  1773. LOCATE 10,24:PRINT "SAVING FILE"
  1774. a$="main:games/"+w$
  1775. OPEN a$ FOR OUTPUT AS #1
  1776. FOR x%=0 TO 1
  1777. PRINT #1,credit&(x%):PRINT #1,homeport%(x%):PRINT #1,co.name$(x%)
  1778. PRINT #1,tcount%(x%):PRINT #1,money&(x%):PRINT #1,tract%(x%,x%)
  1779. FOR y%=0 TO 5
  1780. PRINT #1,tname$(x%,y%):PRINT #1,morg&(x%,y%):PRINT #1,shares%(x%,y%)
  1781. FOR t%=0 TO 20
  1782. PRINT #1,truck%(x%,y%,t%)
  1783. NEXT t%
  1784. FOR t%=0 TO 5
  1785. PRINT#1,tmove!(x%,y%,t%)
  1786. NEXT t%,y%,x%
  1787. PRINT #1,tc%-1:PRINT #1,am%:PRINT #1,week%:PRINT #1,day%
  1788. PRINT #1,finishy%:PRINT #1,startx%:PRINT #1,starty%:PRINT #1,duration%
  1789. CLOSE #1
  1790. WINDOW 3
  1791. RETURN
  1792. setime:
  1793. COLOR 10,3
  1794. xyptab 5+am%,197:WRITE tc%
  1795. xyptab 21,197:PRINT ":00"
  1796. xyptab 64,197:PRINT day$(day%)
  1797. xyptab 186,197:WRITE week%
  1798. RETURN
  1799. newstart:
  1800. WINDOW OUTPUT 3
  1801. pic$="main":cblocks%=4:colours&=32:gamestop%=1
  1802. bytes&=10240&:GOSUB loadscreen
  1803. LINE (225,220)-(300,finishy%),5
  1804. GOSUB setime
  1805. GOSUB st.stop
  1806. WINDOW 3:OBJECT.ON
  1807. RETURN
  1808. find:
  1809. GOSUB message
  1810. pic$="find":GOSUB threscreen
  1811. IF win4%>6 THEN fontset "topaz",8
  1812. win4%=6:x%=214:y%=40:COLOR 2,4+player%
  1813. FOR t%=0 TO tcount%(player%)-1
  1814. l%=LEN(tname$(player%,t%))
  1815. x1%=12-l%
  1816. xyptab x%,y%:PRINT tname$(player%,t%)SPACE$(x1%)
  1817. y%=y%+10:NEXT
  1818. WINDOW OUTPUT 6
  1819. PUT (59,140),getput%,PSET
  1820. WINDOW 4
  1821. GET (4,14)-(18,29),getput%
  1822. e%=t%:x1%=0
  1823. findloop:
  1824. GOSUB checkmouse
  1825. GOSUB mousepointer
  1826. IF x%<214 THEN findloop
  1827. IF y%<27  THEN backtooffice
  1828. IF y%<34 OR y%>33+10*e% THEN findloop
  1829. posinfo:
  1830. ON x1% GOTO pinfo
  1831. COLOR 2,0:t%=(y%-34)\10
  1832. GOSUB fillfind
  1833. xyptab 216,125:PRINT MID$(city$(truck%(player%,t%,6)),2,14)
  1834. xyptab 216,144:PRINT MID$(cargo$(truck%(player%,t%,9)),2,14)
  1835. xyptab 216,163:PRINT "$"truck%(player%,t%,8)*10
  1836. xyptab 216,182:PRINT truck%(player%,t%,5)+truck%(player%,t%,13)"Hrs."
  1837. PUT (tmove!(player%,t%,2)-7,tmove!(player%,t%,3)-7),getput%
  1838. x1%=1: GOTO findloop
  1839. pinfo:
  1840. GOSUB fillfind
  1841. xyptab 216,125:PRINT "              "
  1842. xyptab 216,144:PRINT "              "
  1843. xyptab 216,163:PRINT "              "
  1844. xyptab 216,182:PRINT "         "
  1845. PUT (tmove!(player%,t%,2)-7,tmove!(player%,t%,3)-7),getput%
  1846. x1%=0:GOTO findloop
  1847. fillfind:
  1848. AREA (213,33+t%*10):AREA (309,33+t%*10)
  1849. AREA (309,42+t%*10):AREA (213,42+t%*10)
  1850. AREAFILL 1
  1851. RETURN
  1852. shcolor:
  1853. PALETTE 0,.65,.42,.4
  1854. PALETTE 1,.65,.42,.4
  1855. PALETTE 2,.99,0,0
  1856. PALETTE 3,0,.86,.86
  1857. PALETTE 4,0,0,.66
  1858. PALETTE 5,1,1,1
  1859. PALETTE 6,.54,.27,.26
  1860. PALETTE 7,1,1,0
  1861. RETURN
  1862. backtooffice:
  1863. IF win2%<>1 THEN:WINDOW 6:WINDOW OUTPUT 2:fontset "topaz",8
  1864. WINDOW 6:GOSUB checkmouse:GOTO officescreen
  1865. speeding:
  1866. GOSUB message
  1867. WINDOW OUTPUT 2
  1868. fontset "truckdata",13
  1869. GOSUB shcolor
  1870. PALETTE 26,0,0,0
  1871. PALETTE 27,0,1,1
  1872. PALETTE 29,1,0,1
  1873. COLOR 0,0:CLS:COLOR 5,6:e%=0
  1874. PRINT "(BASE CALLING ALL MOBILE RIGS)
  1875. COLOR 4,0:PRINT "``report`your`current`speeds"
  1876. PRINT :COLOR 7,6:PRINT "(TRUCKS  NAME)"TAB(16)"(KPH)"TAB(23)"(HOURS)"
  1877. spset:
  1878. win2%=3:COLOR 5,2+player%*2:LOCATE 6,1
  1879. FOR t%=0 TO tcount%(player%)-1
  1880. l%=LEN(tname$(player%,t%))
  1881. x1%=12-l%
  1882. PRINT "("tname$(player%,t%)SPACE$(x1%)")";
  1883. IF truck%(player%,t%,5)<1 THEN truck%(player%,t%,15)=0
  1884. PRINT TAB(16)"("truck%(player%,t%,15)")";
  1885. PRINT TAB(23)"("truck%(player%,t%,5)")"
  1886. NEXT
  1887. LOCATE 12,1:COLOR 6,7
  1888. PRINT "(ADJUST SPEED)"TAB(20)"(10/4 OUT)"
  1889. ON e% GOTO hklk
  1890. WINDOW OUTPUT 6
  1891. PUT (59,140),getput%,PSET
  1892. hklk:
  1893. WINDOW 2:e%=0
  1894. speedaddloop:
  1895. GOSUB mousepointer
  1896. IF y%>143 THEN bspeed
  1897. IF x%>142 THEN speedaddloop
  1898. IF y%<66 OR y%>64+t%*13 THEN speedaddloop
  1899. e%=e%+1:IF e%=2 THEN e%=0
  1900. IF e%=1 THEN 
  1901. x1%=(y%-65)\13:GOSUB speedfill
  1902. ELSE
  1903. GOSUB speedfill
  1904. END IF
  1905. GOTO speedaddloop 
  1906. speedfill: 
  1907. AREA (0,65+x1%*13):AREA (139,65+x1%*13)
  1908. AREA (139,77+x1%*13):AREA (0,77+x1%*13)
  1909. AREAFILL 1:GOTO checkmouse
  1910. bspeed:
  1911. IF y%>156 THEN speedaddloop
  1912. IF x%<142 THEN adjustspeed
  1913. IF x%>192 AND x%<292 THEN backtooffice
  1914. adjustspeed:
  1915. IF e%<>1 THEN speedaddloop
  1916. IF truck%(player%,x1%,5)<1 THEN BEEP:GOTO speedaddloop
  1917. chsp%=1:q%=x1%:w%=player%
  1918. truck%(player%,q%,5)=truck%(player%,q%,5)*truck%(player%,q%,15)
  1919. LOCATE 14,1:COLOR 26,0:PRINT "base`calling`("tname$(w%,q%)")"
  1920. GOSUB xload
  1921. PUT (47,90),getput%
  1922. y1%=90+(80-t%)
  1923. PUT (47,y1%),getput%
  1924. GOSUB checkmouse
  1925. GOSUB loop3
  1926. WINDOW 2:x1%=q%:chsp%=0
  1927. COLOR 0,0:LOCATE 14,1:PRINT "                            "
  1928. GOTO spset
  1929. plas:
  1930. WINDOW OUTPUT 4
  1931. IF win4%<20 THEN fontset "truckdata",13
  1932. win4%=22
  1933. GOSUB shcolor
  1934. COLOR 0,0:CLS
  1935. COLOR 7,6:PRINT "(COMPANY ASSESSMENT DEPARTMENT)"
  1936. xyptab 7,25:COLOR 7,2:PRINT "(CLICK TO EXIT)"
  1937. LOCATE 15,1:COLOR 5,6
  1938. PRINT "(MONEY)"TAB(12)"(ASSETS)"TAB(24)"(TOTAL)";
  1939. LINE (1,45)-(1,178),6
  1940. LINE (2,178)-(300,178),6
  1941. x1%=7:c1%=2:add%=player%
  1942. FOR player%=0 TO 1
  1943. GOSUB plpr
  1944. LINE (x1%,177)-(x1%+25,177-x%),c1%,bf
  1945. LINE (x1%+115,177)-(x1%+140,177-y%),c1%,bf
  1946. LINE (x1%+229,177)-(x1%+254,177-e%),c1%,bf
  1947. x1%=37:c1%=4
  1948. NEXT
  1949. GOSUB win4ok
  1950. GOSUB mousepointer
  1951. player%=add%
  1952. WINDOW 6:GOTO bankscreen
  1953. plpr:
  1954. assets&=0
  1955. x%=money&(player%)/7500:IF x%<0 THEN x%=0
  1956. IF x%>137 THEN x%=137
  1957. FOR t%=0 TO tcount%(player%)-1
  1958. GOSUB calprice
  1959. assets&=assets&+(truck&-morg&(player%,t%))
  1960. NEXT:truck&=0
  1961. FOR t%=1 TO 5
  1962. IF shares%(player%,t%)<>0 THEN 
  1963. truck&=truck&+shareprice%(t%)*shares%(player%,t%)
  1964. END IF
  1965. NEXT
  1966. assets&=assets&+truck&
  1967. y%=assets&/7500:IF y%>130 THEN y%=130
  1968. e%=(x%+y%):IF e%>137 THEN e%=137
  1969. RETURN
  1970. omorg:
  1971. WINDOW OUTPUT 4
  1972. IF win4%<20 THEN fontset "truckdata",13
  1973. win4%=22
  1974. GOSUB shcolor
  1975. COLOR 0,0:CLS
  1976. COLOR 7,6:PRINT "(MORTGAGE AND LOAN DEPARTMENT)"
  1977. GOSUB mormon
  1978. LOCATE 5,1:COLOR 6,0:PRINT "which`truck"
  1979. LOCATE 6,1
  1980. COLOR 5,2+player%*2
  1981. FOR t%=0 TO tcount%(player%)-1
  1982. l%=LEN(tname$(player%,t%))
  1983. x1%=12-l%
  1984. PRINT "("tname$(player%,t%)SPACE$(x1%)")"
  1985. NEXT:e%=0:x2%=t%
  1986. LOCATE 15,1:COLOR 6,7
  1987. PRINT "(STREWTH THANKS FOR NOTHING:-)";
  1988. LINE (148,64)-(311,133),4,b
  1989. PAINT (155,77),5,4
  1990. LOCATE 6,1:COLOR 6,5
  1991. PRINT TAB(16)"loan`is`````````"
  1992. PRINT TAB(16)"amount`";:COLOR 4,5:PRINT "$       )"
  1993. COLOR 6,5
  1994. PRINT TAB(16)"loan`charge(10%)"
  1995. PRINT:COLOR 7,6 
  1996. PRINT TAB(16)"(THANK YOU SIR.)"
  1997. GOSUB win4ok
  1998. orgloop:
  1999. GOSUB mousepointer
  2000. IF y%>182 THEN WINDOW 6:GOTO bankscreen
  2001. IF y%>118 AND y%<130 AND x%>152 AND x%<312 THEN accmorg
  2002. IF x%>142 THEN orgloop
  2003. IF y%<66 OR y%>64+x2%*13 THEN orgloop
  2004. e%=e%+1:IF e%=2 THEN e%=0
  2005. IF e%=1 THEN 
  2006. t%=(y%-65)\13:x1%=t%:GOSUB speedfill:GOTO calmorg
  2007. ELSE
  2008. GOSUB speedfill:GOTO erasemorg
  2009. END IF
  2010. GOTO orgloop 
  2011. accmorg:
  2012. IF e%<>1 OR truck&<100 THEN orgloop
  2013. money&(player%)=money&(player%)+truck&
  2014. money&(player%)=money&(player%)-truck&/10
  2015. GOSUB mormon
  2016. morg&(player%,t%)=morg&(player%,t%)+truck&
  2017. GOSUB speedfill:e%=0:GOTO erasemorg
  2018. mormon:
  2019. xyptab 7,25:COLOR 2+player%*2,5
  2020. PRINT "("co.name$(player%)" BANK )"TAB(20)"$"money&(player%)")"
  2021. RETURN
  2022. calmorg:
  2023. GOSUB calprice
  2024. IF y%>4 THEN reject
  2025. truck&=truck&/2
  2026. truck&=truck&-morg&(player%,t%)
  2027. IF truck&<100 THEN reject
  2028. COLOR 4,5
  2029. xyptab 226,74:PRINT "accepted"
  2030. xyptab 237,87:WRITE truck&
  2031. GOTO orgloop
  2032. reject:
  2033. COLOR 2,5
  2034. xyptab 226,74:PRINT "rejected"
  2035. COLOR 4,5
  2036. xyptab 237,87:PRINT "ZILCH"
  2037. GOTO orgloop
  2038. erasemorg:
  2039. COLOR 4,5
  2040. xyptab 226,74:PRINT "````````"
  2041. xyptab 237,87:PRINT "      "
  2042. GOTO orgloop
  2043. balance:
  2044. WINDOW OUTPUT 4
  2045. IF win4%<20 THEN fontset "truckdata",13
  2046. win4%=22:sh%=player%
  2047. GOSUB shcolor
  2048. PALETTE 0,1,1,1:PALETTE 1,1,1,1
  2049. COLOR 0,0:CLS
  2050. COLOR 7,6:PRINT "( COMPANY AUDITORS DEPARTMENT)";
  2051. COLOR 2,0
  2052. FOR player%=0 TO 1
  2053. GOSUB balprint
  2054. COLOR 4,0: NEXT
  2055. LINE (0,22)-(310,104),6,b
  2056. LINE (0,113)-(310,195),6,b
  2057. GOSUB win4ok
  2058. GOSUB mousepointer
  2059. WINDOW 6:player%=sh%:GOTO bankscreen
  2060. balprint:
  2061. cal&=0:ccal&=0:truck&(2)=0
  2062. FOR t%=0 TO 4
  2063. IF truck%(player%,t%,10)<>0 THEN
  2064. GOSUB calprice
  2065. cal&=cal&+truck&
  2066. END IF 
  2067. IF morg&(player%,t%)<>0 THEN ccal&=ccal&+morg&(player%,t%)
  2068. NEXT
  2069. FOR t%=1 TO 5
  2070. IF shares%(player%,t%)<>0 THEN
  2071. truck&(2)=truck&(2)+shareprice%(t%)* shares%(player%,t%)
  2072. END IF
  2073. NEXT
  2074. truck&=money&(player%)+cal&+truck&(2)-ccal&
  2075. PRINT:PRINT  
  2076. PRINT "company`name"TAB(18)"("co.name$(player%)")"
  2077. PRINT "truck`assets"TAB(18)"$"cal&")"
  2078. PRINT "stock`assets"TAB(18)"$"truck&(2)")"
  2079. PRINT "present`capital"TAB(18)"$"money&(player%)")"
  2080. PRINT "truck`mortgages"TAB(18)"$"ccal&")"
  2081. PRINT "total`nett`worth"TAB(18)"$"truck&")";
  2082. RETURN
  2083.  
  2084.  
  2085.  
  2086.