home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1990-08-11 | 11.3 KB | 415 lines |
- Set Buffer 8
- Default
- Close Editor
- Screen Open 1,320,250,32,Lowres
- Load Iff "hacks.iff"
- While Mouse Key=0
- Wend
- Dim N$(15) : Dim PRICE(15) : Dim SHI(15)
- Dim NAME$(15) : Dim AGE(15) : Dim AD$(15) : Dim CURR(15) : Dim LT(15) : Goto SET_UP
- ST4:
- Dim CO$(10),PASS$(10)
- Curs Off
- P=1 : PA=0 : Dim SC(100) : Flash Off : Dim NA3$(100)
- Rem *** HACKING SIMULATOR**
- ST2:
- Screen Open 0,600,250,8,Hires : Pen 2 : Paper 0 : Cls
- Hide : Set Curs %11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111
- Print "The Hacker Simulator"
- Print "Creative Software Applications 1991"
- Print "By Adam Barker"
- Print : Print : Print "See file INSTR for the instructions"
- Print : Print "See file GREETS for the greetings and notes"
- Print : Print : Print : Print "Press any key" : Wait Key : Cls
- Centre "** THE HACKER SIMULATOR **"
- Locate 0,1
- Centre "** CREATIVE SOFTWARE APPLICATIONS **"
- For N=1 To 3 : Print : Next N
- Print "Logon ?"
- R:
- Locate 0,28 : Input A$ : If A$="system" Then Goto ACCESS
- Curs Off
- For ZX=1 To 5
- Locate 0,10 : Centre "** ACCESS DENIED **" : Locate 0,12 : Centre "TRY AGAIN"
- Wait 25
- Locate 0,10 : Centre " " : Locate 0,12 : Centre " "
- Wait 25
- Next ZX : Locate 0,28 : Print " " : Curs On
- Goto R :
- ACCESS:
- Cls
- R$="Welcome to the F.T.S.E - H.T" : Proc ST[R$]
- R$="Financial Times Sterling Exchange - Hacking Trade" : Proc ST[R$]
- Print
- R$="Thank you for accessing the system- nice to hear from you" : Proc ST[R$]
- Procedure ST[R$]
- For T=1 To Len(R$)
- Print Mid$(R$,T,1);
- Play 5,0 : Wait 3
- Next T : Print
- End Proc
- COM:
- Locate 0,28 : Print " "
- Locate 0,28 : Input "Command ";A$
- Goto ID
- ID:
- If A$="list" Then Goto LI
- If A$="pass" Then Goto PASS
- If A$="ded" Then Goto DEDUCT
- If A$="shares" Then Goto SH
- Goto COM
- SET_UP:
- Restore D
- For O=1 To 15
- Read H$,AGE2,AD2$,CURR2,LT2
- NAME$(O)=H$ : AGE(O)=AGE2 : AD$(O)=AD2$ : CURR(O)=CURR2 : LT(O)=LT2
- Next O
- Restore D2
- For N=1 To 15 : Read A3$,B3,C3 : N$(N)=A3$ : PRICE(N)=B3 : SHI(15)=C3
- Next N
- D:
- Data "Mr. Harvard",28,"47 West Road",50000,0
- Data "Mr. Johnson",34,"21 Station Street",50000,0
- Data "Mr. Upwood",31,"10 West End Road",50000,0
- Data "Mr. Stevenson",36,"59 Railway Road",50000,0
- Data "Mr. Poole",29,"2 Station Street",50000,0
- Data "Mr. Lodge",30,"89 East Street",50000,0
- Data "Mr. Atkinson",28,"18 High Street",50000,0
- Data "Mr. Grayhams",31,"19 Market Road",50000,0
- Data "Mr. Wales",37,"56 High Street",50000,0
- Data "Mr. Carls",24,"89 Seamore Causeway",50000,0
- Data "Mr. Freeman",32,"26 Nighthoods Road",50000,0
- Data "Mr. Westward",35,"90 Queens Avenue",50000,0
- Data "Mr. Judger",36,"56 Old Causeway",50000,0
- Data "Mr. Carloss",34,"81 High Street",50000,0
- Data "Mr. Lewis",41,"10 Kings Road",50000,0
- D2:
- Data "Palmer Electricals",300,0
- Data "Banks Industrials",300,0
- Data "Gavins & Co.",300,0
- Data "British Home Stores",300,0
- Data "John Lewis PLC",300,0
- Data "Midlands Electrics",300,0
- Data "Lords Fabrics",300,0
- Data "Lloyds Bank",300,0
- Data "Plessey Electronics",300,0
- Data "Gateway Supermarkets",300,0
- Data "Nissan UK",300,0
- Data "Locks Lighting",300,0
- Data "Harrods",300,0
- Data "Keels Paper",300,0
- Data "Freemans Resturants",300,0
- Goto ST4
- LI:
- Cls : T4=0
- Print "Name Age Address Current account"
- Print
- For N=1 To 15
- 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
- Wait 3 : T4=T4+CURR(N)
- 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
- L3=0
- Goto COM
- PASS:
- Goto REPORT
- DEDUCT:
- Cls : PR=0
- Input "Number of client ";CLIENT : Print : Print
- Print "Name:";NAME$(CLIENT) : Print : Print "Age ";AGE(CLIENT) : Print : Print "Address ";AD$(CLIENT) : Print : Print "Current Account �";CURR(CLIENT)
- Print : Print
- Input "Amount ";AM
- If LT(CLIENT)<AM Then Print : Goto FOUND
- If LT(CLIENT)>=AM Then Print : Goto SUCC
- FOUND:
- Print "SEARCHING "; : Wait 100 :
- R$="Client recognised error in amounts" : Proc ST[R$]
- Print
- Locate 0,28 : Print "Total of �15000 is removed" : Wait Key : Cls : AL=AL-20000 : Goto COM
- SUCC:
- Print "SEARCHING "; : Wait 100
- R$="O.K Access granted- successful transaction- money now yours:" : Proc ST[R$]
- Print
- Print : AL=AL+AM : CURR(CLIENT)=CURR(CLIENT)-AM : LT(CLIENT)=LT(CLIENT)-AM
- Print "Total: �";AL
- Goto COM
- REPORT:
- Cls
- Centre "** Reports **" : Print : Print
- Centre "** Previous Transactions **" : T2=0 : Print : Print
- For K=1 To 15 : Set Tab 20
- Print K;". ";NAME$(K);Tab$;"� ";LT(K);" Leftover: �";CURR(K) : T2=T2+LT(K)
- Next K
- For K9=1 To 15 : LT(K9)=0 : Next K9
- For N2=1 To 15
- A=Rnd(1)
- WD=Rnd(8000)
- If A=0 Then CURR(N2)=CURR(N2)+WD
- If A=1 Then CURR(N2)=CURR(N2)-WD
- LT(N2)=WD : T3=T3+LT(N2)
- Next N2
- Locate 0,28 : Print "Press any key" : Wait Key : Cls
- Centre "** Market Statistics **" : Print : Print
- Print "Pass number ";PA : PA=PA+1 : If PA=9 Then Goto TRA
- Print : Print "Available amounts altogether ";T3 : T3=0
- For J3=1 To 15
- AM9=Rnd(100)
- AM10=Rnd(1)
- If AM10=1 Then PRICE(J3)=PRICE(J3)-AM9
- If AM10=0 Then PRICE(J3)=PRICE(J3)+AM9
- Next J3
- Locate 0,28 : Print "Press any key " : Wait Key : Cls : Goto REP2
- TRA:
- Cls : Centre "** Modulation **" : Print : Print
- Gosub S
- S:
- Restore DAT2
- For N=1 To 10
- Read CO2$,PASS2$
- CO$(N)=CO2$ : PASS$(N)=PASS2$
- Next N : Goto CON
- DAT2:
- Data "Tokyo","Ghastly"
- Data "Washington","Bush"
- Data "Mexico","Hatson"
- Data "Moscow","People"
- Data "Sydney","Gday"
- Data "London","Wembley"
- Data "Glasgow","Scotty"
- Data "Delhi","Indiana"
- Data "Synagpore","Chinnies"
- Data "Jamaica","Loopy"
- CON:
- Print "Prepare for password string:" : Wait Rnd(100)
- PLACE=Rnd(1108) : X2=Rnd(10)+1 : W$=PASS$(X2)
- For N=1 To 1108-Len(W$) : Print Chr$(Rnd(40)+50);
- If N=PLACE Then Print W$;
- Next N
- Print : Print : Print "O.K. Counting ... Pass ID. ";PLACE
- Wait 1000
- Cls
- Print : Print : Print : Print : Print "Logon on to city "
- Locate 0,28 : Input PA2$
- If PA2$=W$ Then Print : Print : Print "Successfully logged on to ";CO$(X2) : Goto IO
- Print : Print : Print "Incorrect:- Access denied . Pass was ";PASS$(X2) : End
- IO:
- Cls
- Print "Well done. Mission complete"
- Print "You finished with a score of ";AL
- Print : Print : Print
- Print "Press any key" : Wait Key : End
- Centre "** Market in "+CO$(X2)+" **" : Print : Print
- Print "SEARCHING..." : Wait Rnd(50)
- Print
- Goto EN
- Wait Key : Cls : P=P+1 : PA=0 : AL=0 : Goto COM
- SH:
- Cls
- Centre "** Share Index and Market News **" : Print : Print
- Print "Name"; : Set Tab 30 : Print Tab$;"Current Price"; : Set Tab 55 : Print Tab$;"No. Shares";
- Print : Print
- For T=1 To 15
- Print N$(T);
- Set Tab 30
- Print Tab$;PRICE(T);
- Set Tab 55 : Print Tab$;SHI(T)
- Next T
- Print : Print "Type B to buy or sell shares"
- Print "or Type X to exit to main command line"
- KL:
- Locate 0,28
- Input CHECK$
- If CHECK$="b" Then Goto BUY
- If CHECK$="x" Then Cls : Goto COM
- Goto KL
- BUY:
- Cls
- Print "Name"; : Set Tab 30 : Print Tab$;"Current Price"; : Set Tab 55 : Print Tab$;"No. Shares";
- Print : Print
- For T=1 To 15
- Print T;". ";N$(T);
- Set Tab 30
- Print Tab$;PRICE(T);
- Set Tab 55 : Print Tab$;SHI(T)
- Next T
- Print
- Input "Which company ";COMP
- Cls
- RES:
- Centre "** Company Statistics **"
- Print : Print
- Print "Number: ";COMP : Print "Name: ";N$(COMP) : Print "Price: ";PRICE(COMP) : Print "Shares: ";SHI(COMP)
- If COMP=0 Then Goto RES
- Print
- Print "Buy limit to: ";AL/PRICE(COMP);" shares"
- Print "Sell totalling �";SHI(COMP)*PRICE(COMP)
- Print
- Print "Buy or sell (b/s) ?"
- Y:
- Locate 0,28
- Input CHECK2$
- If CHECK2$="b" Then Goto BUY2
- If CHECK2$="s" Then Goto SELL2
- Goto Y
- BUY2:
- Input "How many shares ";NOS
- If NOS=0 Then Cls : Goto COM
- If NOS>(AL/PRICE(COMP)) Then Print "Insufficient Funds" : Wait Key : Goto BUY2
- T5=(NOS*PRICE(COMP))
- AL=AL-T5 : SHI(COMP)=SHI(COMP)+NOS
- Print "Remaining fund �";AL
- Wait Key : Goto SH
- SELL2:
- Locate 0,25
- Input "How many shares ";NOS2
- If SHI(COMP)<NOS2 Then Print "Shares dont exist" : Goto SELL2
- SHI(COMP)=SHI(COMP)-NOS2
- AL=AL+(NOS2*PRICE(COMP))
- Print "Extra Increase is �";NOS2*PRICE(COMP)
- Print "Total now is �";AL
- Wait Key : Goto SH
- EN:
- Cls
- Centre "** Table **"
- Print : Input "Name ";NA3$(T)
- Print
- Sort SC(0)
- For T=0 To P
- Print T;". ";
- Set Tab 4
- Print Tab$;NA3$(T)
- Set Tab 25
- Print Tab$;SC(T)
- Next T
- P=P+1
- Print : Print "Press any key to return"
- Wait Key : Cls : Goto ST2
- REP2:
- Centre "** Market Reports **" : Print : Print
- Print "Share market reports on Pass ";PA
- Print
- R1$="Market Crash:- Lose share values and money"
- R2$="Company Crash:- loss of money in certain company"
- R3$="Tax on market:- 40%"
- R4$="Tax on market:- 100%"
- R5$="Tax on market:- 20%"
- R6$="Bonus market:- 50%"
- R7$="Bonus market:- 100%"
- R8$="Company Profits:- you gain 50%"
- R9$="Company Profits:- you gain 100%"
- R10$="Company tax:- 30%"
- D3:
- DE=Rnd(10)
- If DE=0 Then Goto D3
- If DE=1 Then Goto MC
- If DE=2 Then Goto CC
- If DE=3 Then Goto M40
- If DE=4 Then Goto M100
- If DE=5 Then Goto M20
- If DE=6 Then Goto BM50
- If DE=7 Then Goto BM100
- If DE=8 Then Goto CP50
- If DE=9 Then Goto CP100
- If DE=10 Then Goto CT30
- MC:
- Print R1$
- LOP=0
- For U=1 To 15
- LOP=LOP+(SHI(U)*PRICE(U))
- Next U
- Print "(Total loss of �";LOP;")"
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- CC:
- Print R2$
- CO5=Rnd(15)
- If CO5=0 Then Goto CC
- Print "Company: ";N$(CO5) : Print
- Print "Total loss of �";(SHI(CO5)*PRICE(CO5))
- SHI(CO5)=0
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- M40:
- Print R3$
- LOP2=0
- For JU=1 To 15
- LOP2=LOP2+(SHI(JU)*PRICE(JU))
- Next JU
- TAKE=(LOP2*40)/100
- AL=AL-TAKE
- Print "Remaining Total= �";AL
- Print "Loss is �";TAKE
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- M100:
- Print R4$
- LOP2=0
- For JU=1 To 15
- LOP2=LOP2+(SHI(JU)*PRICE(JU))
- Next JU
- AL=AL-LOP2
- Print "Remaining Total= �";AL
- Print "Loss is �";LOP2
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- M20:
- Print R5$
- LOP2=0
- For JU=1 To 15
- LOP2=LOP2+(SHI(JU)*PRICE(JU))
- Next JU
- TAKE=(LOP2*20)/100
- AL=AL-TAKE
- Print "Remaining Total= �";AL
- Print "Loss is �";TAKE
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- BM50:
- Print R6$
- LOP2=0
- For JU=1 To 15
- LOP2=LOP2+(SHI(JU)*PRICE(JU))
- Next JU
- TAKE=(LOP2*50)/100
- AL=AL+TAKE
- Print "Total= �";AL
- Print "Increase is �";TAKE
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- BM100:
- Print R7$
- LOP2=0
- For JU=1 To 15
- LOP2=LOP2+(SHI(JU)*PRICE(JU))
- Next JU
- AL=AL+LOP2
- Print "Total= �";AL
- Print "Increase is �";LOP2
- Print : Print "Press any key" : Wait Key : Cls : Goto COM
- CP50:
- Print R8$
- LOP5=Rnd(15)
- If LOP5=0 Then Goto CP50
- Print : Print "Company: ";N$(LOP5)
- Print "Total in company: �";SHI(LOP5)*PRICE(LOP5)
- KI=SHI(LOP5)*PRICE(LOP5)
- KI2=(KI*50)/100
- AL=AL+KI2
- Print "Total now is �";AL
- Print "Press any key" : Wait Key : Cls : Goto COM
- CP100:
- Print R9$
- LOP5=Rnd(15)
- If LOP5=0 Then Goto CP50
- Print : Print "Company: ";N$(LOP5)
- Print "Total in company: �";SHI(LOP5)*PRICE(LOP5)
- KI=SHI(LOP5)*PRICE(LOP5)
- KI2=(KI*100)/100
- AL=AL+KI2
- Print "Total now is �";AL
- Print "Press any key" : Wait Key : Cls : Goto COM
- CT30:
- Print R10$
- LOP5=Rnd(15)
- If LOP5=0 Then Goto CP50
- Print : Print "Company: ";N$(LOP5)
- Print "Total in company: �";SHI(LOP5)*PRICE(LOP5)
- KI=SHI(LOP5)*PRICE(LOP5)
- KI2=(KI*30)/100
- AL=AL-KI2
- Print "Total now is �";AL
- Print "Loss is �";KI2
- Print "Press any key" : Wait Key : Cls : Goto COM