Category : BBS Programs+Doors
Archive   : DND27A.ZIP
Filename : DNDCNFG2.BAS

 
Output of file : DNDCNFG2.BAS contained in archive : DND27A.ZIP

' --------------- F R E E W A R E ---------------
'
' Supported by the PC SIG Library
'
' +------------------------------------------------------------------+
' | Dungeon and Dragons Bulletin Board Service Version 2.6d |
' | This program was distributed under the Freeware concept. |
' | If you find this program valuable contributions can be made to: |
' | ZIPPIT RBBS |
' | DATA (612)944-0208 |
' | 1.2 GB. CD-ROM |
' | |
' | You are free to copy and share DNDBBS26.ZIP under the Freeware |
' | concept with the following conditions: |
' | 1. This program is not distributed in modified form. |
' | 2. You do not charge money for the file DNDBBS26.ZIP |
' | 3. This notice is not bypassed or removed. |
' +------------------------------------------------------------------+
' (C) Copyright 1988, 1989, 1990 Erik J. Oredson, All Rights Reserved.
'
REM $INCLUDE: 'DNDCNFG.INC'

SUB WRITE.CONFIG
ON ERROR GOTO ERR.ROUTINE
ER$="SUB WRITE.CONFIG"
A=CHR$(27)+"[1;37m"
CALL IO.O
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
A=CHR$(27)+"[23;1H"
CALL IO.O
A=CHR$(27)+"[1;37m"
CALL IO.O
A=CHR$(27)+"[23;1HEnter Node Number(enter for none)?"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
NQ=-1
FG=1
CALL IO.I
NQ=0
IF AL<>CHR$(13) THEN
F$=DND$+"DNDBBS"+AL+".CFG"
ELSE
F$=DND$+"DNDBBS.CFG"
ENDIF
ER=0
CLOSE 1
OPEN F$ FOR OUTPUT SHARED AS 1
IF ER=0 THEN
LOCK #1
ER=0
FOR I=1 TO 16
X$=CFX$(I)
IF LEFT$(X$,1)="," THEN
X$=MID$(X$,2)
ENDIF
IF RIGHT$(X$,1)="," THEN
X$=LEFT$(X$,LEN(X$)-1)
ENDIF
CFX$(I)=X$
NEXT
FOR I=1 TO 10
FOR J=1 TO 4
PRINT #1,CFU(I,J)
NEXT
NEXT
FOR L=1 TO 10
PRINT #1,CFX$(L)
NEXT
FOR L=1 TO 29
PRINT #1,CF!(L)
NEXT
FOR L=1 TO 65
PRINT #1,CF(L)
NEXT
FOR L=1 TO 53
PRINT #1,CF$(L)
NEXT
FOR L=1 TO CF(25)
PRINT #1,CFW(L)
NEXT
UNLOCK #1
CLOSE 1
ENDIF
A=CHR$(27)+"[1;33m"
CALL IO.O
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
IF ER THEN
A="Error writing "+F$+". Press to Continue"
ELSE
A=F$+" on file. Press to Continue"
ENDIF
CALL IO.O
NQ=-1
FG=1
CALL IO.I
NQ=0
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[K":IO.O

END SUB

SUB LOAD.DEFAULTS
ON ERROR GOTO ERR.ROUTINE
ER$="SUB LOAD.DEFAULTS"
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
A=CHR$(27)+"[23;1H"
CALL IO.O
ER=0
REDIM CFW(25)
RESTORE CONFIG.DATA
FOR L=1 TO 10
FOR LP=1 TO 4
READ CFU(L,LP)
NEXT
NEXT
FOR L=1 TO 10
READ CFX$(L)
NEXT
FOR L=1 TO 25
CFW(L)=L
NEXT
FOR L=1 TO 29
READ CF!(L)
NEXT
FOR L=1 TO 65
READ CF(L)
NEXT
FOR L=1 TO 53
READ CF$(L)
NEXT
FOR L=1 TO 6
CFX$(L+10)=CF$(L+21)
NEXT
A=CHR$(27)+"[1;33m"
CALL IO.O
A=CHR$(27)+"[24;1H"
CALL IO.O
A="Defaults Loaded. Press to Continue"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
NQ=-1
FG=1
CALL IO.I
NQ=0

END SUB

CONFIG.DATA:
DATA 12,4,6,3,9,6,10,5,10,3,5,4,9,6,5,4,11,5,6,3,11,4,6,3,10,3
DATA 7,3,9,6,8,3,125,125,125,125,250,250,250,250
DATA "36,162","2,164","123,168","51,163","36,162","6,155","36,162","417"
DATA "1,4,6,36,51,123,155,162,168","1,4,6,36,51,123,155,162,168"
DATA 15,30,60,12,.5,.5,.5,.5,.1,.5,.5,.2,.2,.95,1000,.5,.5,.5,1,.25,.5,.5,.5
DATA .9,.96,.91,.86,.5,.5
DATA 3,0,-1,-1,-1,-1,-1,8,18,6,10,0,0,-1,1,0,0,-1,-1,-1,3,2,1,2,25,21
DATA 10,10,15,10,25,200,15,10,10,10,15,-1,0,4,3,2,1,-1,0,1,0
DATA 1016,1017,1018,1019,1020,1021,1022,-1,180,-1,0,10,30,-1,10000,0,300,0
DATA "PRELOG","Remember your password!","WELCOME","NOTICE"
DATA "Press to roll your character, or to reenter.."
DATA "Press to begin the Adventure..","Action?","Do? ","*","\"
DATA "","MONCLASS","MONTALK"
DATA "Press [C] to continue, [H] to hangup, or [R] to reenter:"
DATA ".DAT","ROOMS","OBJECTS","MONSTERS","TREASURE","SPELLS","USERS"
DATA "19,145","215","51","124","2,165","117,147","LOGOFF"
DATA "(RND*(MHP/10)-(SH+AR)/2)*XX"
DATA "(RND*STR+LVL/2)*(XX+(WP1+WP2+WP3+WP4)/100)+WE","DEX/2>RND*10+MLVL/10"
DATA "RND*10+MLVL/10>DEX/2","RND*LVL+2>MLVL","DEX>RND*5+MLVL/2"
DATA "RND*5+LVL>MLVL","RND*15>STR"
DATA "(FT+VT+MG)*LF+ST","C:\","ATE0Q0X1V1S0=0S2=255","ATA","ATH1","ATZ"
DATA "(RND*INT+WIS)*(PSIA+XX)","(RND*(MHP/10)-PSID)*MPSI"
DATA "(RND*10+10)+CON/2>20"
DATA ".HLP","CASINO","BANK","MAIL","MAILEDIT","DNDRANK.DAT","",""

SUB READDEF
ON ERROR GOTO ERR.ROUTINE
ER$="SUB READDEF"
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[1;37m"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
A=CHR$(27)+"[23;1H"
CALL IO.O
A=CHR$(27)+"[23;1H"
CALL IO.O
A=CHR$(27)+"[1;37m"
CALL IO.O
A="Enter Node Number(enter for none)"
CALL IO.O
A=CHR$(27)+"[K"
CALL IO.O
NQ=-1
FG=1
CALL IO.I
NQ=0
IF AL<>CHR$(13) THEN
F$=DND$+"DNDBBS"+AL+".CFG"
ELSE
F$=DND$+"DNDBBS.CFG"
ENDIF
ER=0
CLOSE 1
OPEN F$ FOR INPUT SHARED AS #1
IF ER=0 THEN
FOR I=1 TO 10
FOR J=1 TO 4
INPUT #1,CFU(I,J)
NEXT
NEXT
FOR L=1 TO 10
LINE INPUT #1,CFX$(L)
NEXT
FOR L=1 TO 29
INPUT #1,CF!(L)
NEXT
FOR L=1 TO 65
INPUT #1,CF(L)
NEXT
FOR L=1 TO 53
LINE INPUT #1,CF$(L)
NEXT
REDIM CFW(CF(25))
FOR L=1 TO CF(25)
INPUT #1,CFW(L)
NEXT
ENDIF
IF ER THEN
REDIM CFW(25)
RESTORE CONFIG.DATA
FOR L=1 TO 10
FOR LP=1 TO 4
READ CFU(L,LP)
NEXT
NEXT
FOR L=1 TO 10
READ CFX$(L)
NEXT
FOR L=1 TO 25
CFW(L)=L
NEXT
FOR L=1 TO 29
READ CF!(L)
NEXT
FOR L=1 TO 65
READ CF(L)
NEXT
FOR L=1 TO 53
READ CF$(L)
NEXT
ENDIF
CLOSE 1
FOR L=1 TO 6
CFX$(L+10)=CF$(L+21)
NEXT
FOR I=1 TO 16
CFX$(I)=","+CFX$(I)+","
NEXT
A=CHR$(27)+"[24;1H"
CALL IO.O
A=CHR$(27)+"[1;33m"
CALL IO.O
A="Config File "+F$+" Loaded. Press to Continue"
CALL IO.O
NQ=-1
FG=1
CALL IO.I
NQ=0

END SUB

SUB DISPLAY.PAGE.ONE
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H1. Time Limit for Level 1 users in minutes:"
CALL IO.O
A=CHR$(27)+"[2;1H2. Time Limit for Users above Level 1 in minutes:"
CALL IO.O
A=CHR$(27)+"[3;1H3. Time Limit for DMs and Sysop in minutes:"
CALL IO.O
A=CHR$(27)+"[4;1H4. Call Limit for All Users:"
CALL IO.O
A=CHR$(27)+"[5;1H5. Allow users to remain invisible after last call:"
CALL IO.O
A=CHR$(27)+"[6;1H6. Display Date/Time immediately after carrier:"
CALL IO.O
A=CHR$(27)+"[7;1H7. Display PRELOG file after Date/Time (logon):"
CALL IO.O
A=CHR$(27)+"[8;1H8. Name of PRELOG file (8 char.):"
CALL IO.O
A=CHR$(27)+"[9;1H9. Message to display to new user to remember password:"
CALL IO.O
A=CHR$(27)+"[10;1H10. Display WELCOME file:"
CALL IO.O
A=CHR$(27)+"[11;1H11. Name of WELCOME file (8 char.):"
CALL IO.O
A=CHR$(27)+"[12;1H12. Display NOTICE file:"
CALL IO.O
A=CHR$(27)+"[13;1H13. Name of NOTICE file (8 char.):"
CALL IO.O
A=CHR$(27)+"[14;1H14. Display 'Mail Waiting' message after Notice file:"
CALL IO.O
A=CHR$(27)+"[15;1H15. Prompt to display before roll new character:"
CALL IO.O
A=CHR$(27)+"[16;1H16. Allow local console to create DM on new user logon:"
CALL IO.O
A=CHR$(27)+"[17;1H17. Minimum Character Statistic allowed for new user:"
CALL IO.O
A=CHR$(27)+"[18;1H18. Maximum Character Statistic allowed for new user:"
CALL IO.O
A=CHR$(27)+"[19;1H19. Maximum Average of Character Statistics for new user:"
CALL IO.O
A=CHR$(27)+"[20;1H20. Starting Player Gold:"
CALL IO.O
A=CHR$(27)+"[21;1H21. Increments for Players during Level increase."
CALL IO.O

END SUB

SUB SELECT.PAGE.ONE(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;44H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(1))
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;50H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(2))
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;44H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(3))
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;29H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(1))
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;53H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(2) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;49H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(3) THEN
A=A+"Yes"
ELSE
A=A+"No"

ENDIF
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;49H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(4) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;35H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(1)
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;57H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CF$(2),24)
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;27H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(5) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;37H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(3)
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;26H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(6) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;36H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(4)
CALL IO.O
ENDIF
IF X=14 THEN
A=CHR$(27)+"[14;55H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(38) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=15 THEN
A=CHR$(27)+"[15;50H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CF$(5),31)
CALL IO.O
ENDIF
IF X=16 THEN
A=CHR$(27)+"[16;57H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(7) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=17 THEN
A=CHR$(27)+"[17;54H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(8))
CALL IO.O
ENDIF
IF X=18 THEN
A=CHR$(27)+"[18;54H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(9))
CALL IO.O
ENDIF
IF X=19 THEN
A=CHR$(27)+"[19;58H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(4))
CALL IO.O
ENDIF
IF X=20 THEN
A=CHR$(27)+"[20;26H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(32))
CALL IO.O
ENDIF

END SUB

SUB DISPLAY.PAGE.TWO
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H"
A=A+"1. Health Rate (number of rounds until increasing Fat/Vit/Mag):"
CALL IO.O
A=CHR$(27)+"[2;1H2. Encounter Rate (number of rounds until file check):"
CALL IO.O
A=CHR$(27)+"[3;1H3. Minimum Level User must to to use Brief Mode:"
CALL IO.O
A=CHR$(27)+"[4;1H4. Begin game Visible or Hiding(V/H):"
CALL IO.O
A=CHR$(27)+"[5;1H5. Prompt User to begin Adventure:"
CALL IO.O
A=CHR$(27)+"[6;1H6. Prompt for begin Adventure:"
CALL IO.O
A=CHR$(27)+"[7;1H"
A=A+"7. Prompt User to continue/hangup/reenter after New Codename Logon:"
CALL IO.O
A=CHR$(27)+"[8;1H8. Prompt for continue/hangup/reenter:"
CALL IO.O
A=CHR$(27)+"[9;1H9. Room number to move User to when Non-descrip room found:"
CALL IO.O
A=CHR$(27)+"[10;1H10. Abort program when Non-descrip room file found:"
CALL IO.O
A=CHR$(27)+"[11;1H"
A=A+"11. Allow Users to see Room Number and Monster Class in Brief Mode:"
CALL IO.O
A=CHR$(27)+"[12;1H12. Show exits from room in description:"
CALL IO.O
A=CHR$(27)+"[13;1H13. Display Monsters in room description:"
CALL IO.O
A=CHR$(27)+"[14;1H14. Display Objects and Treasure in room description:"
CALL IO.O
A=CHR$(27)+"[15;1H15. Addition to Fatigue during Health Rate Update:"
CALL IO.O
A=CHR$(27)+"[16;1H16. Addition to Vitality during Health Rate Update:"
CALL IO.O
A=CHR$(27)+"[17;1H17. Addition to Magic Points during Health Rate Update:"
CALL IO.O
A=CHR$(27)+"[18;1H"
A=A+"18. Subtraction to poisoned Player's vitality during Health Rate Update:"
CALL IO.O
A=CHR$(27)+"[19;1H"
A=A+"19. Percent chance of encountering monster during Encounter Rate Update:"
CALL IO.O
A=CHR$(27)+"[20;1H20. Verbose Action Prompt:"
CALL IO.O
A=CHR$(27)+"[21;1H21. Brief Action Prompt:"
CALL IO.O
A=CHR$(27)+"[22;1H22. "
CALL IO.O

END SUB

SUB SELECT.PAGE.TWO(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;64H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(10))
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;55H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(11))
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;49H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(12))
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;39H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(13) THEN
A=A+"Hidden"
ELSE
A=A+"Visible"
ENDIF
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;36H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(14) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;32H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CF$(6),45)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;69H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(61) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;40H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CF$(14),41)
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;60H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(15))
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;53H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(16) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;69H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(17) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;42H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(18) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;43H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(19) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=14 THEN
A=CHR$(27)+"[14;55H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(20) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=15 THEN
A=CHR$(27)+"[15;51H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(21))
CALL IO.O
ENDIF
IF X=16 THEN
A=CHR$(27)+"[16;52H"
A=CHR$(27)+"[K"+STR$(CF(22))
CALL IO.O
ENDIF
IF X=17 THEN
A=CHR$(27)+"[17;56H"
A=CHR$(27)+"[K"+STR$(CF(23))
CALL IO.O
ENDIF
IF X=18 THEN
A=CHR$(27)+"[18;73H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(24))
CALL IO.O
ENDIF
IF X=19 THEN
A=CHR$(27)+"[19;73H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(5)*100)
CALL IO.O
ENDIF
IF X=20 THEN
A=CHR$(27)+"[20;28H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(7)
CALL IO.O
ENDIF
IF X=21 THEN
A=CHR$(27)+"[21;26H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(8)
CALL IO.O
ENDIF
IF X=22 THEN
A=CHR$(27)+"[1;24H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(9)
CALL IO.O
ENDIF
IF X=23 THEN
A=CHR$(27)+"[2;36H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(10)
CALL IO.O
ENDIF
IF X=24 THEN
A=CHR$(27)+"[3;46H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(39) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=25 THEN
A=CHR$(27)+"[4;35H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(44) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=26 THEN
A=CHR$(27)+"[5;39H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(58) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=27 THEN
A=CHR$(27)+"[6;53H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(37))
CALL IO.O
ENDIF
IF X=28 THEN
A=CHR$(27)+"[7;48H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(9)*100)
CALL IO.O
ENDIF
IF X=29 THEN
A=CHR$(27)+"[8;48H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(62))
CALL IO.O
ENDIF
IF X=30 THEN
A=CHR$(27)+"[9;41H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(43))
CALL IO.O
ENDIF
IF X=31 THEN
A=CHR$(27)+"[10;34H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(27)*100)
CALL IO.O
ENDIF
IF X=32 THEN
A=CHR$(27)+"[11;34H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(42))

CALL IO.O
ENDIF
IF X=33 THEN
A=CHR$(27)+"[12;34H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(26)*100)
CALL IO.O
ENDIF
IF X=34 THEN
A=CHR$(27)+"[13;34H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(41))
CALL IO.O
ENDIF
IF X=35 THEN
A=CHR$(27)+"[14;35H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(25)*100)
CALL IO.O
ENDIF
IF X=36 THEN
A=CHR$(27)+"[15;35H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(40))
CALL IO.O
ENDIF

END SUB

SUB DISPLAY.PAGE.TWO.TWO
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H22. DM Command Prefix:"
CALL IO.O
A=CHR$(27)+"[2;1H23. Repeat Last Command character:"
CALL IO.O
A=CHR$(27)+"[3;1H24. Hangup if user death is not resurrected:"
CALL IO.O
A=CHR$(27)+"[4;1H25. Automatically train for user:"
CALL IO.O
A=CHR$(27)+"[5;1H26. Allow Treasure to remain in Room:"
CALL IO.O
A=CHR$(27)+"[6;1H27. Beginning Level for Monsters to Regenerate Hits:"
CALL IO.O
A=CHR$(27)+"[7;1H28. Percentage of Monster's Hits to Regenerate:"
CALL IO.O
A=CHR$(27)+"[8;1H29. Maximum Hits for Monsters to Regenerate to:"
CALL IO.O
A=CHR$(27)+"[9;1H30. Multiplier for Hand Attack (Punch!):"
CALL IO.O
A=CHR$(27)+"[10;1H31. Percentage for Double Damage:"
CALL IO.O
A=CHR$(27)+"[11;1H32. Multiplier for Double Damage:"
CALL IO.O
A=CHR$(27)+"[12;1H33. Percentage for Triple Damage:"
CALL IO.O
A=CHR$(27)+"[13;1H34. Multiplier for Triple Damage:"
CALL IO.O
A=CHR$(27)+"[14;1H35. Percentage for Deathly Damage:"
CALL IO.O
A=CHR$(27)+"[15;1H36. Multiplier for Deathly Damage:"
CALL IO.O
A=CHR$(27)+"[16;1H37. "
CALL IO.O

END SUB

SUB DISPLAY.PAGE.THREE
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H1. Pathname for Data and Help Files:"
CALL IO.O
A=CHR$(27)+"[2;1H2. Pathname for Doc Files:"
CALL IO.O
A=CHR$(27)+"[3;1H3. Pathname for Temporary Files(or RAM disk):"
CALL IO.O
A=CHR$(27)+"[4;1H4. Name of DND Ranking Bulletin(form: d:\filename.ext):"
CALL IO.O
A=CHR$(27)+"[5;1H5. Extension for Data Files (form: .ext):"
CALL IO.O
A=CHR$(27)+"[6;1H6. Name of Room File (form: filename):"
CALL IO.O
A=CHR$(27)+"[7;1H7. Name of Object File (form: filename):"
CALL IO.O
A=CHR$(27)+"[8;1H8. Name of Monster File (form: filename):"
CALL IO.O
A=CHR$(27)+"[9;1H9. Name of Treasure File (form: filename):"
CALL IO.O
A=CHR$(27)+"[10;1H10. Name of Spell File (form: filename):"
CALL IO.O
A=CHR$(27)+"[11;1H11. Name of Users File (form: filename):"
CALL IO.O
A=CHR$(27)+"[12;1H12. Name of Monster Class File (form: filename):"
CALL IO.O
A=CHR$(27)+"[13;1H13. Name of Monster Talk File (form: filename):"
CALL IO.O
A=CHR$(27)+"[14;1H14. Name of Logoff File (form: filename):"
CALL IO.O
A=CHR$(27)+"[15;1H15. Extension for Help files(form: .ext):"
CALL IO.O
A=CHR$(27)+"[16;1H16. Name of Casino Help file(form: filename):"
CALL IO.O
A=CHR$(27)+"[17;1H17. Name of Bank Help file(form: filename):"
CALL IO.O
A=CHR$(27)+"[18;1H18. Name of Mail Help file(form: filename):"
CALL IO.O
A=CHR$(27)+"[19;1H19. Name of Mail Message Edit Help file(form: filename):"
CALL IO.O

END SUB

SUB SELECT.PAGE.THREE(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;38H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(11)
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;28H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(52)
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;47H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(53)
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;57H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(51)
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;43H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(15)
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;40H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(16)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;42H"
CALL IO.O

A=CHR$(27)+"[K"+CF$(17)
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;43H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(18)
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;44H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(19)
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;42H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(20)
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;42H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(21)
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;50H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(12)
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;49H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(13)
CALL IO.O
ENDIF
IF X=14 THEN
A=CHR$(27)+"[14;43H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(28)
CALL IO.O
ENDIF
IF X=15 THEN
A=CHR$(27)+"[15;43H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(46)
CALL IO.O
ENDIF
IF X=16 THEN
A=CHR$(27)+"[16;47H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(47)
CALL IO.O
ENDIF
IF X=17 THEN
A=CHR$(27)+"[17;45H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(48)
CALL IO.O
ENDIF
IF X=18 THEN
A=CHR$(27)+"[18;45H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(49)
CALL IO.O
ENDIF
IF X=19 THEN
A=CHR$(27)+"[19;58H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(50)
CALL IO.O
ENDIF

END SUB

SUB MAIN.SELECT
ON ERROR GOTO ERR.ROUTINE
ER$="SUB MAIN.SELECT"
V=0
IF X=72 AND Z>1 THEN
V=Z-1
ENDIF
IF X=80 AND Z<8 THEN
V=Z+1
ENDIF
IF X=75 OR X=15 THEN
IF Z>4 THEN
V=Z-4
ENDIF
ENDIF
IF X=77 OR X$=CHR$(9) THEN
IF Z<5 THEN
V=Z+4
ELSE
IF Z=8 THEN
V=1
ELSE
V=Z-3
ENDIF
ENDIF
ENDIF
IF X=71 AND Z<>1 THEN
V=1
ENDIF
IF X=79 AND Z<>8 THEN
V=8
ENDIF
IF X=73 THEN
IF Z<5 AND Z<>1 THEN
V=1
ENDIF
IF Z>4 AND Z<>5 THEN
V=5
ENDIF
ENDIF
IF X=81 THEN
IF Z<5 AND Z<>4 THEN
V=4
ENDIF
IF Z>4 AND Z<>8 THEN
V=8
ENDIF
ENDIF
IF V THEN
A=CHR$(27)+"[1;33;44m"
CALL IO.O
A=CHR$(27)+"["+MID$(STR$(Z(Z,1)),2)+";"+MID$(STR$(Z(Z,2)),2)+"H"
CALL IO.O
A=A(Z)
CALL IO.O
Z=V
A=CHR$(27)+"[1;37;40m"
CALL IO.O
A=CHR$(27)+"["+MID$(STR$(Z(Z,1)),2)+";"+MID$(STR$(Z(Z,2)),2)+"H"
CALL IO.O
A=A(Z)
CALL IO.O
ENDIF

END SUB

SUB DISPLAY.PAGE.FOUR
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[1;1H"
CALL IO.O
A=CHR$(27)+"[1;33m"
CALL IO.O
A="You may enter multiple rooms by separating them on one line by commas."
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[2;1H1. Room Number for Weapons Shoppe:"
CALL IO.O
A=CHR$(27)+"[3;1H2. Room Number for Casino:"
CALL IO.O
A=CHR$(27)+"[4;1H3. Clerical Sanctuary Resurrection Room:"
CALL IO.O
A=CHR$(27)+"[5;1H4. Jail Room Number:"
CALL IO.O
A=CHR$(27)+"[6;1H5. Room Number for Mages Guild Master Wizard:"
CALL IO.O
A=CHR$(27)+"[7;1H6. Room Number for Pawn Shoppe:"
CALL IO.O
A=CHR$(27)+"[8;1H7. Room Number for Fighter Training Area:"
CALL IO.O
A=CHR$(27)+"[9;1H8. Room Number for Magic User Training Area:"
CALL IO.O
A=CHR$(27)+"[10;1H9. Room Number for Thieves Training Area:"
CALL IO.O
A=CHR$(27)+"[11;1H10. Room Number for Clerics Training Area:"
CALL IO.O
A=CHR$(27)+"[12;1H11. Room Number for Paladin Training Area:"
CALL IO.O
A=CHR$(27)+"[13;1H12. Room Number for Rangers Training Area:"
CALL IO.O
A=CHR$(27)+"[14;1H13. Room Number for Druid Training Area:"
CALL IO.O
A=CHR$(27)+"[15;1H14. Room Number for Lady to Train:"
CALL IO.O
A=CHR$(27)+"[16;1H15. Room Number for Assistant Dungeon Master to Train:"
CALL IO.O
A=CHR$(27)+"[17;1H16. Room Number for Dungeon Master to Train:"
CALL IO.O

END SUB

SUB SELECT.PAGE.FOUR(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
FOR I=1 TO 16
X$=CFX$(I)
IF LEFT$(X$,1)="," THEN
X$=MID$(X$,2)
ENDIF
IF RIGHT$(X$,1)="," THEN
X$=LEFT$(X$,LEN(X$)-1)
ENDIF
CFX$(I)=X$
NEXT
IF X=1 THEN
A=CHR$(27)+"[2;36H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(22)
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[3;28H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(23)
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[4;42H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(24)
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[5;22H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(25)
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[6;47H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(26)
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[7;33H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(27)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[8;43H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(1)
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[9;46H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(2)
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[10;43H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(3)
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[11;44H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(4)
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[12;44H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(5)
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[13;44H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(6)
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[14;42H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(7)
CALL IO.O
ENDIF
IF X=14 THEN
A=CHR$(27)+"[15;36H"
CALL IO.O
A=CHR$(27)+"[K"+CFX$(8)
CALL IO.O
ENDIF
IF X=15 THEN
A=CHR$(27)+"[16;56H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CFX$(9),25)
CALL IO.O
ENDIF
IF X=16 THEN
A=CHR$(27)+"[17;46H"
CALL IO.O
A=CHR$(27)+"[K"+LEFT$(CFX$(10),35)
CALL IO.O
ENDIF
FOR I=1 TO 16
CFX$(I)=","+CFX$(I)+","
NEXT

END SUB
SUB DISPLAY.PAGE.FIVE
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H1. Number of Items for sale in the Weapons Shoppe:"
CALL IO.O
A=CHR$(27)+"[2;1H2. Number of items in Weapons Shoppe to print before header:"
CALL IO.O
A=CHR$(27)+"[3;1H"
A=A+"3. Percent chance that an invisible object searched for will be found:"
CALL IO.O
A=CHR$(27)+"[4;1H"
A=A+"4. Percent chance that ammunition will explode in users face:"
CALL IO.O
A=CHR$(27)+"[5;1H5. Percent chance that ammunition will discharge harmlessly:"
CALL IO.O
A=CHR$(27)+"[6;1H"
A=A+"6. Percentage of monster hits user must damage for monster to flee:"
CALL IO.O
A=CHR$(27)+"[7;1H"
A=A+"7. Monster Level Multiplier for Gold monster will accept an offer:"
CALL IO.O
A=CHR$(27)+"[8;1H8. Treasure Plus which monster will accept and leave:"
CALL IO.O
A=CHR$(27)+"[9;1H9. Wisdom required to Fix broken treasure:"
CALL IO.O
A=CHR$(27)+"[10;1H10. Percent chance Fixing treasure wont work:"
CALL IO.O
A=CHR$(27)+"[11;1H11. Maximum treasure Plus that player can fix:"
CALL IO.O
A=CHR$(27)+"[12;1H12. Maximum Strikes which can be restored to a fixed item:"
CALL IO.O
A=CHR$(27)+"[13;1H13. Percent of item value Weapons Master will charge to repair:"
CALL IO.O
A=CHR$(27)+"[14;1H"
A=A+"14. Percent of item value Master Wizard will charge to repair:"
CALL IO.O
A=CHR$(27)+"[15;1H15. Percent of item value Fence will offer to buy:"
CALL IO.O
A=CHR$(27)+"[16;1H16. Maximum user statistic can become from training:"
CALL IO.O
A=CHR$(27)+"[17;1H17. Percent of maximum Fatigue must be to Appeal:"
CALL IO.O
A=CHR$(27)+"[18;1H18. Minimum Strength user must have to Smash open a Portal:"
CALL IO.O
A=CHR$(27)+"[19;1H"
A=A+"19. Minimum Intelligence user must have to Smash open a Portal:"
CALL IO.O
A=CHR$(27)+"[20;1H20. Percent chance that user cannot Smash open a Portal:"
CALL IO.O
A=CHR$(27)+"[21;1H21. Minimum Strength Thief must be to Picklock:"
CALL IO.O
A=CHR$(27)+"[22;1H22. "
CALL IO.O

END SUB

SUB SELECT.PAGE.FIVE(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;51H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(25))
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;61H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(26))
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;71H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(11)*100)
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;62H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(12)*100)
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;61H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(13)*100)
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;68H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(14)*100)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;67H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(15))
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;54H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(27))
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;43H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(28))
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;46H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(16)*100)
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;47H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(29))
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;59H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(30))
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;64H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(17)*100)
CALL IO.O
ENDIF
IF X=14 THEN
A=CHR$(27)+"[14;63H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(18)*100)
CALL IO.O
ENDIF
IF X=15 THEN
A=CHR$(27)+"[15;51H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(19)*100)
CALL IO.O
ENDIF
IF X=16 THEN
A=CHR$(27)+"[16;53H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(31))
CALL IO.O
ENDIF
IF X=17 THEN
A=CHR$(27)+"[17;50H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(20)*100)
CALL IO.O
ENDIF
IF X=18 THEN
A=CHR$(27)+"[18;60H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(33))
CALL IO.O
ENDIF
IF X=19 THEN
A=CHR$(27)+"[19;64H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(34))
CALL IO.O
ENDIF
IF X=20 THEN
A=CHR$(27)+"[20;57H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(21)*100)
CALL IO.O
ENDIF
IF X=21 THEN
A=CHR$(27)+"[21;48H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(35))
CALL IO.O
ENDIF
IF X=23 THEN
A=CHR$(27)+"[1;52H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(36))
CALL IO.O
ENDIF
IF X=24 THEN
A=CHR$(27)+"[2;55H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(22)*100)
CALL IO.O
ENDIF
IF X=25 THEN
A=CHR$(27)+"[3;64H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF!(24)*100)
CALL IO.O
ENDIF
IF X=26 THEN
A=CHR$(27)+"[4;39H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(55) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=27 THEN
A=CHR$(27)+"[5;36H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(59))
CALL IO.O
ENDIF

END SUB

SUB DISPLAY.PAGE.FIVE.TWO
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H23. Minimum Intelligence Thief must be to Picklock:"
CALL IO.O
A=CHR$(27)+"[2;1H24. Percent chance that a Portal cannot be Picklocked:"
CALL IO.O
A=CHR$(27)+"[3;1H"
A=A+"25. Percent chance that a monster will have any given treasure:"
CALL IO.O
A=CHR$(27)+"[4;1H26. Activate multiplayer User Fights:"
CALL IO.O
A=CHR$(27)+"[5;1H27. Level User must be to Identify:"
CALL IO.O
A=CHR$(27)+"[6;1H28. "
CALL IO.O

END SUB

SUB DISPLAY.PAGE.SIX
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H1. Communication Port(1 to 8):"
CALL IO.O
A=CHR$(27)+"[2;1H"
A=A+"2. DOOR 0=None, 1=RBBS17.2, 2=OPUS, 3=PCB12, 4=PCB14:"
CALL IO.O
A=CHR$(27)+"[3;1H3. Pathname for DOOR Information file:"
CALL IO.O
A=CHR$(27)+"[4;1H4. String to Reset Modem:"
CALL IO.O
A=CHR$(27)+"[5;1H5. String to Initialize Modem:"
CALL IO.O
A=CHR$(27)+"[6;1H6. String to Answer Modem:"
CALL IO.O
A=CHR$(27)+"[7;1H7. String to take Modem Off Hook:"
CALL IO.O
A=CHR$(27)+"[8;1H8. Seconds of no input before timeout:"
CALL IO.O
A=CHR$(27)+"[9;1H9. FOSSIL driver active:"
CALL IO.O
A=CHR$(27)+"[10;1H10. Serial port address(hexidecimal):"
CALL IO.O
A=CHR$(27)+"[11;1H11. Baud Rate to Open Modem at:"
CALL IO.O
A=CHR$(27)+"[12;1H12. Seconds to Wait after Ring for Carrier:"
CALL IO.O
A=CHR$(27)+"[13;1H13. Allow 300 Baud Access:"
CALL IO.O

END SUB

SUB SELECT.PAGE.SIX(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;32H"
CALL IO.O
A=CHR$(27)+"[K"+MID$(STR$(CF(46)),2)
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;56H"+CHR$(27)+"[K"
IF CF(47)=0 THEN
A=A+"None"
ELSE
IF CF(47)=1 THEN
A=A+"RBBS(17.2)"
ELSE
IF CF(47)=2 THEN
A=A+"OPUS"
ELSE
IF CF(47)=3 THEN
A=A+"PCBOARD(12.0)"
ELSE
IF CF(47)=4 THEN
A=A+"PCBOARD(14.0)"
ELSE
A=A+"None"
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;40H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(38)
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;27H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(42)
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;32H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(39)
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;28H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(40)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;35H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(41)
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;40H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(56))
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;26H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(65) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;39H"
CALL IO.O
A=CHR$(27)+"[K"+HEX$(CF(48))+"H "
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;33H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(64))
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;45H"
CALL IO.O
A=CHR$(27)+"[K"+STR$(CF(60))
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;28H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(45) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF

END SUB

SUB DISPLAY.PAGE.SEVEN
A=CHR$(27)+"[0;1;37;44m"
CALL IO.O
A=CHR$(27)+"[2J"
CALL IO.O
A=CHR$(27)+"[0;37;44m"
CALL IO.O
A=CHR$(27)+"[1;1H1. Activate Custom Equations:"
CALL IO.O
A=CHR$(27)+"[2;1H2. Monster Attack Formula:"
CALL IO.O
A=CHR$(27)+"[3;1H3. User Attack Formula:"
CALL IO.O
A=CHR$(27)+"[4;1H4. Equation for Monster Attack to Miss:"
CALL IO.O
A=CHR$(27)+"[5;1H5. Equation for User Attack to Miss:"
CALL IO.O
A=CHR$(27)+"[6;1H6. Equation for Player to Turn Undead:"
CALL IO.O
A=CHR$(27)+"[7;1H7. Equation for Player to Feint:"
CALL IO.O
A=CHR$(27)+"[8;1H8. Equation to Player to Circle:"
CALL IO.O
A=CHR$(27)+"[9;1H9. Equation for Player to Fumble:"
CALL IO.O
A=CHR$(27)+"[10;1H10. User Fights Hit Points Formula:"
CALL IO.O
A=CHR$(27)+"[11;1H11. User Psionic Attack Formula:"
CALL IO.O
A=CHR$(27)+"[12;1H12. Monster Psionic Attack Formula:"
CALL IO.O
A=CHR$(27)+"[13;1H13. Successful Constitution Roll Equation:"
CALL IO.O
A=CHR$(27)+"[14;1H14. Load Equation Defaults."
CALL IO.O

END SUB

SUB SELECT.PAGE.SEVEN(X)
A=CHR$(27)+"[1;37;44m"
CALL IO.O
IF X=1 THEN
A=CHR$(27)+"[1;31H"
CALL IO.O
A=CHR$(27)+"[K"
IF CF(63) THEN
A=A+"Yes"
ELSE
A=A+"No"
ENDIF
CALL IO.O
ENDIF
IF X=2 THEN
A=CHR$(27)+"[2;28H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(29)
CALL IO.O
ENDIF
IF X=3 THEN
A=CHR$(27)+"[3;25H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(30)
CALL IO.O
ENDIF
IF X=4 THEN
A=CHR$(27)+"[4;41H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(31)
CALL IO.O
ENDIF
IF X=5 THEN
A=CHR$(27)+"[5;38H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(32)
CALL IO.O
ENDIF
IF X=6 THEN
A=CHR$(27)+"[6;40H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(33)
CALL IO.O
ENDIF
IF X=7 THEN
A=CHR$(27)+"[7;34H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(34)
CALL IO.O
ENDIF
IF X=8 THEN
A=CHR$(27)+"[8;34H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(35)
CALL IO.O
ENDIF
IF X=9 THEN
A=CHR$(27)+"[9;35H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(36)
CALL IO.O
ENDIF
IF X=10 THEN
A=CHR$(27)+"[10;37H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(37)
CALL IO.O
ENDIF
IF X=11 THEN
A=CHR$(27)+"[11;34H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(43)
CALL IO.O
ENDIF
IF X=12 THEN
A=CHR$(27)+"[12;37H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(44)
CALL IO.O
ENDIF
IF X=13 THEN
A=CHR$(27)+"[13;44H"
CALL IO.O
A=CHR$(27)+"[K"+CF$(45)
CALL IO.O
ENDIF

END SUB

SUB SCREEN.EDIT
ON ERROR GOTO ERR.ROUTINE
ER$="SUB SCREEN.EDIT"
A=CHR$(27)+"[0;37;44m"
CALL SCRN(A)
A=CHR$(27)+"[1;74H"
A=A+SPACE$(6)
CALL SCRN(A)
A=CHR$(27)+"[0;37;40m"
CALL SCRN(A)
IF LM=0 THEN
A=CHR$(27)+"["+MID$(STR$(X),2)+";"+MID$(STR$(Y),2)+"H"
CALL IO.O
FG=LL
CALL IO.I
AX(1)=AL
EXIT SUB
ENDIF
DO
A=CHR$(27)+"["+MID$(STR$(X),2)+";"+MID$(STR$(Y),2)+"H"
CALL SCRN(A)
X$=""
DO WHILE X$=""
X$=INKEY$
CALL GIVEBACK
LOOP
IF X$=CHR$(13) OR X$=CHR$(27) THEN
EXIT SUB
ENDIF
IF LEN(X$)=2 THEN
W=ASC(MID$(X$,2,1))
' INSERT
IF W=82 THEN
IN=NOT IN
A=CHR$(27)+"[0;37;44m"
CALL SCRN(A)
A=CHR$(27)+"[1;74H"
IF IN=0 THEN
A=A+SPACE$(6)
ELSE
A=A+"Insert"
ENDIF
CALL SCRN(A)
A=CHR$(27)+"[0;37;40m"
CALL SCRN(A)
ENDIF
' DELETE
IF W=83 THEN
IF Y-Q+1<=LEN(AX(L)) THEN
AX(L)=LEFT$(AX(L),Y-Q)+MID$(AX(L),Y-Q+2)
A=CHR$(27)+"["+MID$(STR$(X),2)+";"+MID$(STR$(Y),2)+"H"
A=A+MID$(AX(L),Y-Q+1)+" "
CALL SCRN(A)
ENDIF
ENDIF
' HOME
IF W=71 THEN
Y=Q
ENDIF
' END
IF W=79 THEN
Y=LEN(AX(L))+Q
ENDIF
' TAB
IF W=15 THEN
IF Y-Q-8>0 THEN
Y=Y-8
ENDIF
ENDIF
' RIGHT
IF W=77 THEN
IF Y-Q+1<=LEN(AX(L)) THEN
Y=Y+1
ENDIF
ENDIF
' LEFT
IF W=75 THEN
IF Y-Q>0 THEN
Y=Y-1
ENDIF
ENDIF
' CONTROL-HOME
IF W=119 THEN
X=N1
L=1
Y=Q
ENDIF
' CONTROL-END
IF W=117 THEN
I=N
DO
X=N1+I-1
L=I
IF L=1 THEN
EXIT DO
ENDIF
IF LEN(AX(L))=0 THEN
I=I-1
ELSE
EXIT DO
ENDIF
LOOP
Y=LEN(AX(L))+Q
ENDIF
' CONTROL-RIGHT
IF W=116 THEN
DO
L1=L
Y1=Y
FOR I=Y1-Q+1 TO LEN(AX(L1))
IF MID$(AX(L1),I,1)=" " THEN
IF I+1>LEN(AX(L1)) THEN
EXIT FOR
ENDIF
IF MID$(AX(L1),I+1,1)<>" " THEN
L=L1
X=N1+L1-1
Y=I-Q+2
EXIT DO
ENDIF
ENDIF
NEXT
IF N>1 AND L1<>N THEN
IF AX(L1+1)<>"" THEN
L=L1+1
X=N1+L1
Y=Q
ENDIF
ENDIF
EXIT DO
LOOP
ENDIF
' CONTROL-LEFT
IF W=115 THEN
L1=L
Y1=Y
IF Y1=Q THEN
L1=L1-1
Y1=LEN(AX(L1))+Q
ENDIF
DO
FOR I=Y1-Q-1 TO 1 STEP -1
IF MID$(AX(L1),I,1)=" " THEN
L=L1
X=N1+L1-1
Y=I-Q+2
EXIT DO
ENDIF
NEXT
IF L1=1 THEN
Y=Q
ENDIF
Y=Q
EXIT DO
LOOP
ENDIF
ELSE
IF X$=CHR$(8) THEN
IF Y-Q>0 THEN
IF IN=0 THEN
Y=Y-1
ELSE
AX(L)=LEFT$(AX(L),Y-Q-1)+MID$(AX(L),Y-Q+1)
Y=Y-1
A=CHR$(27)+"["+MID$(STR$(X),2)+";"+MID$(STR$(Y),2)+"H"
CALL SCRN(A)
A=MID$(AX(L),Y-Q+1)+" "
CALL SCRN(A)
ENDIF
ENDIF
ELSE
IF X$=CHR$(9) THEN
IF Y-Q+8<=LEN(AX(L)) THEN
Y=Y+8
ENDIF
ELSE
IF Y-Q+1 IF IN=0 THEN
IF Y-Q+1>LEN(AX(L)) THEN
AX(L)=AX(L)+X$
ELSE
MID$(AX(L),Y-Q+1,1)=X$
ENDIF
CALL SCRN(X$)
Y=Y+1
ELSE
AX(L)=LEFT$(AX(L),Y-Q)+X$+MID$(AX(L),Y-Q+1)
AX(L)=LEFT$(AX(L),LL)
A=CHR$(27)+"["+MID$(STR$(X),2)+";"+MID$(STR$(Y),2)+"H"
CALL SCRN(A)
A=MID$(AX(L),Y-Q+1)
CALL SCRN(A)
Y=Y+1
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
LOOP

END SUB

SUB IO.O
IF CX!=0 THEN
EXIT SUB
ENDIF
FOR LA=1 TO LEN(A)
Y$=INKEY$
IF LEN(Y$)<2 THEN
Z8$=Z8$+Y$
ELSE

IF ASC(RIGHT$(Y$,1))=79 THEN
CX!=0
EXIT SUB
ENDIF
ENDIF
C$=MID$(A,LA,1)
CALL SCRN(C$)
IF LM=0 THEN
CALL FOSSIL(5)
IF (OUTREGS.AX AND &H80)=0 THEN
CX!=0
EXIT SUB
ENDIF
CALL FOSSIL(5)
IF (OUTREGS.AX AND &H2000)=0 THEN
CALL FOSSIL(5)
IF OUTREGS.AX AND &H100 THEN
CALL FOSSIL(6)
Y$=CHR$(OUTREGS.AX AND &HFF)
IF Y$=CHR$(27) THEN
Z8$=""
ELSE
Z8$=Z8$+Y$
ENDIF
ENDIF
ENDIF
INREGS.AX=ASC(C$)
CALL FOSSIL(9)
ENDIF
NEXT
A=""
Y$=""

END SUB

SUB IO.I
AL=""
IF CX!=0 THEN
EXIT SUB
ENDIF
DO
IF LM=0 AND LEN(Z8$)>0 THEN
Y$=LEFT$(Z8$,1)
Z8$=MID$(Z8$,2)
MODM=-1
ELSE
KEYB=0
MODM=0
ENDIF
DO UNTIL KEYB OR MODM
TU!=TIMER+180
IF TIMER>TU! THEN
CX!=0
EXIT SUB
ENDIF
Y$=INKEY$
IF Y$<>"" THEN
KEYB=-1
ELSE
IF LM=0 THEN
GOSUB CHECK.CARRIER
CALL FOSSIL(5)
IF OUTREGS.AX AND &H100 THEN
CALL FOSSIL(6)
Y$=CHR$(OUTREGS.AX AND &HFF)
MODM=-1
ENDIF
ENDIF
ENDIF
LOOP
IF KEYB THEN
IF LM=0 THEN
IF LEN(Y$)=2 THEN
XQ=ASC(RIGHT$(Y$,1))
IF XQ=79 THEN
CX!=0
EXIT SUB
ENDIF
ENDIF
ENDIF
ENDIF
IF Y$=CHR$(8) THEN
Z8$=""
DO WHILE LEN(AL)
AL=LEFT$(AL,LEN(AL)-1)
GOSUB BACK.SPACE
LOOP
ELSE
IF Y$=CHR$(27) THEN
IF LEN(AL) THEN
AL=LEFT$(AL,LEN(AL)-1)
GOSUB BACK.SPACE
ENDIF
ELSE
C$=Y$
GOSUB OUT.MODEM
IF NQ=0 THEN
CALL SCRN(C$)
ENDIF
IF Y$=CHR$(13) THEN
IF NQ THEN
RE=-1
EXIT DO
ENDIF
ENDIF
AL=AL+Y$
IF LEN(AL)>=FG THEN
EXIT DO
ENDIF
IF TIMER=>T2! THEN
T3!=TIMER-T2!
ELSE
T3!=TIMER+86400!-T2!
ENDIF
IF T3!>=CX! THEN
T2!=TIMER
CX!=0
EXIT SUB
ENDIF
ENDIF
ENDIF
LOOP
A=""
FG=79
IF AL="" THEN
NX=-1
YE=0
ELSE
NX=0
IF UCASE$(LEFT$(AL,1))="Y" THEN
YE=1
ELSE
YE=0
ENDIF
ENDIF
EXIT SUB

BACK.SPACE:
C$=CHR$(27)+"[D"
CALL SCRN(C$)
C$=CHR$(8)
GOSUB OUT.MODEM
C$=CHR$(32)
CALL SCRN(C$)
C$=CHR$(32)
GOSUB OUT.MODEM
C$=CHR$(27)+"[D"
CALL SCRN(C$)
C$=CHR$(8)
GOSUB OUT.MODEM
RETURN

OUT.MODEM:
IF LM OR NQ THEN
RETURN
ENDIF
CALL FOSSIL(5)
DO UNTIL OUTREGS.AX AND &H2000
GOSUB CHECK.CARRIER
CALL FOSSIL(5)
LOOP
INREGS.AX=ASC(C$)
CALL FOSSIL(9)
RETURN

CHECK.CARRIER:
CALL FOSSIL(5)
IF (OUTREGS.AX AND &H80)=0 THEN
CX!=0
EXIT SUB
ENDIF
RETURN

END SUB

ERR.ROUTINE:
IF ERR=70 THEN
RESUME
ENDIF
IF ERR=6 THEN
OV=-1
RESUME NEXT
ENDIF
ER=-1
X$="Module DNDCNFG2 Error"+STR$(ERR)+" in "+ER$
IF NODEN THEN
X$=X$+" (Node"+STR$(NODEN)+")"
ENDIF
IF DEBUG THEN
A=X$
CALL IO.O
ENDIF
CLOSE 1
OPEN "A",1,DND$+"DNDBBS.ERR"
PRINT #1,DATE$+" "+TIME$+" "+X$
CLOSE 1
RESUME NEXT