home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
UOTD203C.ZIP
/
UOTD.DOC
next >
Wrap
Text File
|
1980-01-04
|
8KB
|
181 lines
User Of The Day version 2.03c
Copyright 1989 by John Parlin
A QuickBBS User Of The Day lottery program
Description
-----------
User Of The Day (henceforth known as UOTD) is a door program written for
QuickBBS. Basically, it's a "drawing" or "lottery" program. It selects,
at random, one user from the user file each day to be the winner. If
that user logs on during that day, he/she will be awarded a prize of X
number of minutes (Sysop definable) in addition to the user's daily
time limit. Note: UOTD will never select the Sysop (record #0) as the
winner.
Some Assembly Required
----------------------
It's pretty easy to setup as long as you're familiar with type 15 exits
and batch file writing.
You *MUST* use a type 15 exit! A type 7 will not allow altering of a user's
time. I would recommend an automatic type 15 execution from the TOP
menu. The command parameters are:
UOTD [/An] [/Ln] [/R] [/C]
Where: /A is an optional parameter which specifies the award value to be used.
This is the number of minutes a winner will be awarded. It can be
any number between 1 and 999. If ommitted, the default value of
30 minutes will be used.
/L is an optional parameter which specifies the minimum security level
that is eligible to be chosen as a winner. This can be any number
between 1 and 32767. The default value is 1 and if this parameter
is ommitted, anyone except record 0 may be chosen as a winner.
/R is an optional parameter which specifies that users may view the
program repeatedly. In the previous release, users could only view
the program once per day. Specifying this parameter will allow
users to view the program repeatedly. If the user is a winner, he/she
can still only collect an award once. UOTD will tell them that they
have already collected their winnings. If ommitted, users will only
be able to view the program once per day.
/C is an optional parameter which specifies that UOTD is NOT to run
but rather to check the date file to see if the date has been changed.
This option was added to help Sysops in setting up UOTD to automatically
run off the TOP menu but only once a day.
If this parameter is received, whether alone or with other valid
parameters, the program will NOT execute for viewing by an online
user. It will check the date file. If it does not exist or does not
match the current date, UOTD will exit with a DOS errorlevel of 10 set.
If the date file is found and the date has not changed, UOTD will exit
with a DOS errorlevel of 0 set.
This is to be used in conjunction with a SETFLAG utility. Here's a
scenario:
A Sysop wants to run UOTD before the user reaches the TOP menu. But,
the Sysop only wants it to run once per day, per user, to save logon
time. Here's what the Sysop did.
Edited TOP.MNU. Made the first entry an auto-execute type 15
containing the appropriate errorlevel to run UOTD. Made the entry
available only to users with the C5 flag set to ON. And, in the first
field of the type 15 menu (the display field), he put in a semicolon
(;) so that the cursor would not jump down a line. Here's how the
batch file that ran UOTD then looked:
if errorlevel 90 goto UOTD
....
..
:UOTD
UOTD /A30 /L50
SETFLAG C5 OFF EXIT
Goto Restart_Quick
....
..
So when a user who's C5 flag was set to on sees UOTD, the next thing
to happen (before control returns to QuickBBS) is that the user's C5
flag was set to OFF. Now when the user calls back later that same
day, his C5 flag will be off and he will go straight to the
"normal" TOP menu of the system.
Next, the Sysop edited his batch file some more. Whenever a caller
logs off, the Sysop takes a few seconds to run UOTD to check to see
if the date has changed. If it has, he wants to turn everyone's
C5 flag back on again. So, at the top of his batch file before
QuickBBS or a front end is restarted to wait for another call, he
inserted the lines:
:BatchStart
C:
Cd \QuickBBS
UOTD /C
if errorlevel 10 goto SetFlag
goto StartBBS
:SetFlag
SetFlag C5 ON ALL
goto StartBBS
:StartBBS
{ Here's where your front end mailer or BBS get called }
Now, if the date has changed since the last UOTD was chosen, UOTD
will exit with an errorlevel of 5 set so you know it's time switch
the user C5 flags back on.
End of scenario.
Now I know that you can simply run an event say at midnight to reset
all the C5 flags (or whatever flag you choose to use). But if you've
been a Sysop for a while, you know that events get missed occasionally.
Running UOTD with the /C parameter after each user logs off, doesn't
take a lot of time and it's a reliable way of checking to see if the
date has changed.
Command line examples:
UOTD /A45 /L100 /R Uses an award value of 45 minutes.
Requires a minimum security level of 100
to be eligible to win.
Players may view the program repeatedly.
UOTD Uses an award value of 30 minutes (default).
Requires a minimum security level of 1
to be eligible to win.
Players may view the program once daily.
UOTD /C The program doesn't run for viewing purposes.
Instead, UOTD checks the UOTD.DTE file to see
if a) it exists and b) the date has changed.
If it does not exist or the date has changed,
a DOS errorlevel of 5 is returned. If it
does exist and the date has not changed, a
DOS errorlevel of 1 is returned.
Once the program is started, an ASCII text file will be displayed to
the screen. This file is called UOTD.TXT. This is a file you create
and is intended to plug the game and your system. A sample UOTD.TXT
file comes with this program. Edit it to your heart's delight.
UOTD will automatically select new winners. If the date has changed
from the last time a user was selected, UOTD will first select a new
winner, then continue to run. A new winner will also be selected if
the UOTD.DTE (date) or UOTD.DAY (daily winner) files cannot be found.
Anything displayed to the screen that has block characters in front and
in back of it, is _not_ echoed to the com port and is merely Sysop
information.
This program has built-in carrier detect, user inactivity timers,
and QuickBBS time remaining support. There is no need for a watchdog
type program.
Licensing Agreement
-------------------
This program is free of charge to whomever wants to use it. I wrote it
for the heck of it and I'm sharing it with you. If you like it, drop me
a netmail message at 1:282/12 saying "Thanks, John!" and that's all I'll
ask. If I don't get any input, the development will stop at this
release. (That's not meant to sound impressive or anything. Just that
I won't update it if no one's using it.)
Do not modify the contents of this archive. This means, do not put your
BBS add into it for people to see when they extract it. I think that's
tacky and gawdy so please don't do it. Feel free to convert the archive
to any format you wish.
The author is not responsible for any damages to hardware, software or
anything else related to running this program. I don't think it will
mess anything up but if it does, I ain't responsible.
John Parlin
City Terminal BBS
Twin Cities Metronet 1:282/12