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

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

' tm
' --------------- C O P Y W A R E ---------------
'
' Supported by the PC SIG Library
'
' +------------------------------------------------------------------+
' | Dungeon and Dragons Bulletin Board System Version 2.7a |
' | This program is distributed with the Copyware rights agreement. |
' | Valued contributions can be made to: |
' | Erik J. Oredson |
' | 1215 South 9th Street |
' | Minneapolis, Minnesota, 55404 |
' | |
' | You are allowed to distribute DnDBBS with the Copyware rights |
' | agreements set forth here: |
' | 1. This program is not modified before distribution. |
' | 2. The DnDBBS files are not resold for profit. |
' | 3. The copyware notices are not altered or removed. |
' +------------------------------------------------------------------+
' (C) Copyright 1988, 1989, 1990 Erik J. Oredson, All Rights Reserved.
'

Rem $Include: 'DNDCNFG.INC'

Inregs.AX=&H1000
Call Interrupt(&H2F,INREGS,OUTREGS)
If (Outregs.AX And &HFF)<>&HFF Then
A=Chr$(27)+"[0m"
Call Scrn(A)
A=Chr$(27)+"[2J"
Call Scrn(A)
A=Chr$(27)+"[24;1H"
Call Scrn(A)
A=Date$+" "+Time$+" Share not installed."
Call Scrn(A)
End
Endif
Restore Class.Data
For L=1 To 10
Read AQ(L)
Next
Dnd$=Environ$("DNDBBS")
If Dnd$<>"" Then
If Right$(Dnd$,1)<>"\" Then
Dnd$=Dnd$+"\"
Endif
Endif
On Error Goto Err.Rout1
Er$="Sub MAIN"
Call Giveinit
X$=COMMAND$
If Len(X$)=1 Or Mid$(X$,2,1)=" " Then
Node=ASC(X$)
Endif
F$=Dnd$+"DNDBBS"
If Node=0 Then
F$=F$+".CFG"
Else
F$=F$+Chr$(NODE)+".CFG"
Endif
Er=0
Close 1
Open F$ For Input Shared As #1
If Er=0 Then
For L=1 To 40
Input #1,X
Next
For L=1 To 10
Line Input #1,X$
Next
For L=1 To 29
Input #1,X!
Next
For L=1 To 67
Input #1,X
Next
For X=1 To 52
Line Input #1,X$
Next
Input #1,TEMP$
Endif
If Er Then
Temp$=""
Endif
AL$=Environ$("DNDTEMP")
If AL$<>"" Then
Temp$=AL
If Right$(Temp$,1)<>"\" Then
Temp$=Temp$+"\"
Endif
Endif
Exit$=Temp$+"DNDEXIT"
If Node=0 Then
Exit$=Exit$+".DAT"
Else
Exit$=Exit$+Chr$(Node)+".DAT"
Endif
Close 1
Open Exit$ For Random Shared As #1 LEN=Len(NDE)
If Lof(1)=0 Then
LM=-1
CX!=3600
T2!=Timer
EX=0
Else
GET 1,1,NDE
RM=NDE.RM
LM=NDE.LM
CGA=NDE.CGA
T2!=NDE.T2
CX!=NDE.CX
UX=NDE.UX
PORT=NDE.PT
FOS=NDE.FS
P1=NDE.MD
EX=-1
Endif
Close 1
On Error Goto Err.Rout2
DO
Restore Main.Data
For I=1 To 8
Read A(I)
Next
For I=1 To 8
Read Z(I,1),Z(I,2)
Next
Z=1
Locate ,,1
A=Chr$(27)+"[0;1;44m"
Call Io.O
A=Chr$(27)+"[2J"
Call Io.O
A=Chr$(27)+"[33m"
Call Io.O
A=Chr$(27)+"[1;30HDnDBBS SYSOP CONFIG"
Call Io.O
A=Chr$(27)+"[37;40m"
Call Io.O
A=Chr$(27)+"[7;15H"+A(1)
Call Io.O
A=Chr$(27)+"[33;44m"
Call Io.O
For I=2 To 8
A=Chr$(27)+"["+Mid$(Str$(Z(I,1)),2)+";"+Mid$(Str$(Z(I,2)),2)+"H"+A(I)
Call Io.O
Next
Call Status.Line
DO
RE=0
If LM=0 Then
NQ=-1
FG=1
Call Io.I
NQ=0
If CX!=0 Then
Exit Do
Endif
X$=AL
Else
X$=""
Do While X$=""
X$=Inkey$
Call Giveback
Loop
If Len(X$)=2 Then
X=ASC(Mid$(X$,2,1))
Call Main.Select
Endif
Endif
If RE Then
X$=Chr$(13)
Endif
Select Case X$
Case Chr$(9)
Call Main.Select
Case Chr$(23)
Call Write.Config
Call Status.Line
Case Chr$(4)
Call Load.Defaults
Call Status.Line
Case Chr$(18)
Call Readdef
Call Status.Line
Case Chr$(27)
CX!=0
Exit Do
Case Chr$(13)
Select Case Z
Case 1
Call Edit.Page.One
Exit Do
Case 2
Call Edit.Page.Two
Exit Do
Case 3
Call Edit.Page.Three
Exit Do
Case 4
Call Edit.Page.Four
Exit Do
Case 5
Call Edit.Page.Five
Exit Do
Case 6
Call Edit.Page.Six
Exit Do
Case 7
Call Edit.Page.Seven
Exit Do
Case 8
CX!=0
Exit Do
Case Else
End Select
Case Else
End Select
Loop
If CX!=0 Then
CX!=30
A=Chr$(27)+"[0m"
Call Io.O
A=Chr$(27)+"[2J"
Call Io.O
If EX Then
A=Chr$(27)+"[24;1H"
Call Io.O
Chain Dnd$+"DNDBBS.EXE"
Endif
Exit Do
Endif
Loop
End

Sub Data.Prompt
On Error Goto Err.Rout2
Er$="Sub Data.Prompt"
A=Chr$(27)+"[23;1H"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A="Enter Option Data: "
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=Chr$(27)+"[K"
Call Io.O
A=Chr$(27)+"[0;37;40m"
Call Io.O
A=Space$(5)
Call Io.O
X=23
Y=20
Q=20
LL=60
N1=23
N=1
L=1
AX(1)=""
Call Screen.Edit
AL=AX(1)
If UCase$(Left$(AL,1))="Y" Then
YE=-1
Else
YE=0
Endif

End Sub

Sub Status.Line
On Error Goto Err.Rout2
Er$="Sub Status.Line"
A=Chr$(27)+"[0;1;33m"
Call Io.O
A=Chr$(27)+"[23;1H"
Call Io.O
If LM=0 Then
A="REMOTE USER: Cursor to Option with TAB, Select with ENTER"
Else
A=Chr$(26)+Chr$(24)+Chr$(25)+" Cursor Select "+Chr$(17)+Chr$(196)+Chr$(217)+" Enter Choice"
Endif
A=A+Chr$(27)+"[K"
Call Io.O
A=Chr$(27)+"[0;33m"
Call Io.O
A=Chr$(27)+"[24;1H"
Call Io.O
A="^d Load Config Defaults ^w Write Config ^r Read Config"+Chr$(27)+"[K"
Call Io.O

End Sub

Sub Option.Prompt
On Error Goto Err.Rout2
Er$="Sub Option.Prompt"
A=Chr$(27)+"[24;1H"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A="Press to return to Main Menu"
Call Io.O
A=Chr$(27)+"[23;1H
Call Io.O
A="Enter Option Number: "
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=Chr$(27)+"[K"
Call Io.O
A=Chr$(27)+"[0;37;40m"
Call Io.O
A=Space$(5)
Call Io.O
X=23
Y=22
Q=22
LL=5
N1=23
N=1
L=1
AX(1)=""
Call Screen.Edit
Z=Val(AX(1))

End Sub

Sub Edit.Page.One
On Error Goto Err.Rout2
Er$="Sub Edit.Page.One"
Call Display.Page.One
For L=1 To 22
Call Select.Page.One(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=22 Then
If Z=21 Then
DO
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Chr$(27)+"[2J"
Call Io.O
A="Increments for Players during Level increase"
Call Io.O
For I=1 To 10
A=Chr$(27)+"["+Mid$(Str$(I*2),2)+";1H"
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=AQ(I)
Call Io.O
A=Chr$(27)+"["+Mid$(Str$(I*2+1),2)+";1H"
Call Io.O
A=Mid$(Str$((I-1)*4+1),2)+". Fatigue"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Str$(CFU(I,1))+" "
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=Mid$(Str$((I-1)*4+2),2)+". Vitality"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Str$(CFU(I,2))+" "
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=Mid$(Str$((I-1)*4+3),2)+". Magic Points"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Str$(CFU(I,3))+" "
Call Io.O
A=Chr$(27)+"[0;37;44m"
Call Io.O
A=Mid$(Str$((I-1)*4+4),2)+". Psionic Points"
Call Io.O
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Str$(CFU(I,4))
Call Io.O
Next
Call Option.Prompt
If Z=0 Then
Exit Do
Endif
If Z>=1 And Z<=40 Then
Call Data.Prompt
L=INT(Val(AX(1)))
If L>0 Then
I=INT((Z-1)/4)
Z=Z-I*4
I=I+1
CFU(I,Z)=L
Endif
Endif
Loop
Call Display.Page.One
For L=1 To 20
Call Select.Page.One(L)
Next
Else
Call Data.Prompt
If Z=1 Then
CF!(1)=Val(AL)
Endif
If Z=2 Then
CF!(2)=Val(AL)
Endif
If Z=3 Then
CF!(3)=Val(AL)
Endif
If Z=4 Then
CF(1)=Val(AL)
Endif
If Z=5 Then
If YE Then
CF(2)=-1
Else
CF(2)=0
Endif
Endif
If Z=6 Then
If YE Then
CF(3)=-1
Else
CF(3)=0

Endif
Endif
If Z=7 Then
If YE Then
CF(4)=-1
Else
CF(4)=0
Endif
Endif
If Z=8 Then
CF$(1)=AL
Endif
If Z=9 Then
CF$(2)=AL
Endif
If Z=10 Then
If YE Then
CF(5)=-1
Else
CF(5)=0
Endif
Endif
If Z=11 Then
CF$(3)=AL
Endif
If Z=12 Then
If YE Then
CF(6)=-1
Else
CF(6)=0
Endif
Endif
If Z=13 Then
CF$(4)=AL
Endif
If Z=14 Then
If YE Then
CF(38)=-1
Else
CF(38)=0
Endif
Endif
If Z=15 Then
CF$(5)=AL
Endif
If Z=16 Then
If YE Then
CF(7)=-1
Else
CF(7)=0
Endif
Endif
If Z=17 Then
CF(8)=Val(AL)
Endif
If Z=18 Then
CF(9)=Val(AL)
Endif
If Z=19 Then
CF!(4)=Val(AL)
Endif
If Z=20 Then
CF(32)=Val(AL)
Endif
If Z=22 Then
CF(67)=Val(AL)
Endif
Call Select.Page.One(Z)
Endif
Endif
Loop

End Sub

Sub Edit.Page.Two
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Two"
Call Display.Page.Two
For L=1 To 21
Call Select.Page.Two(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=22 Then
If Z=22 Then
Call Display.Page.Two.TWO
For L=22 To 36
Call Select.Page.Two(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=22 And Z<=37 Then
If Z=37 Then
Exit Do
Endif
Call Data.Prompt
If Z=22 Then
CF$(9)=AL
Endif
If Z=23 Then
CF$(10)=AL
Endif
If Z=24 Then
If YE Then
CF(39)=-1
Else
CF(39)=0
Endif
Endif
If Z=25 Then
If YE Then
CF(44)=-1
Else
CF(44)=0
Endif
Endif
If Z=26 Then
If YE Then
CF(58)=-1
Else
CF(58)=0
Endif
Endif
If Z=27 Then
CF(37)=Val(AL)
Endif
If Z=28 Then
CF!(9)=Val(AL)/100
Endif
If Z=29 Then
CF(62)=Val(AL)
Endif
If Z=30 Then
CF(43)=Val(AL)
Endif
If Z=31 Then
CF!(27)=Val(AL)/100
Endif
If Z=32 Then
CF(42)=Val(AL)
Endif
If Z=33 Then
CF!(26)=Val(AL)/100
Endif
If Z=34 Then
CF(41)=Val(AL)
Endif
If Z=35 Then
CF!(25)=Val(AL)/100
Endif
If Z=36 Then
CF(40)=Val(AL)
Endif
Call Select.Page.Two(Z)
Endif
Loop
Call Display.Page.Two
For L=1 To 21
Call Select.Page.Two(L)
Next
Else

Call Data.Prompt
If Z=1 Then
CF(10)=Val(AL)
Endif
If Z=2 Then
CF(11)=Val(AL)
Endif
If Z=3 Then
CF(12)=INT(Val(AL))
Endif
If Z=4 Then
AL=UCase$(AL)
If AL="H" Then
CF(13)=-1
Else
If AL="V" Then
CF(13)=0
Endif
Endif
Endif
If Z=5 Then
If YE Then
CF(14)=-1
Else
CF(14)=0
Endif
Endif
If Z=6 Then
CF$(6)=AL
Endif
If Z=7 Then
If YE Then
CF(61)=-1
Else
CF(61)=0
Endif
Endif
If Z=8 Then
CF$(14)=AL
Endif
If Z=9 Then
CF(15)=Val(AL)
Endif
If Z=10 Then
If YE Then
CF(16)=-1
Else
CF(16)=0
Endif
Endif
If Z=11 Then
If YE Then
CF(17)=-1
Else
CF(17)=0
Endif
Endif
If Z=12 Then
If YE Then
CF(18)=-1
Else
CF(18)=0
Endif
Endif
If Z=13 Then
If YE Then
CF(19)=-1
Else
CF(19)=0
Endif
Endif
If Z=14 Then
If YE Then
CF(20)=-1
Else
CF(20)=0
Endif
Endif
If Z=15 Then
CF(21)=Val(AL)
Endif
If Z=16 Then
CF(22)=Val(AL)
Endif
If Z=17 Then
CF(23)=Val(AL)
Endif
If Z=18 Then
CF(24)=Val(AL)
Endif
If Z=19 Then
CF!(5)=Val(AL)/100
Endif
If Z=20 Then
CF$(7)=AL
Endif
If Z=21 Then
CF$(8)=AL
Endif
Call Select.Page.Two(Z)
Endif
Endif
Loop

End Sub

Sub Edit.Page.Three
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Three"
Call Display.Page.Three
For L=1 To 14
Call Select.Page.Three(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=14 Then
Call Data.Prompt
If Z=1 Then
CF$(11)=AL
If AL<>"" Then
If Right$(AL,1)<>"\" Then
CF$(11)=CF$(11)+"\"
Endif
Endif
Endif
If Z=2 Then
CF$(52)=AL
If AL<>"" Then
If Right$(AL,1)<>"\" Then
CF$(52)=CF$(52)+"\"
Endif
Endif
Endif
If Z=3 Then
CF$(53)=AL
If AL<>"" Then
If Right$(AL,1)<>"\" Then
CF$(53)=CF$(53)+"\"
Endif
Endif
Endif
If Z=4 Then
CF$(51)=AL
Endif
If Z=5 Then
CF$(15)=AL
Endif
If Z=6 Then
CF$(16)=AL
Endif
If Z=7 Then
CF$(17)=AL
Endif
If Z=8 Then
CF$(18)=AL
Endif
If Z=9 Then
CF$(19)=AL
Endif
If Z=10 Then
CF$(20)=AL
Endif
If Z=11 Then
CF$(21)=AL
Endif
If Z=12 Then
CF$(12)=AL
Endif
If Z=13 Then
CF$(13)=AL
Endif
If Z=14 Then
CF$(28)=AL
Endif
Call Select.Page.Three(Z)
Endif
Loop

End Sub

Sub Edit.Page.Four
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Four"
Call Display.Page.Four
For L=1 To 16
Call Select.Page.Four(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Do
Endif
If Z>=1 And Z<=16 Then
Call Data.Prompt
If Z=1 Then
CF$(22)=AL
Endif
If Z=2 Then
CF$(23)=AL
Endif
If Z=3 Then
CF$(24)=AL
Endif
If Z=4 Then
CF$(25)=AL
Endif
If Z=5 Then
CF$(26)=AL
Endif
If Z=6 Then
CF$(27)=AL
Endif
If Z=7 Then
CFX$(1)=AL
Endif
If Z=8 Then
CFX$(2)=AL
Endif
If Z=9 Then
CFX$(3)=AL
Endif
If Z=10 Then
CFX$(4)=AL
Endif
If Z=11 Then
CFX$(5)=AL
Endif
If Z=12 Then
CFX$(6)=AL
Endif
If Z=13 Then
CFX$(7)=AL
Endif
If Z=14 Then
CFX$(8)=AL
Endif
If Z=15 Then
CFX$(9)=AL
Endif
If Z=16 Then
CFX$(10)=AL
Endif
Call Select.Page.Four(Z)
Endif
Loop

End Sub

Sub Edit.Page.Five
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Five"
Call Display.Page.Five
For L=1 To 22
Call Select.Page.Five(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=22 Then
If Z=22 Then
Call Display.Page.Five.TWO
For L=23 To 28
Call Select.Page.Five(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=23 And Z<=28 Then
If Z=28 Then
Exit Do
Endif
Call Data.Prompt
If Z=21 Then
CF(35)=Val(AL)
Endif
If Z=23 Then
CF(36)=Val(AL)
Endif
If Z=24 Then
CF!(22)=Val(AL)/100
Endif
If Z=25 Then
CF!(24)=Val(AL)/100
Endif
If Z=26 Then
If YE Then
CF(55)=-1
Else
CF(55)=0
Endif
Endif
If Z=27 Then
CF(59)=Val(AL)
Endif
Call Select.Page.Five(Z)
Endif
Loop
Call Display.Page.Five
For L=1 To 22
Call Select.Page.Five(L)
Next
Else
If Z=1 Then
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Chr$(27)+"[23;1H"
Call Io.O
A=Chr$(27)+"[K"
Call Io.O
A=Chr$(27)+"[23;1H"
Call Io.O
A="Number of Items for sale in the Weapons Shoppe? "
Call Io.O
A=Chr$(27)+"[23;49H"
Call Io.O
A=Chr$(27)+"[0;37;40m"
Call Io.O
A=Space$(5)
Call Io.O
X=23
Y=49
Q=49
LL=5
N1=23
N=1
L=1
AX(1)=""
Call Screen.Edit
AL=AX(1)
CF(25)=Val(AL)
Call Select.Page.Five(1)
Redim CFW(CF(25))
For Z=1 To CF(25)
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Chr$(27)+"[23;1H"
Call Io.O
A=Chr$(27)+"[K"
Call Io.O
A=Chr$(27)+"[23;1H"
Call Io.O
A=Chr$(27)+"[1;33;44m"
Call Io.O
A="Treasure Number for Item#"+Mid$(Str$(Z),2)
Call Io.O
A=Chr$(27)+"[0;37;40m"
Call Io.O
A=Chr$(27)+"[23;31H"
Call Io.O
A=Space$(5)
Call Io.O
X=23
Y=31
Q=31
LL=5
N1=23
N=1
L=1
AX(1)=""
Call Screen.Edit
AL=AX(1)
CFW(Z)=Val(AL)
Next
Else
Call Data.Prompt
If Z=2 Then
CF(26)=Val(AL)
Endif
If Z=3 Then
CF!(11)=Val(AL)/100
Endif
If Z=4 Then
CF!(12)=Val(AL)/100
Endif
If Z=5 Then
CF!(13)=Val(AL)/100
Endif
If Z=6 Then
CF!(14)=Val(AL)/100
Endif
If Z=7 Then
CF!(15)=Val(AL)
Endif
If Z=8 Then
CF(27)=Val(AL)
Endif
If Z=9 Then
CF(28)=Val(AL)
Endif
If Z=10 Then
CF!(16)=Val(AL)/100
Endif
If Z=11 Then
CF(29)=Val(AL)
Endif
If Z=12 Then
CF(30)=Val(AL)
Endif
If Z=13 Then
CF!(17)=Val(AL)/100
Endif
If Z=14 Then
CF!(18)=Val(AL)/100
Endif
If Z=15 Then
CF!(19)=Val(AL)/100
Endif
If Z=16 Then
CF(31)=Val(AL)
Endif
If Z=17 Then
CF!(20)=Val(AL)/100
Endif
If Z=18 Then
CF(33)=Val(AL)
Endif
If Z=19 Then
CF(34)=Val(AL)
Endif
If Z=20 Then
CF!(21)=Val(AL)/100
Endif
Call Select.Page.Five(Z)
Endif
Endif
Endif
Loop

End Sub

Sub Edit.Page.Six
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Six"
Call Display.Page.Six
For L=1 To 15
Call Select.Page.Six(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=15 Then
Call Data.Prompt
If Z=1 Then
CF(46)=Val(AL)
X=0
If CF(46)=1 Then
X=1016
Else
If CF(46)=2 Then
X=760
Endif
Endif
If X Then
For L=0 To 7
CF(L+48)=X+L
Next
Call Select.Page.Six(10)
Endif
Endif
If Z=2 Then
CF(47)=Val(AL)
Endif
If Z=3 Then
CF$(38)=AL
If Right$(CF$(38),1)<>"\" Then
CF$(38)=CF$(38)+"\"
Endif
Endif
If Z=4 Then
CF$(42)=AL
Endif
If Z=5 Then
CF$(39)=AL
Endif
If Z=6 Then
CF$(40)=AL
Endif
If Z=7 Then
CF$(41)=AL
Endif
If Z=8 Then
CF(56)=Val(AL)
Endif
If Z=9 Then
If YE Then
CF(65)=-1
Else
CF(65)=0
Endif
Endif
If Z=10 Then
For L=0 To 7
CF(L+48)=Val("&H"+AL)+L
Next
Endif
If Z=11 Then
CF(64)=INT(Val(AL))
Endif
If Z=12 Then
CF(60)=Val(AL)
Endif
If Z=13 Then
If YE Then
CF(45)=-1
Else
CF(45)=0
Endif
Endif
If Z=14 Then
If YE Then
CF(66)=-1
Else
CF(66)=0
Endif
Endif
If Z=15 Then
CF$(54)=Ucase$(AL)
Endif
Call Select.Page.Six(Z)
Endif
Loop

End Sub

Sub Edit.Page.Seven
On Error Goto Err.Rout2
Er$="Sub Edit.Page.Seven"
Call Display.Page.Seven
For L=1 To 13
Call Select.Page.Seven(L)
Next
DO
Call Option.Prompt
If Z=0 Then
Exit Sub
Endif
If Z>=1 And Z<=14 Then
If Z=14 Then
Restore Equate.Data
For L=1 To 9
Read CF$(28+L)
Next
Read CF$(43),CF$(44),CF$(45)
A=Chr$(27)+"[1;37;44m"
Call Io.O
A=Chr$(27)+"[24;1H"
Call Io.O
A=Chr$(27)+"[K"
Call Io.O
A="Default Equations Loaded."
Call Io.O
For L=1 To 13
Call Select.Page.Seven(L)
Next
Else
Call Data.Prompt
If Z=1 Then
If YE Then
CF(63)=-1
Else
CF(63)=0
Endif
Endif
If Z=2 Then
CF$(29)=AL
Endif
If Z=3 Then
CF$(30)=AL
Endif
If Z=4 Then
CF$(31)=AL
Endif
If Z=5 Then
CF$(32)=AL
Endif
If Z=6 Then
CF$(33)=AL
Endif
If Z=7 Then
CF$(34)=AL
Endif
If Z=8 Then
CF$(35)=AL
Endif
If Z=9 Then
CF$(36)=AL
Endif
If Z=10 Then
CF$(37)=AL
Endif
If Z=11 Then
CF$(43)=AL
Endif
If Z=12 Then
CF$(44)=AL
Endif
If Z=13 Then
CF$(45)=AL
Endif
Call Select.Page.Seven(Z)
Endif
Endif
Loop

End Sub

Sub Write.Config
On Error Goto Err.Rout2
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 67
Print #1,CF(L)
Next
For L=1 To 54
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.Rout2
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 67
Read CF(L)
Next
For L=1 To 54
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

Sub Readdef
On Error Goto Err.Rout1
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)
If Er Then
Exit For
Endif
Next
If Er Then
Exit For
Endif
Next
IF Er=0 Then
For L=1 To 10
Line Input #1,CFX$(L)
If Er Then
Exit For
Endif
Next
Endif
If Er=0 Then
For L=1 To 29
Input #1,CF!(L)
If Er Then
Exit For
Endif
Next
Endif
If Er=0 Then
For L=1 To 67
Input #1,CF(L)
If Er Then
Exit For
Endif
Next
Endif
If Er=0 Then
For L=1 To 54
Line Input #1,CF$(L)
If Er Then
Exit For
Endif
Next
Endif
If Er=0 Then
Redim CFW(CF(25))
For L=1 To CF(25)
Input #1,CFW(L)
If Er Then
Exit For
Endif
Next
Endif
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 67
Read CF(L)
Next
For L=1 To 54
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
If Er Then
A="Error reading "+F$+". Press to Continue"
Else
A="Config File "+F$+" Loaded. Press to Continue"
Endif
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
A=Chr$(27)+"[22;1H22. Minimum Level User must be to Relogin(zero=disable):"
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
If X=22 Then
A=Chr$(27)+"[22;58H"
Call Io.O
A=Chr$(27)+"[K"+Str$(CF(67))
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 be 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"
Call Io.O
A=Chr$(27)+"[K"+Str$(CF(22))
Call Io.O
Endif
If X=17 Then
A=Chr$(27)+"[17;56H"
Call Io.O
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

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

End Sub

Sub Main.Select
On Error Goto Err.Rout2
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;1H"
A=A+"13. 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=PCB(12.0), 4=PCB(14.0)"
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
A=Chr$(27)+"[14;1H14. Allow Remote Access to DOS by DMs:"
Call Io.O
A=Chr$(27)+"[15;1H15. Password For Remote Access to DOS:"
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;64H"+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+"PCB(12.0)"
Else
If CF(47)=4 Then
A=A+"PCB(14.0)
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
If X=14 Then
A=Chr$(27)+"[14;41H"
Call Io.O
A=Chr$(27)+"[K"
If CF(66) Then
A=A+"Yes"
Else
A=A+"No"
Endif
Call Io.O
Endif
If X=15 Then
A=Chr$(27)+"[15;41H"
Call Io.O
A=Chr$(27)+"[K"+CF$(54)
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.Rout2
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
Endif
Exit Do
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

Sub Fossil(X)
If FOS=0 Then
If X=2 Then
OUT P1+4,0
Endif
If X=3 Then
OUT P1+4,3
Endif
If X=4 Then
OUT P1+3,131
If LS=300 Then
OUT P1,128
OUT P1+1,1
Endif
If LS=1200 Then
OUT P1,96
OUT P1+1,0
Endif
If LS=2400 Then
OUT P1,48
OUT P1+1,0
Endif
If LS=4800 Then
OUT P1,24
OUT P1+1,0
Endif
If LS=9600 Then
OUT P1,12
OUT P1+1,0
Endif
OUT P1+3,3
Endif
If X=5 Then
Outregs.AX=INP(P1+6) Or (INP(P1+5)*256)
Endif
If X=6 Then
Outregs.AX=INP(P1)
Endif
If X=8 Then
OUT P1+4,3
Endif
If X=9 Then
OUT P1,Inregs.AX
Endif
Else
If X=1 Then
Inregs.AX=&H0400
Endif
If X=2 Then
Inregs.AX=&H0600
Endif
If X=3 Then
Inregs.AX=&H0601
Endif
If X=4 Then
If LS=300 Then
Inregs.AX=&H0043
Endif
If LS=1200 Then
Inregs.AX=&H0083
Endif
If LS=2400 Then
Inregs.AX=&H00A3
Endif
If LS=4800 Then
Inregs.AX=&H00C3
Endif
If LS=9600 Then
Inregs.AX=&H00E3
Endif
Endif
If X=5 Then
Inregs.AX=&H0300
Endif
If X=6 Then
Inregs.AX=&H0200
Endif
If X=7 Then
Inregs.AX=&H0500
Endif
If X=8 Then
Inregs.AX=&H0FFF
Endif
If X=9 Then
Inregs.AX=Inregs.AX Or &H0100
Endif
Inregs.DX=PORT
Call INTERRUPT(&H14,INREGS,OUTREGS)
Endif

End Sub

Main.Data:
Data Logon Variables,Processing Variables,File Variables
Data Rooms Variables,Command Variables,Modem Variables
Data Custom Equations,Quit Configure
Data 7,15,9,15,11,15,13,15,7,50,9,50,11,50,13,50

Class.Data:
Data Fighter,Magic User,Thief,Cleric,Paladin,Ranger,Druid,Lady
Data Assistant DM,Dungeon Master

Equate.Data:
Data "(RND*(MHP/10)-(SH+AR)/2)*XX"
Data "(RND*STR+LVL/2)*(XX+(WP1+WP2+WP3+WP4)/100)+WE"
Data "DEX/2>RND*10+MLVL/10","RND*10+MLVL/10>DEX/2"
Data "RND*LVL+2>MLVL","DEX>RND*5+MLVL/2"
Data "RND*5+LVL>MLVL","RND*15>STR","(FT+VT+MG)*LF+ST"
Data "(RND*INT+WIS)*(PSIA+XX)","(RND*(MHP/10)-PSID)*MPSI"
Data "(RND*10+10)+CON/2>20"

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,0,1
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","","","","","DNDRANK.DAT","","",""

Err.Rout1:
If Err=70 Then
Resume
Else
Er=-1
Resume Next
Endif

Err.Rout2:
If Err=70 Then
Resume
Endif
If Err=6 Then
OV=-1
Resume Next
Endif
Er=-1
X$="Module DNDCNFG 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