BANK.PPE - Originally By John Palazzolo JP's Place (703) 237-5786 Modified By Dan Shore The Shoreline BBS (301) 946-2771 Written July 31, 1996 Purpose - To give a user the opportunity to save time or bytes for use on a later date. Also offer a user the ability to exchange time and/or bytes from their bank account or their online account. Lastly, Gambling Modules can be added for users to try their hand at winning time or bytes. All these options are configurable by the SysOp on a security level basis. NOTE: Make sure to read the ENTIRE documentation as it will explain the installation and operation of all the PPE's contained within the BANK archive. The docs are not that long - so please READ!!! - even though SysOp's do not normally read docs. :) WARRANTY AND DISCLAIMER: ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ YOU MAY NOT ENGAGE IN NOR PERMIT THIRD PARTIES TO ENGAGE IN ANY OF THE FOLLOWING: 1. GRANTING SUB-LICENSES, LEASE OR OTHER RIGHTS IN THE SOFTWARE TO OTHERS. THIS PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE PROGRAM IS ASSUMED BY YOU. FURTHERMORE, I THE AUTHOR DO NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF OR THE RESULTS OF THE USE OF THE PROGRAM, OR THAT THE PROGRAM WILL RUN WITHOUT ERROR, AND YOU RELY ON THE PROGRAM AND RESULTS SOLELY AT YOUR OWN RISK. I THE AUTHOR CANNOT ACCEPT RESPONSIBILITY FOR SYSTEM DAMAGE, LOSS OF PROFIT, OR ANY OTHER SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OR INABILITY TO USE THIS PRODUCT. YOU ARE ALLOWED TO MODIFY THE SOURCE CODE AND REDISTRIBUTE. YOU ARE NOT ALLOWED TO CHARGE REGISTRATION FEES, OR ANY OTHER TYPE OF FEES, OR COSTS FOR THE PROGRAM ITSELF OR FOR THE WORK YOU OR OTHERS PERFORMED ON THE PROGRAM. THIS PROGRAM IS TO REMAIN *FREE* WITH FULL SOURCE CODE AVAILABLE. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ A. INSTALLATION ÄÄÄÄÄÄÄÄÄÄÄÄ 1. Add three new entries to your CMD.LST file(s) Your entries in CMD.LST should look something like the following: Charges Per PPE/MNU File Specification -or- Command Sec Minute Use Keystroke Substitution ÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ BANK 5 0 0 C:\PCB\PPE\BANK\BANK.PPE BANKEDIT 110 0 0 C:\PCB\PPE\BANK\BANKEDIT.PPE BANKPACK 110 0 0 C:\PCB\PPE\BANK\BANKPACK.PPE (Change the security levels and paths to match your system) ** BankEdit and BankPack should only be accessible to the SysOp Don't forget to add "BANK" to your main menu so users know the Bank is available for their use. 2. Edit the BANK.CFG See BANKCFG.SAM for a sample file. Here is the format: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Format: 1 - User Security Level (level to match) ³ ³ 2 - Maximum Bank Time (balance) ³ ³ 3 - Maximum Bank Bytes (balance) ³ ³ 4 - Maximum Bank time user can W/D per day ³ ³ 5 - Maximum Bank bytes user can W/D per day ³ ³ 6 - Time Exchange Rate ³ ³ 7 - Byte Exchange Rate ³ ³ 8 - Allow exchange with Bank Balances ³ ³ 9 - Allow exchange with Online Balances ³ ³ ³ ³ Any line that starts with a (') is a comment ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Example: ÄÄÄÄÄÄÄÄ 5;0;500000;0;500000;10000;50000;Y;Y NOTE: You need an entry for EVERY security level that is allowed to use the bank. If a users security level cannot be matched, they are not allowed into the Bank program. First 5 Parameters ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The first five parameters are self explanatory, so no need to waste space explaining them. Time Exchange Rate and Byte Exchange Rate ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This is the exchange rate a user will receive for exchanging (trading-in) time or bytes. In the example above, the time exchange rate is 10,000. This means for every 1 minute the user exchanges, then get 10,000 bytes in return. The same applies for the Byte exchange. In the example above the user has to exchange 50,000 bytes for every 1 Minute they wish to receive. Bank Balance and On-Line Balance ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This toggle (Y or N) allows the user to exchange Bank Balances, or On-Line Balances, or Both. 3. Edit the BANKPACK.CFG Only one entry in this file. Path to your username index files. Example: ÄÄÄÄÄÄÄÄ c:\pcb\main B. BANK2.PPE ÄÄÄÄÄÄÄÄÄ Purpose: PCBText replacement for prompt #76 which is: CAUTION: Auto-Disconnect in (1) mins.! BANK2.PPE checks if a user is down to 1 min remaining, and if so, checks the BANK.NDX file to see if they have an account in the Bank Database. If the user has an account, BANK2.PPE checks for a bank time balance. If a balance is available, the user will be given the opportunity to withdraw time. Installation: Replace PCBText #76 with: !c:\pcb\ppe\bank\bank2.ppe @OPTEXT@ You can edit your PCBText file manually or use a command line like the example below. Modify the paths for your setup!!! MKPCBTXT C:\PCB\GEN\PCBTEXT /I:76 "!c:\pcb\ppe\bank\bank2.ppe @OPTEXT@" C. BANK3A.PPE ÄÄÄÄÄÄÄÄÄÄ Purpose: When a user logs off, prompt them to bank time, bytes or log off the BBS. The user will only be prompted for depositing time or bytes IF they are able to (.CFG file allows their security level to deposit time/bytes and their bank balance is not max'ed out already). Why is it called BANK3A.PPE instead of BANK3.PPE? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ BANK3.PPE is another PPE that I wrote and run on my system. It is basically the same as BANK3A.PPE, but in addition, it allows my users to play one of the two logoff games written by Nannette Thacker ("Don't Wake the Sysop" & "SPIKED"). These are GREAT games that can be played quickly by the user right before they logoff. When the user loses in the game (and they WILL lose) the game drops carrier and the user is logged off. If your BBS uses these great games by Nannette, then you may be interested in this module. Just drop me a note and I can make the file available for you to download or FREQ from the BBS. Installation: 1. Go into PCBSETUP and edit the log off script file. B. File Locations D. New User/Logon/off Questionnaires Name/Loc of Logoff Script Quest. Edit this field to the following: C:\PCB\PPE\BANK\BANK3A.PPE NOTE: You have have to change the path to the PPE to match your system. 2. Edit the file BANK3TL for your BBS name. Try not to change the width of the box as it will not match the box in the PPE. If you need to change the width of the box, then you will need to modify the PPE and recompile the code. Installation is now complete!!! D. When do I run BANKPACK? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Bankpack is a program which scans the bank database and deletes user records from the database if: 1. The user no longer exists in the user base of the BBS 2. The user has no (zero) time or byte balances in the Bank Database If the user being processed does not match either of these requirements, they are retained in the database. In order for BANKPACK to run successfully it needs EXCLUSIVE access to the database (no users currently using the Bank). Bankpack can be run locally or from remote. Remember, when BANKPACK is running, the database will be LOCKED and no users will be able to access it. E. BankEdit ÄÄÄÄÄÄÄÄ BankEdit is a program which allows adding a new user, or searching, listing, or editing of an existing user in the Bank Database. You can search for partial or whole names (partial = SLOW->Sequential, whole = FAST->Indexed). You have the ability to edit ANY of the Bank information for a particular user. Here is a list of information you can edit: Last Access Date Bank Time Balance Last Time W/D Date Bank Time W/D on last date Bank Bytes Balance Last Byte W/D Date Bank Bytes W/D on last date Flag user for Deletion <-- Then run BANKPACK to Zero out all user values remove/delete user F. Gambling Modules ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Included with BANK.PPE is the option to run Gambling Modules. These modules are games for the user to gamble their Bank Time or Bank Bytes against. (A user cannot gamble their on-line balances) The winning percentages and maximum bet amounts are configured by the SysOp for EACH game. Each Gambling Module can be configured so a player can play once per day, or as many times as the user wishes (that is if their bank balances hold out). Included with the BANK.PPE are 5 games already written by Dan Shore: Number Guess : Guess a Number between 1 and 5 MixedUp Words : Unscramble the Scrambled word Five Guess : Five tries to guess a number between 1 and 100 High-Low : Will Dice total be higher or lower than 7 TwenFive : Pick 5 grids and try to total more than 25 points A little side note:..........Now the GOOD PART!!! Included with the Gambling Modules is a Module called GENERIC. Included in this file is: GENERIC.PPS <- Complete Source INTRO <- Opening screen display for Game GENERIC.CFG <- Configuration file for the game This is the complete source code for writing your OWN Gambling Module. All the input handling, screen display, winner percentage calculations, and .CFG reading, is already programmed for you. All you need to do is program the actual GAME code into the procedure called: PROCEDURE DO_GAMBLE (VAR BOOLEAN did_win) .... Your code goes here ... END PROC Also, at the beginning of the GENERIC.PPS, there is a statement: ' ' This is the name of the Gambling Module ' mod_name = "Number Guess" Just change the name to match your Gambling Module name. The only requirement of the DO_GAMBLE code is that it returns the BOOLEAN variable did_win for the results of the game. did_win = TRUE => User Won did_win = FALSE => User Lost Look at the source code for the included games to get an idea of the game code needed. There isn't much to a simple game and everything else is written for you. Once you write a module, that program is yours......something you wrote!! It's a lot of fun! How to install a Gambling Module ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Edit the file GAMBLE.DAT which should be located in the same directory as BANK.PPE. The format of this file is: 1st line = Full path and filename of the PPE 2nd line = Description of the game Any blank line or a line starting with a ' is considered a comment and is ignored. Currently, BANK.PPE can support 15 modules. If you wish to support more, just change the array size in BANK.PPS and recompile. Editing the .CFG file for each game. The format of the file is: Line 1 = Only allow the user to play once per day (TRUE/FALSE) Line 2 = Allow Time Betting;Maximum User can Bet;Winning Percentage Line 3 = Allow Byte Betting;Maximum User can Bet;Winning Percentage Here is an example: TRUE TRUE;30;.50 TRUE;500000;1.00 The maximum amount a user can bet is determined by: 1. The amount entered in the .CFG file -OR- 2. The amount of their current Bank Balance When a user wins a bet then receive: 1. All their time or bytes which they bet (-PLUS-) 2. The amount of their bet TIMES the Winning Percentage Miscellaneous files for the Gambling Modules ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ - Each gambling modules has a file called INTRO. This is the display shown upon entering the Gambling Module. - Each Gambling Module will create the following files in the same directory as the Gambling PPE: NODE????.LOG - Complete logging of what the user did (node specific) CKDATE.DAT - Date Module was last played GAM-USER.DAT - Contains names of users who have played the game on the date contained in CKDATE.DAT NOTE: CKDATE.DAT and GAM-USER.DAT will only be created if limiting the users to one play per day. (Determined in .CFG file) The GAM-USER.DAT file will be recreated when the first user plays the game on a new day. G. Registration ÄÄÄÄÄÄÄÄÄÄÄÄ This program is being released under the "Freeware" concept. If you really like the program, send a small donation to the author to help encourage more PPE's in the future. ($10 or less) H. Conclusion ÄÄÄÄÄÄÄÄÄÄ This archive has been zipped with an authenticity verification stamp. When you unzip this archive you should see at the end: Authentic files Verified! # MMJ131 THE SHORELINE BBS If you do not see this, then the file has either been tampered with or has been rezipped by an upload processor. If you have any questions, comments, suggestions, etc. please feel free to contact me via NetMail, the PCBoard or the PCBNet conference in FIDO, or the PPL conference on RIME. Dan Shore (301) 946-2771 - Node 1 (public access) The Shoreline BBS (301) 946-4202 - Node 2 (subscribers) 4312 Ferrara Court (301) 946-8153 - Node 3 (public access) Silver Spring, MD 20906 (301) 946-5733 - Node 4 (public access) Fido Address - 1:109/458 1:109/457 RIME Address - #1205 or SHORELINE E-Mail Address - dan.shore%sline@ghawk.com