home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 2 of 2).iso / games / g030.dms / in.adf / hacker_sim.amos / hacker_sim.amosSourceCode
Encoding:
AMOS Source Code  |  1990-08-11  |  11.3 KB  |  415 lines

  1. Set Buffer 8
  2. Default 
  3. Close Editor 
  4. Screen Open 1,320,250,32,Lowres
  5. Load Iff "hacks.iff"
  6. While Mouse Key=0
  7. Wend 
  8. Dim N$(15) : Dim PRICE(15) : Dim SHI(15)
  9.  Dim NAME$(15) : Dim AGE(15) : Dim AD$(15) : Dim CURR(15) : Dim LT(15) : Goto SET_UP
  10. ST4:
  11. Dim CO$(10),PASS$(10)
  12. Curs Off 
  13. P=1 : PA=0 : Dim SC(100) : Flash Off : Dim NA3$(100)
  14. Rem                   *** HACKING SIMULATOR**
  15. ST2:
  16. Screen Open 0,600,250,8,Hires : Pen 2 : Paper 0 : Cls 
  17. Hide : Set Curs %11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111
  18. Print "The Hacker Simulator"
  19. Print "Creative Software Applications 1991"
  20. Print "By Adam Barker"
  21. Print : Print : Print "See file INSTR for the instructions"
  22. Print : Print "See file GREETS for the greetings and notes"
  23. Print : Print : Print : Print "Press any key" : Wait Key : Cls 
  24. Centre "** THE HACKER SIMULATOR **"
  25. Locate 0,1
  26. Centre "** CREATIVE SOFTWARE APPLICATIONS **"
  27. For N=1 To 3 : Print : Next N
  28. Print "Logon ?"
  29. R:
  30.  Locate 0,28 : Input A$ : If A$="system" Then Goto ACCESS
  31. Curs Off 
  32. For ZX=1 To 5
  33.  Locate 0,10 : Centre "** ACCESS DENIED **" : Locate 0,12 : Centre "TRY AGAIN"
  34.  Wait 25
  35.  Locate 0,10 : Centre "                   " : Locate 0,12 : Centre "         "
  36.  Wait 25
  37. Next ZX : Locate 0,28 : Print "                                        " : Curs On 
  38. Goto R : 
  39. ACCESS:
  40.  Cls 
  41. R$="Welcome to the F.T.S.E - H.T" : Proc ST[R$]
  42. R$="Financial Times Sterling Exchange - Hacking Trade" : Proc ST[R$]
  43. Print 
  44. R$="Thank you for accessing the system- nice to hear from you" : Proc ST[R$]
  45. Procedure ST[R$]
  46.  For T=1 To Len(R$)
  47.   Print Mid$(R$,T,1);
  48.   Play 5,0 : Wait 3
  49.  Next T : Print 
  50. End Proc
  51. COM:
  52. Locate 0,28 : Print "                                                                         "
  53.  Locate 0,28 : Input "Command ";A$
  54.  Goto ID
  55. ID:
  56. If A$="list" Then Goto LI
  57. If A$="pass" Then Goto PASS
  58. If A$="ded" Then Goto DEDUCT
  59. If A$="shares" Then Goto SH
  60. Goto COM
  61. SET_UP:
  62. Restore D
  63.   For O=1 To 15
  64.      Read H$,AGE2,AD2$,CURR2,LT2
  65.      NAME$(O)=H$ : AGE(O)=AGE2 : AD$(O)=AD2$ : CURR(O)=CURR2 : LT(O)=LT2
  66.   Next O
  67. Restore D2
  68.   For N=1 To 15 : Read A3$,B3,C3 : N$(N)=A3$ : PRICE(N)=B3 : SHI(15)=C3
  69.   Next N
  70. D:
  71.   Data "Mr. Harvard",28,"47 West Road",50000,0
  72.   Data "Mr. Johnson",34,"21 Station Street",50000,0
  73.   Data "Mr. Upwood",31,"10 West End Road",50000,0
  74.   Data "Mr. Stevenson",36,"59 Railway Road",50000,0
  75.   Data "Mr. Poole",29,"2 Station Street",50000,0
  76.   Data "Mr. Lodge",30,"89 East Street",50000,0
  77.   Data "Mr. Atkinson",28,"18 High Street",50000,0
  78.   Data "Mr. Grayhams",31,"19 Market Road",50000,0
  79.   Data "Mr. Wales",37,"56 High Street",50000,0
  80.   Data "Mr. Carls",24,"89 Seamore Causeway",50000,0
  81.   Data "Mr. Freeman",32,"26 Nighthoods Road",50000,0
  82.   Data "Mr. Westward",35,"90 Queens Avenue",50000,0
  83.   Data "Mr. Judger",36,"56 Old Causeway",50000,0
  84.   Data "Mr. Carloss",34,"81 High Street",50000,0
  85.   Data "Mr. Lewis",41,"10 Kings Road",50000,0
  86. D2:
  87.   Data "Palmer Electricals",300,0
  88.   Data "Banks Industrials",300,0
  89.   Data "Gavins & Co.",300,0
  90.   Data "British Home Stores",300,0
  91.   Data "John Lewis PLC",300,0
  92.   Data "Midlands Electrics",300,0
  93.   Data "Lords Fabrics",300,0
  94.   Data "Lloyds Bank",300,0
  95.   Data "Plessey Electronics",300,0
  96.   Data "Gateway Supermarkets",300,0
  97.   Data "Nissan UK",300,0
  98.   Data "Locks Lighting",300,0
  99.   Data "Harrods",300,0
  100.   Data "Keels Paper",300,0
  101.   Data "Freemans Resturants",300,0
  102. Goto ST4
  103. LI:
  104. Cls : T4=0
  105. Print "Name            Age           Address                  Current account"
  106. Print 
  107. For N=1 To 15
  108.   Print NAME$(N); : Set Tab 15 : Print Tab$;AGE(N); : Set Tab 30 : Print Tab$;AD$(N); : Set Tab 55 : Print Tab$;"� ";CURR(N); : Set Tab 64 : Print Tab$;N
  109.   Wait 3 : T4=T4+CURR(N)
  110. Next N : Print : Print : Print "Total on market : ï¿½";T4 : Print : Print : Print "Average per client : ï¿½";T4/15 : T4=0 : Print : Print "Total on command ï¿½";AL
  111. L3=0
  112. Goto COM
  113. PASS:
  114. Goto REPORT
  115. DEDUCT:
  116. Cls : PR=0
  117.  Input "Number of client ";CLIENT : Print : Print 
  118.   Print "Name:";NAME$(CLIENT) : Print : Print "Age ";AGE(CLIENT) : Print : Print "Address ";AD$(CLIENT) : Print : Print "Current Account ï¿½";CURR(CLIENT)
  119. Print : Print 
  120. Input "Amount ";AM
  121. If LT(CLIENT)<AM Then Print : Goto FOUND
  122. If LT(CLIENT)>=AM Then Print : Goto SUCC
  123. FOUND:
  124.  Print "SEARCHING "; : Wait 100 : 
  125.  R$="Client recognised error in amounts" : Proc ST[R$]
  126.  Print 
  127.  Locate 0,28 : Print "Total of ï¿½15000 is removed" : Wait Key : Cls : AL=AL-20000 : Goto COM
  128. SUCC:
  129.   Print "SEARCHING "; : Wait 100
  130.   R$="O.K Access granted- successful transaction- money now yours:" : Proc ST[R$]
  131.   Print 
  132.   Print : AL=AL+AM : CURR(CLIENT)=CURR(CLIENT)-AM : LT(CLIENT)=LT(CLIENT)-AM
  133.   Print "Total: ï¿½";AL
  134. Goto COM
  135. REPORT:
  136. Cls 
  137. Centre "** Reports **" : Print : Print 
  138. Centre "** Previous Transactions **" : T2=0 : Print : Print 
  139.  For K=1 To 15 : Set Tab 20
  140.   Print K;". ";NAME$(K);Tab$;"� ";LT(K);"   Leftover:  ï¿½";CURR(K) : T2=T2+LT(K)
  141.  Next K
  142. For K9=1 To 15 : LT(K9)=0 : Next K9
  143.    For N2=1 To 15
  144.     A=Rnd(1)
  145.     WD=Rnd(8000)
  146.     If A=0 Then CURR(N2)=CURR(N2)+WD
  147.     If A=1 Then CURR(N2)=CURR(N2)-WD
  148.     LT(N2)=WD : T3=T3+LT(N2)
  149.    Next N2
  150. Locate 0,28 : Print "Press any key" : Wait Key : Cls 
  151. Centre "** Market Statistics **" : Print : Print 
  152. Print "Pass number ";PA : PA=PA+1 : If PA=9 Then Goto TRA
  153. Print : Print "Available amounts altogether ";T3 : T3=0
  154. For J3=1 To 15
  155. AM9=Rnd(100)
  156. AM10=Rnd(1)
  157. If AM10=1 Then PRICE(J3)=PRICE(J3)-AM9
  158. If AM10=0 Then PRICE(J3)=PRICE(J3)+AM9
  159. Next J3
  160. Locate 0,28 : Print "Press any key " : Wait Key : Cls : Goto REP2
  161. TRA:
  162.   Cls : Centre "** Modulation **" : Print : Print 
  163. Gosub S
  164. S:
  165. Restore DAT2
  166.  For N=1 To 10
  167.   Read CO2$,PASS2$
  168.    CO$(N)=CO2$ : PASS$(N)=PASS2$
  169.  Next N : Goto CON
  170. DAT2:
  171.  Data "Tokyo","Ghastly"
  172.  Data "Washington","Bush"
  173.  Data "Mexico","Hatson"
  174.  Data "Moscow","People"
  175.  Data "Sydney","Gday"
  176.  Data "London","Wembley"
  177.  Data "Glasgow","Scotty"
  178.  Data "Delhi","Indiana"
  179.  Data "Synagpore","Chinnies"
  180.  Data "Jamaica","Loopy"
  181. CON:
  182.  Print "Prepare for password string:" : Wait Rnd(100)
  183. PLACE=Rnd(1108) : X2=Rnd(10)+1 : W$=PASS$(X2)
  184. For N=1 To 1108-Len(W$) : Print Chr$(Rnd(40)+50);
  185.  If N=PLACE Then Print W$;
  186. Next N
  187. Print : Print : Print "O.K. Counting ... Pass ID. ";PLACE
  188. Wait 1000
  189. Cls 
  190. Print : Print : Print : Print : Print "Logon on to city "
  191. Locate 0,28 : Input PA2$
  192. If PA2$=W$ Then Print : Print : Print "Successfully logged on to ";CO$(X2) : Goto IO
  193. Print : Print : Print "Incorrect:- Access denied . Pass was ";PASS$(X2) : End 
  194. IO:
  195. Cls 
  196. Print "Well done. Mission complete"
  197. Print "You finished with a score of ";AL
  198. Print : Print : Print 
  199. Print "Press any key" : Wait Key : End 
  200. Centre "** Market in "+CO$(X2)+" **" : Print : Print 
  201. Print "SEARCHING..." : Wait Rnd(50)
  202. Print 
  203. Goto EN
  204. Wait Key : Cls : P=P+1 : PA=0 : AL=0 : Goto COM
  205. SH:
  206. Cls 
  207. Centre "** Share Index and Market News **" : Print : Print 
  208. Print "Name"; : Set Tab 30 : Print Tab$;"Current Price"; : Set Tab 55 : Print Tab$;"No. Shares";
  209. Print : Print 
  210. For T=1 To 15
  211. Print N$(T);
  212. Set Tab 30
  213. Print Tab$;PRICE(T);
  214. Set Tab 55 : Print Tab$;SHI(T)
  215. Next T
  216. Print : Print "Type B to buy or sell shares"
  217. Print "or Type X to exit to main command line"
  218. KL:
  219. Locate 0,28
  220. Input CHECK$
  221.  If CHECK$="b" Then Goto BUY
  222.  If CHECK$="x" Then Cls : Goto COM
  223. Goto KL
  224. BUY:
  225.  Cls 
  226. Print "Name"; : Set Tab 30 : Print Tab$;"Current Price"; : Set Tab 55 : Print Tab$;"No. Shares";
  227. Print : Print 
  228. For T=1 To 15
  229. Print T;". ";N$(T);
  230. Set Tab 30
  231. Print Tab$;PRICE(T);
  232. Set Tab 55 : Print Tab$;SHI(T)
  233. Next T
  234. Print 
  235. Input "Which company ";COMP
  236. Cls 
  237. RES:
  238. Centre "** Company Statistics **"
  239. Print : Print 
  240. Print "Number: ";COMP : Print "Name: ";N$(COMP) : Print "Price: ";PRICE(COMP) : Print "Shares: ";SHI(COMP)
  241. If COMP=0 Then Goto RES
  242. Print 
  243. Print "Buy limit to: ";AL/PRICE(COMP);" shares"
  244. Print "Sell totalling  ï¿½";SHI(COMP)*PRICE(COMP)
  245. Print 
  246. Print "Buy or sell (b/s) ?"
  247. Y:
  248. Locate 0,28
  249. Input CHECK2$
  250. If CHECK2$="b" Then Goto BUY2
  251. If CHECK2$="s" Then Goto SELL2
  252. Goto Y
  253. BUY2:
  254.  Input "How many shares ";NOS
  255. If NOS=0 Then Cls : Goto COM
  256.  If NOS>(AL/PRICE(COMP)) Then Print "Insufficient Funds" : Wait Key : Goto BUY2
  257.  T5=(NOS*PRICE(COMP))
  258.  AL=AL-T5 : SHI(COMP)=SHI(COMP)+NOS
  259.  Print "Remaining fund ï¿½";AL
  260.  Wait Key : Goto SH
  261. SELL2:
  262. Locate 0,25
  263. Input "How many shares ";NOS2
  264.  If SHI(COMP)<NOS2 Then Print "Shares dont exist" : Goto SELL2
  265.  SHI(COMP)=SHI(COMP)-NOS2
  266.  AL=AL+(NOS2*PRICE(COMP))
  267.  Print "Extra Increase is ï¿½";NOS2*PRICE(COMP)
  268.  Print "Total now is ï¿½";AL
  269.  Wait Key : Goto SH
  270. EN:
  271.  Cls 
  272. Centre "** Table **"
  273. Print : Input "Name ";NA3$(T)
  274. Print 
  275. Sort SC(0)
  276. For T=0 To P
  277. Print T;". ";
  278. Set Tab 4
  279. Print Tab$;NA3$(T)
  280. Set Tab 25
  281. Print Tab$;SC(T)
  282. Next T
  283. P=P+1
  284. Print : Print "Press any key to return"
  285. Wait Key : Cls : Goto ST2
  286. REP2:
  287.  Centre "** Market Reports **" : Print : Print 
  288. Print "Share market reports on Pass ";PA
  289. Print 
  290. R1$="Market Crash:- Lose share values and money"
  291. R2$="Company Crash:- loss of money in certain company"
  292. R3$="Tax on market:- 40%"
  293. R4$="Tax on market:- 100%"
  294. R5$="Tax on market:- 20%"
  295. R6$="Bonus market:- 50%"
  296. R7$="Bonus market:- 100%"
  297. R8$="Company Profits:- you gain 50%"
  298. R9$="Company Profits:- you gain 100%"
  299. R10$="Company tax:- 30%"
  300. D3:
  301. DE=Rnd(10)
  302. If DE=0 Then Goto D3
  303. If DE=1 Then Goto MC
  304. If DE=2 Then Goto CC
  305. If DE=3 Then Goto M40
  306. If DE=4 Then Goto M100
  307. If DE=5 Then Goto M20
  308. If DE=6 Then Goto BM50
  309. If DE=7 Then Goto BM100
  310. If DE=8 Then Goto CP50
  311. If DE=9 Then Goto CP100
  312. If DE=10 Then Goto CT30
  313. MC:
  314.  Print R1$
  315. LOP=0
  316. For U=1 To 15
  317. LOP=LOP+(SHI(U)*PRICE(U))
  318. Next U
  319. Print "(Total loss of ï¿½";LOP;")"
  320. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  321. CC:
  322. Print R2$
  323.  CO5=Rnd(15)
  324.  If CO5=0 Then Goto CC
  325. Print "Company: ";N$(CO5) : Print 
  326. Print "Total loss of ï¿½";(SHI(CO5)*PRICE(CO5))
  327. SHI(CO5)=0
  328. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  329. M40:
  330. Print R3$
  331. LOP2=0
  332. For JU=1 To 15
  333. LOP2=LOP2+(SHI(JU)*PRICE(JU))
  334. Next JU
  335. TAKE=(LOP2*40)/100
  336. AL=AL-TAKE
  337. Print "Remaining Total= ï¿½";AL
  338. Print "Loss is ï¿½";TAKE
  339. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  340. M100:
  341. Print R4$
  342. LOP2=0
  343. For JU=1 To 15
  344. LOP2=LOP2+(SHI(JU)*PRICE(JU))
  345. Next JU
  346. AL=AL-LOP2
  347. Print "Remaining Total= ï¿½";AL
  348. Print "Loss is ï¿½";LOP2
  349. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  350. M20:
  351. Print R5$
  352. LOP2=0
  353. For JU=1 To 15
  354. LOP2=LOP2+(SHI(JU)*PRICE(JU))
  355. Next JU
  356. TAKE=(LOP2*20)/100
  357. AL=AL-TAKE
  358. Print "Remaining Total= ï¿½";AL
  359. Print "Loss is ï¿½";TAKE
  360. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  361. BM50:
  362. Print R6$
  363. LOP2=0
  364. For JU=1 To 15
  365. LOP2=LOP2+(SHI(JU)*PRICE(JU))
  366. Next JU
  367. TAKE=(LOP2*50)/100
  368. AL=AL+TAKE
  369. Print "Total= ï¿½";AL
  370. Print "Increase is ï¿½";TAKE
  371. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  372. BM100:
  373. Print R7$
  374. LOP2=0
  375. For JU=1 To 15
  376. LOP2=LOP2+(SHI(JU)*PRICE(JU))
  377. Next JU
  378. AL=AL+LOP2
  379. Print "Total= ï¿½";AL
  380. Print "Increase is ï¿½";LOP2
  381. Print : Print "Press any key" : Wait Key : Cls : Goto COM
  382. CP50:
  383. Print R8$
  384. LOP5=Rnd(15)
  385. If LOP5=0 Then Goto CP50
  386. Print : Print "Company: ";N$(LOP5)
  387. Print "Total in company: ï¿½";SHI(LOP5)*PRICE(LOP5)
  388. KI=SHI(LOP5)*PRICE(LOP5)
  389. KI2=(KI*50)/100
  390. AL=AL+KI2
  391. Print "Total now is ï¿½";AL
  392. Print "Press any key" : Wait Key : Cls : Goto COM
  393. CP100:
  394. Print R9$
  395. LOP5=Rnd(15)
  396. If LOP5=0 Then Goto CP50
  397. Print : Print "Company: ";N$(LOP5)
  398. Print "Total in company: ï¿½";SHI(LOP5)*PRICE(LOP5)
  399. KI=SHI(LOP5)*PRICE(LOP5)
  400. KI2=(KI*100)/100
  401. AL=AL+KI2
  402. Print "Total now is ï¿½";AL
  403. Print "Press any key" : Wait Key : Cls : Goto COM
  404. CT30:
  405. Print R10$
  406. LOP5=Rnd(15)
  407. If LOP5=0 Then Goto CP50
  408. Print : Print "Company: ";N$(LOP5)
  409. Print "Total in company: ï¿½";SHI(LOP5)*PRICE(LOP5)
  410. KI=SHI(LOP5)*PRICE(LOP5)
  411. KI2=(KI*30)/100
  412. AL=AL-KI2
  413. Print "Total now is ï¿½";AL
  414. Print "Loss is ï¿½";KI2
  415. Print "Press any key" : Wait Key : Cls : Goto COM