home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carsten's PPE Collection
/
Carstens_PPE_Collection_2007.zip
/
S
/
SCUMBANK.ZIP
/
BANK.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1994-05-14
|
7KB
|
319 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Date DATE001
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
Integer INTEGER009
Integer INTEGER010
Integer INTEGER011
Integer INTEGER012
String STRING002
String TSTRING003(5)
String STRING004
;------------------------------------------------------------------------------
Gosub LABEL010
Gosub LABEL006
Gosub LABEL003
STRING002 = "YoMaMa"
STRING004 = "BANK PPE v1.0 - Coded by Caffine"
Gosub LABEL008
While (Upper(STRING002) <> "Q") Do
Gosub LABEL004
Gosub LABEL007
INTEGER011 = 18
Gosub LABEL009
AnsiPos 21, 18
Print "@X0F[@X07W@X0F]@X07ithraw @X0F[@X07D@X0F]@X07eposit or @X0F[@X07Q@X0F]@X07uit- @X0F[ ]"
AnsiPos 53, 18
InputStr "_", STRING002, 0, 1, "WwDdQq", 2
If (Upper(STRING002) == "D") Then
Gosub LABEL001
Continue
Endif
If (Upper(STRING002) == "W") Then
Gosub LABEL002
Endif
EndWhile
Gosub LABEL005
End
:LABEL001
If (INTEGER004 >= INTEGER001) Then
STRING004 = "Error - The bank is already full."
Gosub LABEL008
Else
INTEGER006 = INTEGER003
STRING004 = "DEPOSIT TIME - Enter 0 to cancel."
Gosub LABEL008
INTEGER011 = 18
Gosub LABEL009
AnsiPos 26, 18
InputStr "@X0FAmount to Deposit", INTEGER006, 0, 3, Mask_Num(), 2 + 4
If (INTEGER006 == 0) Then
STRING004 = "Deposit Cancelled."
Gosub LABEL008
ElseIf (INTEGER006 > INTEGER003) Then
STRING004 = "Error - You only have " + String(INTEGER003) + " minutes available for deposit."
Gosub LABEL008
Else
INTEGER004 = INTEGER004 + INTEGER006
STRING004 = "Deposited " + String(INTEGER006) + " Minutes."
Gosub LABEL008
Log "Deposited - " + String(INTEGER006) + " Min", 0
AdjTime -INTEGER006
Endif
Endif
Return
:LABEL002
If (INTEGER005 == 0) Then
If (INTEGER012 >= INTEGER002) Then
STRING004 = "Error - You have already withdrawn the max. per day."
Gosub LABEL008
Else
STRING004 = "Error - No withdrawal time available."
Gosub LABEL008
Endif
Else
INTEGER007 = INTEGER005
INTEGER011 = 21
Gosub LABEL009
STRING004 = "WITHDRAW TIME - Enter 0 to cancel."
Gosub LABEL008
INTEGER011 = 18
Gosub LABEL009
AnsiPos 23, 18
InputStr "@X0FAmount to Withdraw", INTEGER007, 0, 3, Mask_Num(), 2 + 4
If (INTEGER007 == 0) Then
STRING004 = "Withdrawal Cancelled."
Gosub LABEL008
ElseIf ((INTEGER007 > INTEGER002) || (INTEGER007 > INTEGER005)) Then
STRING004 = "Error - You only have " + String(INTEGER005) + " minutes available."
Gosub LABEL008
Else
INTEGER004 = INTEGER004 - INTEGER007
INTEGER012 = INTEGER012 + INTEGER007
STRING004 = "Withdrew " + String(INTEGER007) + " Minutes."
Gosub LABEL008
Log "Withdrawed from bank - " + String(INTEGER007) + " Min", 0
AdjTime INTEGER007
Endif
Endif
Return
:LABEL003
GetUser
INTEGER008 = MinLeft()
If (Left(U_Notes(INTEGER010), 4) <> "BANK") Then
TSTRING003(1) = "BANK"
TSTRING003(2) = "TIME"
TSTRING003(3) = 0
TSTRING003(4) = 0
TSTRING003(5) = 0
Else
Tokenize U_Notes(INTEGER010)
INTEGER009 = 1
GetToken TSTRING003(INTEGER009)
While (TSTRING003(INTEGER009) <> "") Do
INTEGER009 = INTEGER009 + 1
GetToken TSTRING003(INTEGER009)
EndWhile
Endif
INTEGER004 = ToInt(TSTRING003(3))
DATE001 = ToDate(TSTRING003(4))
If (DATE001 == Date()) Then
INTEGER012 = ToInt(TSTRING003(5))
Else
DATE001 = Date()
INTEGER012 = 0
Endif
Return
:LABEL004
If (INTEGER004 < INTEGER002 - INTEGER012) Then
INTEGER005 = INTEGER004
Else
INTEGER005 = INTEGER002 - INTEGER012
Endif
If (INTEGER001 - INTEGER004 > INTEGER008) Then
INTEGER003 = INTEGER008
Else
INTEGER003 = INTEGER001 - INTEGER004
Endif
Return
:LABEL005
U_Notes(INTEGER010) = TSTRING003(1) + " " + TSTRING003(2) + " " + String(INTEGER004) + " " + String(Date()) + " " + String(INTEGER012)
PutUser
Return
:LABEL006
StartDisp 1
PrintLn "@CLS@@X07@X04 @X08▄@X04▄@X08▄▄@X04▄ @X0C▄@X04▄ @X0C▄ ▄ @X04▄▄██@X4C░░@X0C▄▄ @X04▄▀ ▀@X0C▄ @X04▄▓░▄▄ @X0C▀@X04▄@X0C▄ @X04░ @X0C▀@X4C░▓@X0C▄ ▄ ▄ ▄@X08▄@X04▄▄@X08▄▄@X04▄@X08▄"
PrintLn " █ @X04▄▀ ▄ ▀@X4C░░▓▓@X0C▌ @X04▓ ▀@X4C░@X0C▄ @X04▀▄ ▒@X4C░@X04█@X4C▓@X04▄ @X4C░░@X0C▄ @X04▐@X4C▒▓@X0C▌ @X08█"
PrintLn " @X04▀▒ ▄@X4C░░▓@X0C▄ @X04▒ ▐@X4C░▓@X0C▄ @X04▓▀█@X4C░▒▓@X04▄@X4C░░░@X0C▌▀ @X04▄▄@X4C▒▓@X0C▀"
PrintLn " @X08▀ ▀▀@X04▀ ▀▀▀▀▀▀▀▀@X0C▀ @X04▄▄▀▀▀▀█@X4C░░▓@X0C▄ @X04▀ ▐@X4C░▒▒@X0C▄@X04▀ ▀█@X4C▒░░▒▓@X0C▌@X04░@X4C ░@X0C▄ ▀@X04▀▀▀▀▀ ▀▀▀@X08▀▀ ▀"
PrintLn " @X04▄ ▀█@X4C▒▓@X0C▌ @X04█@X4C░░▒▓@X0C▄ @X04▀█@X4C░▒▓@X0C▌@X04▒█ @X4C ▒░▓@X0C▄"
PrintLn " @X08█▄@X04▄@X08▄@X04▄ ▄@X0C▄ ▄ ▄ @X04▀▄▄▄▄▄▄▄██@X4C▒@X0C▀@X04▄ ▄███@X4C░░▓▓@X0C▄ @X04▀@X4C▒▓@X0C▌@X04▓█ @X4C ░░▒▓@X0C▄ ▄ ▄@X08▄@X0C▄@X04▄@X08▄▄█"
PrintLn " @X04▀ ▀"
PrintLn " █ @X07Time Left Online : @X04█"
PrintLn " ▓ @X07Current Balance : @X04▓"
PrintLn " ▒ @X07Withdrawn Today : @X04▒"
PrintLn " ▒ ▒"
PrintLn " ░ @X07Max. Balance Allowed : @X04░"
PrintLn " ░ @X07Max. Withdrawal Per Day : @X04░"
PrintLn " ░ ░"
PrintLn " ░ @X07Available for Deposit : @X04░"
PrintLn " ▒ @X07Available for Withdrawal : @X04▒"
PrintLn " ▒ ▒"
PrintLn " ▓ ▓"
PrintLn " ▓ ▓"
PrintLn " ┌──────────────────────────────────────────────────────────────────────────┐"
PrintLn " │ │"
PrintLn "@X0F @X04└──────────────────────────────────────────────────────────────────────────┘"
Print "@X0F @X0CC@X04aF@X08F@X04iN@X0Ce @X04[@X0C¡Y@X04o@X08MaM@X0Ca!@X04] @X0CNi@X04gh@X08t Sla@X04sh@X0Cer @X04[AC@X0CiD]"
StartDisp 2
Return
:LABEL007
AnsiPos 45, 8
Print Space(9)
AnsiPos 45, 8
Print "@X0F", INTEGER008, " @X08Min."
AnsiPos 45, 9
Print Space(9)
AnsiPos 45, 9
Print "@X0F", INTEGER004, " @X08Min."
AnsiPos 45, 10
Print Space(9)
AnsiPos 45, 10
Print "@X0F", INTEGER012, " @X08Min."
AnsiPos 45, 12
Print "@X0F", INTEGER001, " @X08Min."
AnsiPos 45, 13
Print "@X0F", INTEGER002, " @X08Min."
AnsiPos 45, 15
Print Space(9)
AnsiPos 45, 15
Print "@X0F", INTEGER003, " @X08Min."
AnsiPos 45, 16
Print Space(9)
AnsiPos 45, 16
Print "@X0F", INTEGER005, " @X08Min."
Return
:LABEL008
INTEGER011 = 21
Gosub LABEL009
AnsiPos (80 - Len(STRING004)) / 2, 21
Print "@X0F", STRING004
Return
:LABEL009
AnsiPos 4, INTEGER011
Print Space(73)
Return
:LABEL010
FOpen 1, PPEPath() + "BANK.CFG", 0, 0
FGet 1, INTEGER010
INTEGER010 = INTEGER010 - 1
FGet 1, INTEGER001
FGet 1, INTEGER002
FClose 1
Return
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 1 End
; 29 Goto
; 42 Let
; 16 Print
; 22 PrintLn
; 15 If
; 1 FOpen
; 1 FClose
; 3 FGet
; 2 StartDisp
; 1 GetUser
; 1 PutUser
; 2 AdjTime
; 2 Log
; 3 InputStr
; 25 Gosub
; 10 Return
; 1 Tokenize
; 2 GetToken
; 18 AnsiPos
;
;
; ■ Functions used :
;
; 1 -
; 1 /
; 26 +
; 7 -
; 6 ==
; 3 <>
; 1 <
; 4 >
; 2 >=
; 15 !
; 1 ||
; 1 Len(
; 3 Upper()
; 1 Left()
; 6 Space()
; 3 Date()
; 9 String()
; 2 Mask_Num()
; 1 PPEPath()
; 1 MinLeft()
; 1 ToDate()
; 2 ToInt()
;
;------------------------------------------------------------------------------
;
; Analysis flags : WA
;
; W - Write user ■ 5
; Program writes a user record. Although this may be normal for a
; User Editor, it may also be a way to modify an account level.
; ■ Search for : PUTUSER
;
; A - Adjust online time remaining ■ 5
; Program modify the amount of online time remaining, this may
; be a way to bypass time limits
; ■ Search for : ADJTIME
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 0 For/Next
; 2 While/EndWhile
; 13 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------