home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
telix
/
tlx3_all.arc
/
SCRIPT.SLT
< prev
Wrap
Text File
|
1988-07-15
|
8KB
|
222 lines
// Note: _entry_pass is a system variable into which the
// dialing routines put whatever is in the password
// field of the dial directory entry being used.
str user_name[] = "User Name"; // Enter your name here
str prodoor_loc[] = "Open 1"; // Command on this PCB
// to open ProDoor
str want_graphics[] = "y"; // Want graphics on PCB
str PCB_mailscan[] = "y"; // Scan since last read
// on PCB
str Uses_SEAdog[] = "n"; // States whether Opus
// uses SEAdog
main()
{
int stat; // initiate track var
int t1, // initiate individual
t2, // track variables
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
t11,
t12,
t13,
t14,
t15,
t16;
int mail_scan; // initiate WBBS timer
int tmark; // initiate script
// timout timer
alarm(2); // sound a connect
// alarm, 2 secs
if (not _entry_pass)
{
prints ("Sorry, I don't know the password for this BBS!");
return;
}
t1 = track(" graphics", 1); // definitions of what
t2 = track("first name", 1); // strings to track
t3 = track("password", 1);
t4 = track("read it", 1);
t5 = track("More", 1);
t6 = track("continue", 1);
t7 = track("Command", 0);
t8 = track("█ █", 1);
t9 = track("Scan ", 1);
t10 = track("[Y,n]?", 0);
t11 = track("Select (", 1);
t12 = track("MAIN MENU:", 0);
t13 = track("[Y", 1);
t14 = track("Ctrl-K", 1);
t15 = track("MAIN command", 0);
t16 = track("WBBS", 1);
if (uses_SEAdog == "y") // If an Opus system on
{ // SEAdog, send a CR to
cputs("^M"); // get the ball rolling
}
tmark = timer_start(2100); // wait up to 3.5 minutes
while (not time_up(tmark)) // track until time up
{
terminal(); // let Telix process any
// chars and keys
stat = track_hit(0); // see which (if any)
// was hit
if (stat == t1) // say whether we want
// graphics in PCBoard
{
delay(5); // wait 1/2 second
cputs(want_graphics); // send defined constant
cputs(" q^M"); // don't display welcome
}
else if (stat == t2) // Found name prompt
{
delay(10); // let the BBS finish
cputs(user_name); // send defined name
cputs("^M"); // terminate string
}
else if (stat == t3) // Found password prompt
{
cputs(_entry_pass); // Send password field
cputs("^M"); // send <CR>
}
else if (stat == t5) // stop the "More:"
// prompt
{
delay(1);
cputs("N^M"); // say NO to more
}
else if (stat == t10) // Opus asked [Y,n]?
{
delay(1);
cputs("^M"); // Tell Opus YES
}
else if (stat == t11)
{
delay(3); // Quit Opus Bulletins
cputs("^M");
}
else if (stat == t12) // Found OPUS/Wildcat
// MAIN menu
{
delay(20); // OPUS & Wildcat read
cputs("M^M^M");
break; // logon done, abort
}
else if (stat == t13) // say not to y/n prompt
{
delay(1);
cputs("N^M "); // change to say yes
}
else if (stat == t14)
{ // Abort RBBS stats
cputs("^K");
}
else if (stat == t15)
{
delay(1);
cputs("R^M"); // Drop to RBBS msg base
break;
}
else if (stat == t16) // WBBS complete script
{
cputs("^K"); // abort from welcome scr
delay(10);
cputs(user_name); // send your name
cputs("^M");
delay(5);
cputs(_entry_pass); // send your password
cputs("^M");
delay(10);
cputs("^C"); // abort news file
mail_scan = timer_start(30); // wait for new mail
// prompt
while (not time_up(mail_scan))
{
terminal(); // begin input scan
stat = track_hit(0); // track again
if (stat == t4)
{
cputs("y^M"); // if mail, read it
break; // and break (abort)
}
}
if (time_up(mail_scan)) // if not found
{
cputs("z^M"); // a ZIP read is done
}
break; // and then aborts
}
else if (stat == t6) // Continue prompt found
{
delay(1);
cputs("^M"); // tell it to continue
}
else if (stat == t9) // PCB asked if it scans
{ // for new mail since
delay(3); // last read.
cputs(PCB_mailscan); // send defined constant
cputs("^M"); // terminate string
}
else if (stat == t7) // Time to Open ProDoor
{
delay(1);
if (prodoor_loc == "NONE") // if no ProDoor on line
{
return; // abort logon
}
cputs(prodoor_loc); // tell it OPEN ProDoor
cputs("^M"); // terminate string
while (not time_up(tmark)) // begin nested time loop
{
terminal();
stat = track_hit(0); // start retrack
if (stat == t5) // Again, stop More:
{
delay(1);
cputs("N^M");
}
else if (stat == t6) // Stop continue in
// ProDoor
{
delay(1);
cputs("^M");
}
else if (stat == t8) // found ProDoor
// welcome screen
{
cputs("^K^M"); // so abort it
}
else if (stat == t7) // ProDoor Command
{ // Prompt is found
delay(3);
cputs("r^M"); // Drop to read mail
delay(1);
cputs("^M");
break; // done with logon
}
}
break;
}
}
timer_free(mail_scan); // free WBBS timer
timer_free(tmark); // free timer channel
track_free(0); // and all track channels
}