home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Equalizer BBS
/
equalizer-bbs-collection_2004.zip
/
equalizer-bbs-collection
/
BBS-PCBOARD-STUFF
/
CRW-FK12.ZIP
/
FAKEFD.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-05-30
|
3KB
|
99 lines
{$A+,B-,D+,E+,F-,G+,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+,Y+}
{$DEFINE DEBUG}
Program FakeFD;
Uses Crt, Dos, Tools, ComStuff;
Const Numbers : Array[1..25] Of String[17] = ('once', 'twice', 'three times', 'four times', 'five times',
'six times', 'seven times', 'eight times', 'nine times', 'ten times',
'eleven times', 'twelve times', 'thirteen', 'fourteen times',
'fifteen times', 'sixteen times', 'seventeen times', 'eighteen times',
'nineteen times', 'twenty times', 'twentyone times', 'twentytwo times',
'twentythree times', 'twentyfour times', 'twentyfive times');
Type Config = record
St1,
St2 : String[50];
NumEsc : Byte;
Delay : Word;
end;
Var
ProgPath : PathStr;
Setup : Config;
Count : Byte;
Ch : Char;
Procedure ReadSetup;
Var TxtFil : Text; S : String;
begin
If Not FileExists(ProgPath + 'FAKEFD.CFG') Then MissingFile('FAKEFD.CFG');
Assign(TxtFil, ProgPath + 'FAKEFD.CFG');
Reset(TxtFil);
ReadLn(TxtFil, Setup.St1);
If Eof(TxtFil) Then
begin
CustomError := 'Error reading FAKEFD.CFG - too few lines!';
ErrorHandler(250);
end;
ReadLn(TxtFil, Setup.St2);
If Eof(TxtFil) Then
begin
CustomError := 'Error reading FAKEFD.CFG - too few lines!';
ErrorHandler(250);
end;
ReadLn(TxtFil, S);
If (StrToInt(S) > 25) Or (StrToInt(S) < 1) Then Setup.NumEsc := 2 Else Setup.NumEsc := StrToInt(S);
If Eof(TxtFil) Then
begin
CustomError := 'Error reading FAKEFD.CFG - too few lines!';
ErrorHandler(250);
end;
ReadLn(TxtFil, S);
If (StrToInt(S) > 25) Or (StrToInt(S) < 1) Then Setup.Delay := 2000 Else Setup.Delay := StrToInt(S) * 1000;
Close(TxtFil);
end;
Procedure DisplayFile(Filename : String);
var AnsiFile : Text;
begin
Assign(AnsiFile, Filename);
Reset(AnsiFile);
Repeat
Read(AnsiFile, Ch);
ComWriteChar(Ch);
Until Eof(AnsiFile);
Close(AnsiFile);
end;
Begin
ProgName := 'FakeFD';
ProgVersion := '1.23 ';
{$IFDEF DEBUG}
ProgPath := 'C:\BP\FAKEFD\';
{$ELSE}
ProgPath := GetProgramPath;
{$ENDIF}
Time_Credit := 5;
user_first_name := 'fAKEfD';
user_last_name := '1.23 bY fREEJACK oF C R 0 W';
ReadSetup;
Count := StrToInt(ParamStr(1));
If Count In [1..4] Then ComPort := Count Else ComPort := 0;
InitDoorDriver(False, True, 'fAKEfD 1.23 bY fREEJACK oF C R 0 W', 200, False);
Cls;
ComWriteLn('FakeFD 1.23.FW; Freeware; Crow Rules The BBS Scene!'#10#13);
ComWrite(Setup.St1 + ' ' + Numbers[Setup.NumEsc] + ' ' + Setup.St2);
Count := 0;
Repeat
Ch := #0;
ComReadChar(Ch);
If Ch = #27 Then Inc(Count);
Until Count = Setup.NumEsc;
If FileExists(ProgPath + 'BANNER.ASC') Then DisplayFile(ProgPath + 'BANNER.ASC');
Delay(Setup.Delay);
End.