home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / TB200A.ZIP / MODMAKE.DOC < prev    next >
Encoding:
Text File  |  1995-06-24  |  17.8 KB  |  400 lines

  1.  
  2.    ████████████████████████████████████████ ██████▄
  3.       ▐█▌   ▄▄   ▄▄ ▄▄▄▄▄▄  ▄▄▄▄▄▄   ▄▄▄▄▄  ██▄▄▄█▀  ▄▄▄▄▄   ▄▄▄▄▄  ▄▄  ▄▄▄
  4.       ▐█▌   ██   ██ ██▀▀▀██ ██▀▀▀██ ██▀▀▀██ ██▀▀▀██ ██▀▀▀██ ██▀▀▀██ ██▄██▀▀
  5.       ▐█▌   ██   ██ ██████  ██▀▀▀█▄ ██   ██ ██   ██ ███████ ██   ██ ██▀██▄
  6.       ▐█▌   ▀█████▀ ██  ▀██ ██████▀ ▀█████▀ ██████▀ ██   ██ ██   ██ ██  ▀██
  7.    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  8.  
  9.                          External Module Information
  10.          By Mikerosoft Productions ■ Steve Blinch & Michael Helliker
  11.  
  12.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  13.  
  14.  
  15.                                    Contents
  16.              ───══════════════════════════════════════════════───
  17.  
  18.                 1. Modules - What are they?
  19.                 2. "Quick, I just gimme the specs, dammit! :-)"
  20.                 3. Less important stuff...
  21.                 4. Sources & Structures...
  22.                 5. Need Comm Routines?
  23.  
  24.              ───══════════════════════════════════════════════───
  25.  
  26.  
  27.  
  28.     1. Modules - What are they?
  29.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  30.  
  31.         External Modules  are the  equivalent  of BBS  doors, specifically
  32.     designed to work with TurboBANK.  They eliminate the need to release a
  33.     new version of TurboBANK every time a casino game is created, and they
  34.     allow other programmers to create their own casino games as well.
  35.  
  36.  
  37.     2. "Quick, I just gimme the specs, dammit! :-)"
  38.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  39.  
  40.        Here's everything you need to know to make an external module...
  41.  
  42.                   Getting TurboBANK to recognize your module
  43.              ───══════════════════════════════════════════════───
  44.  
  45.                 TurboBANK keeps track of all available modules
  46.                 in the file MODULES.IDX.  This file contains:
  47.  
  48.                 - The name of the module, as shown to the user
  49.                 - The 12 letter filename (i.e. 12345678.EXE)
  50.                 - The letter 'N'
  51.  
  52.                 The above 3-line information  sequence is  re-
  53.                 peated for each module, with NO blank lines or
  54.                 other separators between each entry.  Just add
  55.                 your info to the  end  of  this file  and your
  56.                 module will be available to the users.
  57.  
  58.  
  59.                   Getting your module to recognize TurboBANK
  60.              ───══════════════════════════════════════════════───
  61.  
  62.                 Just  before  the  execution  of  the  module,
  63.                 TurboBANK creates the file TBINFO.DAT, which
  64.                 contains:
  65.  
  66.                 - The user's name
  67.                 - The user's record number in the userfile
  68.                 - The com port being used
  69.                 - The baud rate being used
  70.                 - The user's time left, in minutes
  71.                 - The user's KB left
  72.                 - The user's security
  73.                 - The user's location (City/Province/Whatever)
  74.                 - "TRUE" or "FALSE": User has robbing enabled
  75.                 - The user's insurance, days left
  76.                 - The number of minutes the user deposited
  77.                   today
  78.                 - The number of kilobytes the user deposited
  79.                   today
  80.                 - The number of minutes the user withdrew
  81.                   today
  82.                 - The number of kilobytes the user withdrew
  83.                   today
  84.                 - The number of minutes the user has banked
  85.                 - The number of kilobytes the user has banked
  86.                 - The number of minutes the user has loaned
  87.                 - The number of kilobytes the user has loaned
  88.                 - The "Text Color" - Default is the CRT unit's
  89.                   "White" (15)
  90.                 - The "Bar Color" - Default is the CRT unit's
  91.                   "Blue" (01)
  92.                 - The "Prompt Color" - Default is the CRT
  93.                   unit's "LightBlue" (09)
  94.                 - The "Hilight Color" - Default is the CRT
  95.                   unit's "LightCyan" (11)
  96.                 - The status bar foreground color - Default is
  97.                   the CRT unit's "White" (15)
  98.                 - The status bar background color - Default is
  99.                   the CRT unit's "Blue" (1)
  100.  
  101.                 TurboBANK also  reads  this file  back in upon
  102.                 returning, so PLEASE write all the information
  103.                 BACK to it  before your  module  exits.  Also,
  104.                 TurboBANK does not deduct  the amount of  time
  105.                 the user spent in the  module upon  returning,
  106.                 so please have your module do that itself.
  107.  
  108.  
  109.                   ****** Module Requirement Thingies! ******
  110.                   ******      PLEASE READ THIS!!      ******
  111.              ───══════════════════════════════════════════════───
  112.  
  113.                 We're not putting many restrictions on module-
  114.                 making, but there ARE a couple of things  that
  115.                 we've gotta say... :-)
  116.  
  117.                 - PLEASE adhere to the color scheme written to
  118.                   TBINFO.DAT, which is configured by the SysOp
  119.                   in TBSETUP.EXE -- We want to keep SOME color
  120.                   coordination! :-)
  121.  
  122.                 - If at all  possible, please  try to use  the
  123.                   same status bar style as TurboBANK.  We know
  124.                   that this is not always possible (some TPU's
  125.                   have built-in unchangeable status bars), but
  126.                   for those of you with your own routines, try
  127.                   to come somewhere close to TurboBANK's... If
  128.                   you want our routines, see below.
  129.  
  130.                 - PLEASE keep  the top 4  lines of  the screen
  131.                   untouched.  If you can't  manage to do  this
  132.                   (some TPU's  automatically clear the  screen
  133.                   upon initialization),  please either  redraw
  134.                   these  top 4 lines as  soon as  possible, or
  135.                   contact us at  Mikerosoft BBS to  get a  new
  136.                   TPU package (see below for more info).
  137.  
  138.                 - If you REALLY want  to  charge  registration
  139.                   fees for your modules,  go ahead, but PLEASE
  140.                   do not make your  registration nags any more
  141.                   annoying than ours are :-)
  142.                   A simple "UNREGISTERED" will usually do, and
  143.                   maybe a cripple or two.. hehe..
  144.  
  145.                 - Try  to  keep your modules fairly  small and
  146.                   try not to hog memory -- TurboBANK will only
  147.                   swap itself out of  memory if it  absolutely
  148.                   HAS to, as this slows loading down a lot...
  149.  
  150.                 - MOST IMPORTANTLY!!!!!  PLEASE!!!!!!!  Upload
  151.                   your module to us! :-)  We like to see  what
  152.                   kinda things  people have  made... Heck,  we
  153.                   might  even  distribute  it  with  the  next
  154.                   version of TurboBANK if we like it.. :-)  If
  155.                   nothing  else,  we  can  put  it  online for
  156.                   people to download  straight from Mikerosoft
  157.                   BBS.
  158.  
  159.  
  160.     3. Less important stuff...
  161.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  162.  
  163.  
  164.                      Providing the SysOp with Easy Setup!
  165.              ───══════════════════════════════════════════════───
  166.  
  167.                 If you really want to,  you can write your own
  168.                 setup program, but if you want to quickly  and
  169.                 easily let the SysOp do it through TBSETUP.EXE
  170.                 (TurboBANK's setup program), this is how you'd
  171.                 go about doing it.
  172.  
  173.                 TBSetup reads from the file TBMODCFG.CTL. This
  174.                 file contains specific instructions  regarding
  175.                 program setup.  Here's how it works:
  176.  
  177.                 Add the name of your program, in []'s, to  the
  178.                 file, i.e.
  179.  
  180.                 [Joe's BlackJack Game]
  181.  
  182.                 Add the string "cfgfile=" followed by the name
  183.                 of your configuration file, i.e.
  184.  
  185.                 cfgfile=JOEBLACK.CFG
  186.  
  187.                 Then, for each question you want TurboBANK  to
  188.                 ask the SysOp, add the following lines:
  189.  
  190.                 valuetype=<integer|string>
  191.                 maximum=<max integer|max length of string>
  192.                 default=<default integer|default string>
  193.                 question=<literal question text>
  194.  
  195.                 For example, to ask the SysOp his age:
  196.  
  197.                 valuetype=integer
  198.                 maximum=99
  199.                 default=30
  200.                 question=Enter your age
  201.  
  202.                 Refer to TBMODCFG.CTL for examples.
  203.  
  204.  
  205.     4. Sources & Structures...
  206.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  207.  
  208.                          Constants, Structures, Etc.
  209.              ───══════════════════════════════════════════════───
  210.  
  211.    ------------------------------- Cut Here -------------------------------
  212. Const
  213.  TBCfgName      = 'TBANK.CFG';         { PLEASE do not write to this file!! }
  214.  TBPbkName      = 'PASSBOOK.DAT';                { Passbook file, see below }
  215.  TBHdrName      = 'TBMSGHDR.DAT';            { TBMsg header file, see below }
  216.  TBTxtName      = 'TBMSGTXT.DAT';      { TBMsg literal text file, see below }
  217.  TBDrpName      = 'TBINFO.DAT';            { Text file containing drop info }
  218.  TBModName      = 'MODULES.IDX';         { Text file containing module info }
  219.  TBCtlName      = 'TBMODCFG.CTL';  { Text file containing module setup cmds }
  220.  
  221.  BaudDef        : Array[1..6] Of String[14] =              { Used in config }
  222.                    ('Below 2400   ',
  223.                     '02400 - 09599',
  224.                     '09600 - 14399',
  225.                     '14400 - 21599',
  226.                     '21600 - 28800',
  227.                     'Above 28800  ');
  228.  
  229.  TBLockout          = 001;                     { Used in BankRobPenalty and }
  230.  DeductBankedTime   = 002;                           { UserRobPenalty above }
  231.  DeductBankedKB     = 004;
  232.  DeductBBSTime      = 008;
  233.  DeductBBSKB        = 016;
  234.  
  235.  
  236. Type
  237.  Items              = (NWU, { Newuser            }       { Used in passbook }
  238.                        ROB, { Theft Penalty      }
  239.                        CHQ, { Cheque             }
  240.                        COR, { Correction         }
  241.                        DEP, { Deposit            }
  242.                        INT, { Interest           }
  243.                        INS, { Insurance Payment  }
  244.                        INV, { Investment Return  }
  245.                        LNP, { Loan Payment       }
  246.                        ODI, { Overdraft Interest }
  247.                        SC,  { Service Charge     }
  248.                        UPD, { Passbook Update    }
  249.                        WD,  { Withdrawal         }
  250.                        MEM  { Memo Sent Via BBS  }
  251.                       );
  252.  PassbookType = Record                 { PASSBOOK.DAT, Passbook information }
  253.    Username         : String[30];
  254.    Date             : LongInt;
  255.    Item             : Items;
  256.    KBW,KBD,
  257.    TimeW,TimeD,
  258.    KBBal,TimeBal    : LongInt;
  259.   End;
  260.  
  261.  BaudLongInt        = Array[1..6] Of LongInt;          { Used in ConfigType }
  262.  
  263.  ConfigType = Record                  { TBANK.CFG - TurboBANK Configuration }
  264.    Hdr              : String[35];
  265.  
  266.    BBSSoftware      : Byte;         { 1=RemoteAccess, 2=SuperBBS, 3=Concord }
  267.  
  268.    LogStyle         : Byte;           { 1=SBBS, 2=RAExp, 3=RACom, 4=Concord }
  269.    LogName          : String[99];                      { Full path/filename }
  270.    CorrectANSI      : Boolean;                            { er.. Force ANSI }
  271.  
  272.    LocalBaud        : Byte;       { Use which restrictions (1..6) for local
  273.                                                                      logins }
  274.  
  275.    DelaySecs        : Real;               { Seconds to delay after messages }
  276.  
  277.    InvestRate,
  278.  
  279.    InsurancePercentT,          { % of time taken daily for insurance (*100) }
  280.    InsurancePercentK,            { % of KB taken daily for insurance (*100) }
  281.  
  282.    DailyTimeInt,                            { Daily interest on time (*100) }
  283.    DailyKBInt,                                { Daily interest on KB (*100) }
  284.    DailyTimeLoanInt,                   { Daily interest on time loan (*100) }
  285.    DailyKBLoanInt   : Real;              { Daily interest on KB loan (*100) }
  286.  
  287.    KBCoverage,                        { Max insurance coverage for KB theft }
  288.    TimeCoverage,                    { Max insurance coverage for time theft }
  289.  
  290.    InsuranceCostTime,                  { One-time cost of insurance in mins }
  291.    InsuranceCostKB,                      { One-time cost of insurance in KB }
  292.  
  293.    TimeToKBCost,                               { Cost to convert Time -> KB }
  294.    KBToTimeCost,                               { Cost to convert KB -> Time }
  295.  
  296.    MaxTimePurchase,                                            { In minutes }
  297.    MaxKBPurchase,                                            { In kilobytes }
  298.  
  299.    MaxTimeTransfer,                                            { In minutes }
  300.    MaxKBTransfer,                                            { In kilobytes }
  301.  
  302.    MaxKBInvestAmt,               { Can't invest more KB than this at a time }
  303.    MaxKBInvestDays,          { Can't invest KB for more than this # of days }
  304.    MaxKBInvestNum,          { Can't have more than this # of KB investments }
  305.    MaxTimeInvestAmt,           { Can't invest more time than this at a time }
  306.    MaxTimeInvestDays,      { Can't invest time for more than this # of days }
  307.    MaxTimeInvestNum,      { Can't have more than this # of time investments }
  308.  
  309.    MaxTimeLoan,                                                { In minutes }
  310.    MaxKBLoan,                                                { In kilobytes }
  311.  
  312.    MaxKBWithdraw,                                            { In kilobytes }
  313.    MaxKBDeposit,                                             { In kilobytes }
  314.    MaxTimeWithdraw,                                            { In minutes }
  315.    MaxTimeDeposit   : BaudLongint;                             { In minutes }
  316.  
  317.    BankRobWinTimePct, { % of ALL users' banked time recvd when rob succeeds }
  318.    BankRobWinKBPct,     { % of ALL users' banked KB recvd when rob succeeds }
  319.    UserRobWinTimePct,          { % of victim's time recvd when rob succeeds }
  320.    UserRobWinKBPct  : Real;      { % of victim's KB recvd when rob succeeds }
  321.    RobPenaltyData   : Array[0..10] Of RobPenaltyType; { Element 0 = Default }
  322.  
  323.    BankRobPenalty,                               { These two are bitmapped, }
  324.    UserRobPenalty   : Integer;                    { see the constants below }
  325.  
  326.    Location,                                           { of BBS (city/prov) }
  327.    BBSName,
  328.    SysOpName,
  329.    ExtModulePath    : String[99];      { Path to external modules, DIR ONLY }
  330.  
  331.    KBLoanDeductPct,                   { % KB deducted daily towards KB loan }
  332.    TimeLoanDeductPct: Real;       { % Time deducted daily towards time loan }
  333.  
  334.    BC,NC,PC,HC,SF,SB: Byte;                       { SysOp-configured colors }
  335.  
  336.    GarnishLoans     : Boolean;         { Should loans be garnished nightly? }
  337.  
  338.    ForceTimeLoanTake,         { If garnishing disabled, take this at loadup }
  339.    ForceKBLoanTake  : Real;   { If garnishing disabled, take this at loadup }
  340.  
  341.    Unused           : Array[1..4065] Of Char;
  342.   End;
  343.  
  344.  HdrType = Record        { TBMSGHDR.DAT, internal TurboBANK messagebase hdr }
  345.  
  346.    ToUser,                                                      { Recipient }
  347.    FrUser           : String[35];                                  { Sender }
  348.  
  349.    Date             : DateTime;        { Date/time, why bother packing? :-) }
  350.  
  351.    Subject          : String[35];                 { Take a wild guess.. :-) }
  352.    Del              : Boolean;                     { Delete in maintenance? }
  353.  
  354.    TxtPtr,                              { Where text starts in TBMSGTXT.DAT }
  355.    TxtLen           : LongInt;             { How many bytes text are there? }
  356.   End;
  357.    ------------------------------- Cut Here -------------------------------
  358.  
  359.  
  360.     5. Need Comm Routines?
  361.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  362.  
  363.         Some of you may not have communications routines for Turbo Pascal,
  364.     or may have routines that  are difficult  to use or  do not work  well
  365.     in modules (i.e., if your comm routines  require a  DORINFO1.DEF, they
  366.     probably won't work in any modules, as there *IS* no DORINFO1.DEF!)
  367.         To assist those interested in making modules who are having  these
  368.     problems, we are making the routines that we use for modules available
  369.     upon  request  (TPU's only,  no source :-)) COMPLETELY FREE.  All  you
  370.     have  to do is  ask for  them.  These  routines are  for Turbo  Pascal
  371.     version 7.0  (Borland  Int'l,  Inc) and  are designed specifically for
  372.     use with TurboBANK.  They  are very  easy to  use, and do most of  the
  373.     work for you.  No specific knowledge of modeming is required -- if you
  374.     can write a program, you can make it a module with these routines.
  375.  
  376.  
  377.                     Getting the Mikerosoft Module Routines
  378.          ───══════════════════════════════════════════════════════───
  379.  
  380.                                  Call...
  381.  
  382.                     ╔════════════════════════════════╗
  383.                     ║ Mikerosoft BBS  (604) 864-8160 ║ 
  384.                     ║ Abbotsford, BC  2400-14400 BPS ║
  385.                     ╚════════════════════════════════╝
  386.  
  387.                   (the routines are not available at our
  388.                    support sites or via FTP, so you MUST
  389.                    call here to get them. Login with the
  390.                    name MIKEROSOFT for  quicker service.)
  391.  
  392.  
  393.     End of MODMAKE.DOC
  394.    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  395.  
  396.  
  397.  
  398.  
  399.  
  400.