home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
DND29C4.ZIP
/
SOURCE.ZIP
/
DNDSUB2.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-07
|
73KB
|
3,068 lines
Rem dndsub2.bas v2.9c
Rem $Include: 'dndbbs.inc'
Sub Login
On Local Error Goto 10002
Call Prelogin
If Bypass.Login Then
Call Alt.Login(Logged.In)
If Logged.In Then
Call Get.User.Stats(Logged.In)
Endif
If Logged.In=False Then
Strng="Bad bypass login"
Call Error.Message
Endif
Call Display.Prenotice
Call Update.Login
Call Login.User
Exit Sub
Endif
Call Display.Prenotice
Do While Security.Guard
If Config2(4) Then
Call Out.File(Prelog.FileName)
If Break=False Then
Strng=Nul
Call IO.O
Endif
Endif
Login.Try=False
Do While Security.Guard
New.User=False
Call Get.Codename
Call Get.PassWord
Call Find.PassWord(Logged.User)
If Logged.User Then
Call Verify.PassWord(Logged.Pass)
If Logged.Pass Then
Exit Do
Endif
If Login.Try>=3 Then
Call Hang.Up(7)
Exit Sub
Endif
Login.Try=Login.Try+1
Strng="Illegal password attempt!"
Call IO.O
Else
Call Get.Newuser.Record
Call Verify.Newuser(New.User)
If New.User>False Then
Call Hang.Up(8)
Exit Sub
Endif
If New.User<False Then
Call Init.Newuser
Call Verify.Newlogin(New.User,True)
If New.User Then
Exit Do
Endif
Endif
Endif
Loop
If Config2(6) Then
Call Out.File(Notice.FileName)
If Break=False Then
Strng=Nul
Call IO.O
Endif
Endif
Call Update.Login
If New.User=False Then
Exit Do
Endif
If New.User Then
Call Roll.Character
Call Verify.Newlogin(New.User,False)
If New.User Then
Call Clear.LogFile
Exit Do
Endif
Endif
Loop
If New.User Then
Strng="Wait.."
Call IO.O
Call Init.Mail
Endif
If Config2(5) Then
Call Out.File(Welcome.FileName)
If Break=False Then
Strng=Nul
Call IO.O
Endif
Endif
Call Login.User
10001
Exit Sub
10002
Resume 10001
End Sub
Sub Find.PassWord(Var)
On Local Error Goto 10012
Var=False
For User.Index=1 To Lof(3)/Len(UserRecord)
Get 3,User.Index,UserRecord
Out2=Rtrim$(CodeName.Temp)
Strng=UserRecord.CodeName
Call Decrypt(Strng)
Strng=Rtrim$(Strng)
If Strng=Out2 Then
Var=True
Exit For
Endif
Next
10011
Exit Sub
10012
Resume 10011
End Sub
Sub Verify.PassWord(Var)
On Local Error Goto 10022
If Node>False Then
Call Search.Mess(User.Index)
If Temp Then
Strng="That codename is active on another node."
Call IO.O
Var=False
Exit Sub
Endif
Endif
Strng=UserRecord.PassWord
Call Decrypt(Strng)
If Len(Strng)=False Then
Strng="Password has a checksum error."
Call IO.O
Var=False
Exit Sub
Endif
Strng=Rtrim$(Strng)
Out2=Rtrim$(PassWord.Temp)
If Strng=Out2 Then
Var=True
Exit Sub
Endif
10021
Exit Sub
10022
Resume 10021
End Sub
Sub Verify.Newlogin(Var,Var1)
On Local Error Goto 10032
Do While Security.Guard
Graphics.Off=False
If Var1 Then
Strng=Config3(5)
Else
Strng=Config3(77)
Endif
No.Echo=True
Line.Length=1
Call IO.I
No.Echo=False
If Out2=" " Then
Var=False
Exit Sub
Endif
If No.Input Then
Var=True
Exit Sub
Endif
Loop
10031
Exit Sub
10032
Resume 10031
End Sub
Sub Get.Codename
On Local Error Goto 10042
Do While Security.Guard
Do While Security.Guard
Strng=Nul
Call IO.O
Strng="Codename? "
Line.Length=30
Call IO.I
Out2=Ltrim$(Out2)
Out2=Rtrim$(Out2)
Out2=Ucase$(Out2)
CodeName.Temp=Out2
If Len(CodeName.Temp)>False Then
Strng=CodeName.Temp
Call Valid.Name(Strng)
If TempA=False Then
Strng="Illegal codename."
Call IO.O
Else
Call Valid(CodeName.Temp,30)
If Len(CodeName.Temp)>False Then
Exit Do
Endif
Strng="Illegal characters in codename."
Call IO.O
Endif
Endif
Loop
Strng=Rtrim$(CodeName.Temp)
Strng=Lcase$(Strng)
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Strng="You are "+Chr$(34)+Strng+Chr$(34)+"(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Exit Do
Endif
Loop
10041
Exit Sub
10042
Resume 10041
End Sub
Sub Get.PassWord
On Local Error Goto 10052
Do While Security.Guard
Strng=Nul
Call IO.O
Strng="Password? "
Line.Length=20
Hide=True
Call IO.I
Hide=False
Out2=Ltrim$(Out2)
Out2=Rtrim$(Out2)
Out2=Ucase$(Out2)
PassWord.Temp=Out2
If Len(PassWord.Temp)>False Then
Call Valid(PassWord.Temp,20)
If Len(PassWord.Temp)>False Then
Exit Do
Endif
Strng="Illegal characters in password."
Call IO.O
Endif
Loop
10051
Exit Sub
10052
Resume 10051
End Sub
Sub Get.Newuser.Record
On Local Error Goto 10062
For User.Index=1 To Lof(3)/Len(UserRecord)
Get 3,User.Index,UserRecord
Strng=UserRecord.CodeName
Call Decrypt(Strng)
If Left$(Strng,9)=Deleted$ Then
Exit For
Endif
Next
Get 3,User.Index,UserRecord
Strng="Username not found in files."
Call IO.O
10061
Exit Sub
10062
Resume 10061
End Sub
Sub Verify.Newuser(Var)
On Local Error Goto 10072
If Config2(61)=False Then
Var=True
Exit Sub
Endif
Do While Security.Guard
Strng=Config3(14)
No.Input.Out="C"
Call IO.I
Var=False
Select Case Ucase$(Out2)
Case "C"
Strng=Nul
Call IO.O
Strng="Verify password: "
Hide=True
Line.Length=20
Call IO.I
Hide=False
Out2=Ltrim$(Out2)
Out2=Rtrim$(Out2)
Out2=Ucase$(Out2)
Strng=Rtrim$(PassWord.Temp)
If Strng<>Out2 Then
Strng="Passwords don't match!"
Call IO.O
Exit Do
Endif
Strng=Config3(2)
If Len(Strng)>False Then
Call IO.O
Call IO.O
Endif
Var=True
Exit Do
Case "H"
Var=1
Exit Do
Case "R"
Exit Do
End Select
Loop
10071
Exit Sub
10072
Resume 10071
End Sub
Sub Roll.Character
On Local Error Goto 10082
TempZ=False
If Config2(51)=False Then
If Config2(53)=False Then
If Config2(54)=False Then
Strng="List help text during character logon(y/n)?"
No.Input.Out="N"
Call IO.I
If Yes Then
TempZ=True
Endif
Endif
Endif
Endif
If Config2(54) Then
UserRecord.ClassType=1
Strng=Class.Name(1)
Call Valid(Strng,20)
If Strng=Nul Then
Strng="<checksum>"
Call Valid(Strng,20)
Endif
Call Encrypt(Strng,True)
UserRecord.ClassName=Strng
Else
If TempZ Then
Call Logon.Help(2)
Endif
Call Modify.Class
Endif
If Config2(51) Then
Call Roll.Stats
Else
If TempZ Then
Call Logon.Help(3)
Endif
Call Modify.Stats
Endif
If Config2(54) Then
UserRecord.Race=1
Else
If TempZ Then
Call Logon.Help(4)
Endif
Call Modify.Race
Endif
If Config2(52)=False Then
Call Init.Race.Stats
Endif
If Config2(53) Then
UserRecord.Proficiency=3
For Temp3=1 To 4
UserRecord.Weapons(Temp3)=False
Next
UserRecord.Weapons(3)=10
Else
If TempZ Then
Call Logon.Help(5)
Endif
Call Modify.Proficiency
Endif
If Config2(52)=False Then
Call Init.Proficiency.Stats
Endif
Call Init.Stats
If Config2(53) Then
UserRecord.Align1=False
UserRecord.Align2=False
Else
If TempZ Then
Call Logon.Help(6)
Endif
Call Modify.Alignment
Endif
Call Display.Init.Stats
10081
Exit Sub
10082
Resume 10081
End Sub
Sub Logon.Help(VarY)
On Local Error Goto 10092
Close 13
Open Logon.Help.FileName For Random Shared As #13 Len=Len(HelpRecord1)
Graphics.Off=True
Strng=Nul
Call IO.O
Restore Logon.Data
For VarX=1 To VarY
Read TempA, TempB
Next
For TempC=TempA To TempB
Get 13,TempC,HelpRecord1
Strng=Space$(3)+Rtrim$(HelpRecord1.Text)
Call IO.O
Next
Call IO.O
Call More.Prompt
Graphics.Off=False
10091
Exit Sub
10092
Resume 10091
End Sub
Logon.Data:
Data 2,4,5,9,10,18,19,27,28,33,34,38,39,42
Sub Modify.Alignment
On Local Error Goto 10102
Do While Security.Guard
Graphics.Off=False
Strng="Player Alignment:"
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Graphics.Off=True
For Temp5=1 To 3
Strng=Mid$(Str$(Temp5),2)+"> "+Rtrim$(Alignment.Name1(Temp5))
Call IO.O
Next
Strng="?"
No.Input.Out="2"
Call IO.I
Temp2=Int(Val(Out2))
If Temp2>=1 And Temp2<=3 Then
Exit Do
Endif
Loop
UserRecord.Align1=Temp2-2
Do While Security.Guard
Graphics.Off=False
Strng="Player Alignment:"
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Graphics.Off=True
For Temp5=1 To 3
Strng=Mid$(Str$(Temp5),2)+"> "+Rtrim$(Alignment.Name2(Temp5))
Call IO.O
Next
Strng="?"
No.Input.Out="2"
Call IO.I
Temp2=Int(Val(Out2))
If Temp2>=1 And Temp2<=3 Then
Exit Do
Endif
Loop
UserRecord.Align2=Temp2-2
10101
Exit Sub
10102
Resume 10101
End Sub
Sub Modify.Class
On Local Error Goto 10112
Strng=Nul
Call IO.O
Do While Security.Guard
Graphics.Off=False
Call IO.O
Strng="Select your character class:"
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Temp1=8
If Config2(7) Then
If Disable.DM=False Then
Temp1=10
Endif
Endif
Graphics.Off=True
For Temp5=1 To Temp1
Strng=Mid$(Str$(Temp5),2)
If Temp5=10 Then
Strng=Mask$
Endif
Strng=Strng+"> "+Rtrim$(Class.Name(Temp5))
Call IO.O
Next
Strng="?"
No.Input.Out="1"
Call IO.I
Temp5=Int(Val(Out2))
If Out2=Mask$ Then
Temp5=10
Endif
If Temp5>=1 And Temp5<=Temp1 Then
Exit Do
Endif
Loop
UserRecord.ClassType=Temp5
Strng=Class.Name(UserRecord.ClassType)
Call Valid(Strng,20)
If Strng=Nul Then
Strng="<checksum>"
Call Valid(Strng,20)
Endif
Call Encrypt(Strng,True)
UserRecord.ClassName=Strng
10111
Exit Sub
10112
Resume 10111
End Sub
Sub Modify.Stats
On Local Error Goto 10122
Do While Security.Guard
Do While Security.Guard
Graphics.Off=False
Strng="Enter character statistics, range from"
Strng=Strng+Str$(Config2(8))+" to"+Str$(Config2(9))+"."
Call IO.O
Strng="Average less than or equal to"+Str$(Config1(4))+"."
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Temp!=False
For Temp2=1 To 7
Do While Security.Guard
Graphics.Off=True
Strng=Rtrim$(Stat(Temp2))+">"
No.Input.Out=Mid$(Str$(Config1(4)),2)
Call IO.I
Temp=Int(Val(Out2))
If Temp<Config2(8) Or Temp>Config2(9) Then
Graphics.Off=False
Strng="The average statistic must range from"+_
Str$(Config2(8))+" to"+Str$(Config2(9))+"."
Call IO.O
Else
Temp!=Temp!+Temp
UserRecord.Stats(Temp2)=Temp
Exit Do
Endif
Loop
Next
Temp!=Temp!/7!
TempX$=Str$(Temp!)
TempX=Instr(TempX$,".")
If TempX=False Then
Out2=TempX$
Else
Out2=Left$(TempX$,TempX-1)+"."+Mid$(TempX$,TempX+1,1)
Endif
Graphics.Off=False
If Temp!<=Config1(4) Then
Exit Do
Endif
Strng="Average"+Out2+" to high. Try again."
Call IO.O
Loop
Strng="Your average is"+Out2+". Change anything(y/n)?"
No.Input.Out="N"
Call IO.I
If No Then
Exit Do
Endif
Loop
10121
Exit Sub
10122
Resume 10121
End Sub
Sub Roll.Stats
On Local Error Goto 10132
Redim Temp.Array1(1 To 7) As Integer
Do While Security.Guard
Strng="Rolling random character stats."
Call IO.O
Do While Security.Guard
Temp!=False
For Temp1=1 To 7
Temp2=Int(Rnd*(Config2(9)-Config2(8)+1)+Config2(8))
Temp!=Temp!+Temp2
Temp.Array1(Temp1)=Temp2
Next
Temp!=Temp!/7!
If Temp!<=Config1(4) Then
Exit Do
Endif
Loop
Graphics.Off=True
Strng=Nul
For Temp1=1 To 7
Strng=Strng+Left$(Stat(Temp1),3)+">"
Strng=Strng+Str$(Temp.Array1(Temp1))+" "
Next
Call IO.O
Strng="Keep these stats(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Exit Do
Endif
Loop
For Temp1=1 To 7
UserRecord.Stats(Temp1)=Temp.Array1(Temp1)
Next
10131
Exit Sub
10132
Resume 10131
End Sub
Sub Modify.Race
On Local Error Goto 10142
Do While Security.Guard
Graphics.Off=False
Strng="Select your character race:"
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Graphics.Off=True
For Temp5=1 To 8
Strng=Mid$(Str$(Temp5),2)+">"+Rtrim$(Race(Temp5))
Call IO.O
Next
Strng="?"
No.Input.Out="1"
Call IO.I
Temp2=Int(Val(Out2))
If Temp2>=1 And Temp2<=8 Then
UserRecord.Race=Temp2
Exit Do
Endif
Loop
10141
Exit Sub
10142
Resume 10141
End Sub
Sub Modify.Proficiency
On Local Error Goto 10152
Do While Security.Guard
Graphics.Off=False
Strng="Weapon Proficiency:"
Call IO.O
Strng="Clerics may only use blunt or pole type weapons."
Call IO.O
Strng="Press "+Enter$+" for default."
Call IO.O
Graphics.Off=True
For Temp5=1 To 4
Strng=Mid$(Str$(Temp5),2)+"> "+Rtrim$(Weapon.Type.Name(Temp5))
Call IO.O
Next
Strng="?"
No.Input.Out="3"
If UserRecord.ClassType=4 Then
No.Input.Out="1"
Endif
Call IO.I
Temp2=Int(Val(Out2))
If UserRecord.ClassType=4 Then
If Temp2=1 Or Temp2=2 Then
Exit Do
Endif
Else
If Temp2>=1 And Temp2<=4 Then
Exit Do
Endif
Endif
Loop
UserRecord.Proficiency=Temp2
For Temp3=1 To 4
UserRecord.Weapons(Temp3)=False
Next
UserRecord.Weapons(Temp2)=10
10151
Exit Sub
10152
Resume 10151
End Sub
Sub Init.Proficiency.Stats
On Local Error Goto 10162
Graphics.Off=False
If UserRecord.Race=3 Then
UserRecord.Weapons(UserRecord.Proficiency)=15
Strng="Gnomes weapon proficiency is raised to 15%"
Call IO.O
Endif
If UserRecord.Race=6 Then
UserRecord.Weapons(4)=UserRecord.Weapons(4)+5
Strng="Half-elves thrusting weapon proficiency is raised by 5%"
Call IO.O
Endif
If UserRecord.Race=7 Then
UserRecord.Weapons(3)=UserRecord.Weapons(3)+5
Strng="Half-orcs sharp weapon proficiency is raised by 5%"
Call IO.O
Endif
10161
Exit Sub
10162
Resume 10161
End Sub
Sub Init.Race.Stats
On Local Error Goto 10172
Graphics.Off=False
If UserRecord.Race=1 Then
UserRecord.Stats(1)=UserRecord.Stats(1)+1
Strng="Humans strength is raised one point."
Call IO.O
Endif
If UserRecord.Race=2 Then
UserRecord.Stats(4)=UserRecord.Stats(4)+1
Strng="Elves dexterity is raised by one point."
Call IO.O
Endif
If UserRecord.Race=4 Then
UserRecord.Stats(2)=UserRecord.Stats(2)+1
Strng="Dwarves intelligence is raised by one point."
Call IO.O
Endif
If UserRecord.Race=5 Then
UserRecord.Stats(3)=UserRecord.Stats(3)+1
Strng="Halflings wisdom is raised by one point."
Call IO.O
Endif
If UserRecord.Race=8 Then
UserRecord.Stats(1)=UserRecord.Stats(1)+1
UserRecord.Stats(4)=UserRecord.Stats(4)+1
Strng="Ogres strength and dexterity are raised by one point."
Call IO.O
Endif
10171
Exit Sub
10172
Resume 10171
End Sub
Sub Init.Stats
On Local Error Goto 10182
UserRecord.Room=Val(Config3(24))
UserRecord.Level=1
UserRecord.Experience=128
UserRecord.Gold=Config2(32)
UserRecord.Bank=False
UserRecord.Borrow=False
UserRecord.Brief=False
UserRecord.FatigueMax=Training.Room(UserRecord.ClassType,1)
UserRecord.VitalityMax=Training.Room(UserRecord.ClassType,2)
UserRecord.MagicMax=Training.Room(UserRecord.ClassType,3)
UserRecord.PsionicMax=Training.Room(UserRecord.ClassType,4)
UserRecord.Fatigue=UserRecord.FatigueMax
UserRecord.Vitality=UserRecord.VitalityMax
UserRecord.Magic=UserRecord.MagicMax
UserRecord.Psionic=UserRecord.PsionicMax
UserRecord.MaxCalls=False
UserRecord.FromHour=False
UserRecord.FromMin=False
UserRecord.ToHour=False
UserRecord.ToMin=False
UserRecord.Flags=False
10181
Exit Sub
10182
Resume 10181
End Sub
Sub Display.Init.Stats
On Local Error Goto 10192
Graphics.Off=False
Strng="Your character statistics are:"
Call IO.O
Graphics.Off=True
Strng="Level:"+Str$(UserRecord.Level)
Strng=Strng+Space$(20-Len(Strng))
Strng2=Alignment.Name1(UserRecord.Align1+2)
Strng2=Rtrim$(Strng2)
Mid$(Strng2,1,1)=Ucase$(Mid$(Strng2,1,1))
Strng=Strng+"Align1: "+Strng2
Call IO.O
Strng="Gold: "+Str$(UserRecord.Gold)
Strng=Strng+Space$(20-Len(Strng))
Strng2=Alignment.Name2(UserRecord.Align2+2)
Strng2=Rtrim$(Strng2)
Mid$(Strng2,1,1)=Ucase$(Mid$(Strng2,1,1))
Strng=Strng+"Align2: "+Strng2
Call IO.O
Strng="Room: "+Str$(UserRecord.Room)
Strng=Strng+Space$(20-Len(Strng))
Temp2=UserRecord.Proficiency
Strng2=Weapon.Type.Name(Temp2)
Strng2=Rtrim$(Strng2)
Mid$(Strng2,1,1)=Ucase$(Mid$(Strng2,1,1))
Strng=Strng+"Prof: "+Strng2
Strng2=Str$(UserRecord.Weapons(Temp2))
Strng=Strng+">"+Strng2+"%"
Call IO.O
Strng="Exp: "+Str$(UserRecord.Experience)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(1),3)+": "+Str$(UserRecord.Stats(1))
Call IO.O
Strng="Fat: "+Str$(UserRecord.Fatigue)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(2),3)+": "+Str$(UserRecord.Stats(2))
Call IO.O
Strng="Vit: "+Str$(UserRecord.Vitality)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(3),3)+": "+Str$(UserRecord.Stats(3))
Call IO.O
Strng="Mag: "+Str$(UserRecord.Magic)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(4),3)+": "+Str$(UserRecord.Stats(4))
Call IO.O
Strng="Psi: "+Str$(UserRecord.Psionic)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(5),3)+": "+Str$(UserRecord.Stats(5))
Call IO.O
Strng="Race: "+Race(UserRecord.Race)
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(6),3)+": "+Str$(UserRecord.Stats(6))
Call IO.O
Strng2=UserRecord.ClassName
Call Decrypt(Strng2)
Mid$(Strng2,1,1)=Ucase$(Mid$(Strng2,1,1))
Strng2=Left$(Strng2,10)
Strng="Class: "+Strng2
Strng=Strng+Space$(20-Len(Strng))
Strng=Strng+Left$(Stat(7),3)+": "+Str$(UserRecord.Stats(7))
Call IO.O
Call More.Prompt
10191
Exit Sub
10192
Resume 10191
End Sub
Sub Update.Login
On Local Error Goto 10202
If Security.Guard=False Then
Exit Sub
Endif
If Lost.Carrier Then
Exit Sub
Endif
Logged.In=True
Strng=UserRecord.DateOn
Call Decrypt(Strng)
If Strng<>Date$ Then
UserRecord.NumCalls=False
Endif
If UserRecord.ClassType<=8 Then
TempX=False
UserRecord.NumCalls=UserRecord.NumCalls+1
If UserRecord.MaxCalls>False Then
If UserRecord.NumCalls>UserRecord.MaxCalls Then
TempX=True
Endif
Else
If UserRecord.NumCalls>Config2(1) Then
TempX=True
Endif
Endif
If TempX Then
Put 3,User.Index,UserRecord
Call Hang.Up(5)
Exit Sub
Endif
Endif
TempX=False
Temp1!=Csng(UserRecord.FromHour*3600!+UserRecord.FromMin*60!)
Temp2!=Csng(UserRecord.ToHour*3600!+UserRecord.ToMin*60!)
If Temp1!>False Or Temp2!>False Then
If Timer<Temp1! Or Timer>Temp2! Then
TempX=True
Endif
Endif
If TempX Then
Put 3,User.Index,UserRecord
Call Hang.Up(6)
Exit Sub
Endif
If Config2(2)=False Then
If UserRecord.ClassType<9 Then
UserRecord.Invisible=False
Endif
Endif
Two.Minutes.Left=False
If UserRecord.ClassType>=9 Then
Time.Left=Config1(3)*60
Else
If UserRecord.Level<=1 Then
Time.Left=Config1(1)*60
Else
Time.Left=Config1(2)*60
Endif
Endif
If Time.Left>Door.Time Then
If Door.Time>False Then
Time.Left=Door.Time
Endif
Endif
Temp!=Time.Override*60!
If Time.Left>Temp! Then
If Temp!>False Then
Time.Left=Temp!
Endif
Endif
10201
Exit Sub
10202
Resume 10201
End Sub
Sub Init.Newuser
On Local Error Goto 10212
UserRecord.NumCalls=False
UserRecord.ClassType=False
Strng=CodeName.Temp
Call Valid(Strng,30)
Call Encrypt(Strng,True)
UserRecord.CodeName=Strng
Strng=PassWord.Temp
Call Valid(Strng,20)
Call Encrypt(Strng,False)
UserRecord.PassWord=Strng
Strng=Deleted$
Call Valid(Strng,20)
Call Encrypt(Strng,True)
UserRecord.ClassName=Strng
Strng=Date$
Call Valid(Strng,10)
Call Encrypt(Strng,True)
UserRecord.DateOn=Strng
UserRecord.MaxCalls=False
UserRecord.FromHour=False
UserRecord.FromMin=False
UserRecord.ToHour=False
UserRecord.ToMin=False
10211
Exit Sub
10212
Resume 10211
End Sub
Sub Prelogin
On Local Error Goto 10222
Number.Monsters=False
Number.MonstersMax=20
Number.Users=False
Number.UsersMax=20
Room.Treasure.Max=20
Treasure.Max=15
Players.Killed=False
Monsters.Killed=False
Time.On=Time$
Timeon=Timer
Time.Left=600
Two.Minutes.Left=False
Chat.Annoy=Config2(68)
Call Update.Mess(1)
Security.Guard=True
Color.Graphics=False
Extended.ANSI=False
Local.Avatar=False
Graphics.Status=False
Redim Learned.Spells(1 To Spells.Max) As Integer,_
MonsterArray(1 To 20) As MonsterType,_
MonsterIndex(1 To 20) As Integer,_
Room.Inventory(1 To 20) As Integer,_
Room.Inventory.Charges(1 To 20) As Integer,_
Treasure(1 To 15) As Integer,_
Treasure.Charges(1 To 15) As Integer,_
UserArray(1 To 20) As UserType,_
UserIndex(1 To 20) As Integer
10221
Exit Sub
10222
Resume 10221
End Sub
Sub Alt.Login(Var)
On Local Error Goto 10232
CodeName.Temp=Left$(Bypass.CodeName,30)
Call Valid(CodeName.Temp,30)
If CodeName.Temp=Nul Then
Var=False
Exit Sub
Endif
Strng=Rtrim$(CodeName.Temp)
Call Valid.Name(Strng)
If TempA=False Then
Var=False
Exit Sub
Endif
Logged.User=False
Strng=Rtrim$(CodeName.Temp)
For User.Index=1 To Lof(3)/Len(UserRecord)
Get 3,User.Index,UserRecord
Out2=UserRecord.CodeName
Call Decrypt(Out2)
Out2=Rtrim$(Out2)
If Strng=Out2 Then
Logged.User=True
Exit For
Endif
Next
If Logged.User=False Then
Var=False
Exit Sub
Endif
If Node>False Then
Call Search.Mess(User.Index)
If Temp Then
Var=False
Exit Sub
Endif
Endif
Strng=UserRecord.PassWord
Call Decrypt(Strng)
If Strng=Nul Then
Var=False
Exit Sub
Endif
Var=True
Strng=Rtrim$(Strng)
PassWord.Temp=Strng
10231
Exit Sub
10232
Resume 10231
End Sub
Sub Get.ANSI
On Local Error Goto 10242
Do
Strng="Use ANSI color(y/n/h)?"
No.Input.Out="H"
Call IO.I
Select Case Ucase$(Out2)
Case "H"
Call Logon.Help(1)
Case "Y"
Color.Graphics=True
Exit Do
Case "N"
If Color.Graphics Then
Graphics.Off=True
Strng=Chr$(27)+"[0;1m"
Call Scrn(Strng)
Call Put.Modem(Strng)
Endif
Color.Graphics=False
Extended.ANSI=False
Exit Do
End Select
Loop
10241
Exit Sub
10242
Resume 10241
End Sub
Sub Get.Avatar
On Local Error Goto 10252
Do
Strng="Use Avatar codes(y/n/h)?"
No.Input.Out="H"
Call IO.I
Select Case Ucase$(Out2)
Case "H"
Call Logon.Help(7)
Case "Y"
Extended.ANSI=True
Exit Do
Case "N"
If Extended.ANSI Then
Graphics.Off=True
Strng=Chr$(27)+"[0;1m"
Call Scrn(Strng)
Call Put.Modem(Strng)
Endif
Extended.ANSI=False
Exit Do
End Select
Loop
10251
Exit Sub
10252
Resume 10251
End Sub
Sub Check.ANSI
On Local Error Goto 10262
If Local.Mode Then
Exit Sub
Endif
Color.Graphics=False
Call Put.Modem(Chr$(27)+"[6n")
Buffer=Nul
Timer.Temp!=Timer+2
Do While Timer.Temp!>Timer
Call Get.Modem
Loop
Out$=Chr$(27)+"["
If Instr(Buffer,Out$) Then
Color.Graphics=True
Endif
Buffer=Nul
If Color.Graphics=False Then
For Temp=1 To 4
Call Back.Space
Next
Endif
10261
Exit Sub
10262
Resume 10261
End Sub
Sub Check.Avatar
On Local Error Goto 10272
If Local.Mode Then
Exit Sub
Endif
Extended.ANSI=False
Call Put.Modem(Chr$(27)+"[23;1H")
Call Put.Modem(Chr$(22)+Chr$(8)+Chr$(24)+Chr$(1))
Call Put.Modem(Chr$(27)+"[6n")
Buffer=Nul
Timer.Temp!=Timer+2
Do While Timer.Temp!>Timer
Call Get.Modem
Loop
Out$=Chr$(27)+"[24;1R"
If Instr(Buffer,Out$) Then
Extended.ANSI=True
Endif
Buffer=Nul
If Extended.ANSI=False Then
For Temp=1 To 4
Call Back.Space
Next
Endif
10271
Exit Sub
10272
Resume 10271
End Sub
Sub Get.Graphics
On Local Error Goto 10282
If Local.Mode Then
Strng="Graphics status line is for remote users."
Call IO.O
Exit Sub
Endif
Call Check.ANSI
If Color.Graphics Then
Strng="Remote ANSI detected."
Call IO.O
Call Check.Avatar
If Extended.ANSI Then
Strng="Remote Avatar detected."
Call IO.O
Endif
Endif
If Color.Graphics=False Then
Strng="Remote ANSI not detected."
Call IO.O
Exit Sub
Endif
Strng="Turn on status line(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Graphics.Status=True
Call Status.Line(False)
Exit Sub
Endif
If Graphics.Status Then
If Extended.ANSI Then
Call Avatar(2,25,1)
Else
Call ANSI(2,25,1)
Endif
Temp$=TempD$+Space$(79)
Call Display.Status.Line2
Endif
Graphics.Status=False
10281
Exit Sub
10282
Resume 10281
End Sub
Sub Login.User
On Local Error Goto 10292
Call Bank.Interest
If UserRecord.Race<=False Then
UserRecord.Race=1
Endif
Put 3,User.Index,UserRecord
If Config2(38) Then
Strng=Nul
Call IO.O
Strng="Check for new mail(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call New.Mail
Endif
Endif
Strng=Nul
Call IO.O
If Config2(14) Then
Strng=Config3(6)
If Strng<>Nul Then
No.Echo=True
Line.Length=1
Call IO.I
No.Echo=False
Endif
Endif
If Config2(70) Then
FileName=Day.Log.FileName
Call Clean.UpdateFile
Endif
If Config2(71) Then
FileName=Day.File.FileName
Call Clean.UpdateFile
Endif
Call Display.LogFile
Call Update.Mess(4)
Strng="Logged on"
If Local.Mode=False Then
Strng=Strng+": baud"+Str$(Modem.Baud*100)
Endif
Call Update.DayFile(Strng,True)
Room=UserRecord.Room
If UserRecord.Level=False Then
Strng="You are level zero. You can use the train command once free."
Call IO.O
Endif
Call Clear.Mess
Out2="just logged on"
If Node Then
Out2=Out2+" (Node "+Chr$(Node)+")"
Endif
Call Send.Mess(4,False,False,Out2)
Weapon1=False
Weapon2=False
Weapon3=False
Weapon4=False
Weapon5=False
Weapon6=False
Weapon7=False
Weapon8=False
Weapon9=False
Weapon10=False
If Lost.Carrier Then
Security.Guard=False
Logged.In=False
Endif
10291
Exit Sub
10292
Resume 10291
End Sub
Sub Display.Prenotice
On Local Error Goto 10302
Strng=Nul
If Config2(3) Then
Strng="DNDBBS V"+Version$+" online at "+FNclock$+"."
If Bypass.Login Then
Strng=Strng+" (bypass login)"
Endif
Endif
If Local.Mode Then
Color.Graphics=True
If Config2(84) And Config2(85) Then
Local.Avatar=True
Endif
Call IO.O
Exit Sub
Endif
Carriage.Return=True
Call IO.O
Call Pause.Second
Call IO.O
Call Pause.Second
If Config2(73) Then
Call Check.ANSI
Endif
If Color.Graphics Then
If Config2(85) Then
Call Check.Avatar
Endif
Endif
If Color.Graphics=False Then
If Config2(72) Then
Strng=Nul
Call IO.O
Call Get.ANSI
Endif
If Color.Graphics Then
If Config2(84) Then
Strng=Nul
Call IO.O
Call Get.Avatar
Endif
Endif
Endif
10301
Exit Sub
10302
Resume 10301
End Sub
Sub Display.Information
On Local Error Goto 10312
If Not Normal.User Then
Var=Val(Parsed.Command1)
If Var>False And Var<=Lof(5)/Len(RoomRecord) Then
Swap Var, Room
Get 5,Room,RoomRecord
Call Show.Room
Swap Var, Room
Get 5,Room,RoomRecord
Exit Sub
Endif
Endif
Strng=UserRecord.CodeName
Call Decrypt(Strng)
Strng=Left$(Strng,Len(Parsed.Command1))
If Strng=Parsed.Command1 Then
Call Display.Stats
Exit Sub
Endif
Call Search.Mess(False)
If Temp=Room Then
Out2=MessWorkRecord1.UserName
Out2=Rtrim$(Out2)
Out2=Lcase$(Out2)
Graphics.Off=True
Mid$(Out2,1,1)=Ucase$(Mid$(Out2,1,1))
Strng=Out2+" is level"+Str$(MessWorkRecord1.Level)+"."
Call IO.O
If Last.Command.Number=Identify.Command Then
If MessWorkRecord1.ClassType=8 Then
Out3="She "
Else
Out3="He "
Endif
Strng=Out3+"is a "+Rtrim$(Race(MessWorkRecord1.Race))+" "+_
Rtrim$(Class.Name(MessWorkRecord1.ClassType))+"."
Call IO.O
Strng="Vitals: "+Mid$(Str$(MessWorkRecord1.Fatigue),2)+"/"+_
Mid$(Str$(MessWorkRecord1.FatigueMax),2)+_
" Fat"+Str$(MessWorkRecord1.Vitality)+"/"+_
Mid$(Str$(MessWorkRecord1.VitalityMax),2)+_
" Vit"+Str$(MessWorkRecord1.Magic)+"/"+_
Mid$(Str$(MessWorkRecord1.MagicMax),2)+_
" Mag"+Str$(MessWorkRecord1.Psionic)+"/"+_
Mid$(Str$(MessWorkRecord1.PsionicMax),2)+" Psi"
Call IO.O
Strng="Stats: "
For Temp2=1 To 7
Strng=Strng+Left$(Stat(Temp2),3)+_
Str$(MessWorkRecord1.Stats(Temp2))+" "
Next
Call IO.O
Strng="Weapons: "
For Temp2=1 To 4
Strng=Strng+Rtrim$(Weapon.Type.Name(Temp2))+">"+_
Str$(MessWorkRecord1.Weapons(Temp2))+"% "
Next
Call IO.O
Strng=Out3+"is aligned "+_
Rtrim$(Alignment.Name1(MessWorkRecord1.Align1+2))+" "+_
Rtrim$(Alignment.Name2(MessWorkRecord1.Align2+2))+"."
Call IO.O
Strng=Out3+"has"+Str$(MessWorkRecord1.Gold)+" gold and"+_
Str$(MessWorkRecord1.Experience)+" experience."
Call IO.O
Strng=Out3+"is carrying the following items:"
Call IO.O
Temp9=False
Do
For Temp1=1 To 20
Temp2=MessWorkRecord1.Treasure(Temp1)
If Temp2 Then
Carriage.Return=True
Call IO.O
Get 8,Temp2,TreasureRecord
Out3=TreasureRecord.TreasureName
Out3=Rtrim$(Out3)
If TreasureRecord.Invisible Then
Out3=Out3+" [inv]"
Endif
Strng=Out3+", "
Temp9=Temp9+1
If Temp9=1 Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Endif
Next
Var=MessWorkRecord1.NextRecord
If Var>False Then
Get 1,Var,MessWorkRecord1
Else
Exit Do
Endif
Loop
If Temp9=False Then
Strng="Nothing at all."
Else
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp9>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
Endif
Graphics.Off=False
Exit Sub
Endif
Call Examine.Treasure
If Temp7 Then
If Temp4 Then
Prefix1="It's "
Else
Prefix1="You are carrying "
Endif
Graphics.Off=True
If TreasureRecord.Scroll Then
If TreasureRecord.Spell Then
Temp2=TreasureRecord.Spell
If Temp2>False And Temp2<=Spells.Max Then
SpellRecord=SpellArray(Temp2)
Out2=SpellRecord.Chant
Out2=Rtrim$(Out2)
Out2=Lcase$(Out2)
Strng="It reads: '"+Out2+"'."
Call IO.O
Strng="It disintegrated!"
Call IO.O
Select Case Temp4
Case 0
Call Discard(Temp5,True)
Case -1
Call Discard.Inventory(Temp5)
Case 1
Call Discard.Treasure(Temp5)
End Select
Endif
Endif
Exit Sub
Endif
Strng=Prefix1+Out3
If TreasureRecord.Keyed Then
Strng=Strng+" (#"+Right$(Str$(TreasureRecord.Keyed+100000!),4)+")"
Endif
If TreasureRecord.Plus Then
Strng=Strng+"(+"+Mid$(Str$(Abs(TreasureRecord.Plus)),2)+")"
Endif
If TreasureRecord.Spell Then
SpellRecord=SpellArray(TreasureRecord.Spell)
Strng=Strng+"(+"+Mid$(Str$(SpellRecord.Level),2)+")"
Endif
If TreasureRecord.Invisible Then
Strng=Strng+" [inv]"
Else
If Temp4=1 Then
If RoomRecord.Flags(Temp5)=Hidden.Object Then
Strng=Strng+" [inv]"
Endif
Endif
Endif
Call IO.O
If TreasureRecord.Proficiency Then
Strng=Weapon.Type.Name(TreasureRecord.Proficiency)
Strng=Rtrim$(Strng)
Strng="This is a "+Strng+" weapon."
Call IO.O
Endif
If Last.Command.Number=Identify.Command Then
Strng="It is worth"+Str$(TreasureRecord.Gold)+" gold peices."
Call IO.O
Strng="It weighs"+Str$(TreasureRecord.Weight)+" pounds."
Call IO.O
If TreasureRecord.RingType Then
Select Case TreasureRecord.RingType
Case 1
Strng="protection from poison."
Case 2
Strng="protection from level drain."
Case 3
Strng="protection from spells."
End Select
Strng="It's ring spell is "+Strng
Call IO.O
Endif
If TreasureRecord.Spell Then
SpellRecord=SpellArray(TreasureRecord.Spell)
Strng="It's magical spell is "+Rtrim$(SpellRecord.SpellName)+"."
Call IO.O
Endif
If TreasureRecord.Loadable Or TreasureRecord.Launchable Then
If Temp6<=False Then
Strng="It's not loaded."
Else
Strng="It's loaded with"+Str$(Temp6)+" charges."
Endif
Call IO.O
Else
If TreasureRecord.RingType Or TreasureRecord.Spell Or_
TreasureRecord.Plus Then
If Temp6<=False Then
Strng="It's empty of charges."
Else
Strng="It has"+Str$(Temp6)+" charges."
Endif
Call IO.O
Endif
Endif
If TreasureRecord.Ammunition Or TreasureRecord.LaunchAmmo Then
Strng="It's ammunition."
Call IO.O
Endif
If TreasureRecord.Potion Then
Strng="It's a potion."
Call IO.O
Endif
If TreasureRecord.Edible Then
Strng="It is edible."
Call IO.O
Endif
Endif
If TreasureRecord.Recep Then
If TreasureRecord.Locked>False Then
Strng="It is locked."
Call IO.O
Exit Sub
Endif
If TreasureRecord.Closed>False Then
Strng="It is closed."
Call IO.O
Exit Sub
Endif
Strng="It contains the following treasure:"
Call IO.O
Temp9=False
Call Open.Recep.File
Strng=Nul
For Temp5=1 To Lof(13)/Len(RecepRec)
Get 13,Temp5,RecepRec
Temp2=RecepRec.Inv
Temp1=RecepRec.Invis
Temp=True
If Temp2 Then
If Temp1=True Then
If Normal.User Then
Temp=False
Endif
Endif
If Temp=True Then
Carriage.Return=True
Call IO.O
Get 8,Abs(Temp2),TreasureRecord
Out3=TreasureRecord.TreasureName
Out3=Rtrim$(Out3)
If Temp1=True Then
Out3=Out3+" [inv]"
Endif
Strng=Out3+", "
Temp9=Temp9+1
If Temp9=1 Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Endif
Endif
Next
If Temp9=False Then
Strng="Nothing at all."
Else
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp9>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
Endif
Graphics.Off=False
Exit Sub
Endif
Call Num
Temp4=0
Prefix1="It's "
Call Check.Room.Objects
If Temp7=False Then
Call Num
Temp4=-1
Prefix1="You are carrying "
Call Check.Inventory.Objects
Endif
If Temp7 Then
Graphics.Off=True
Strng=Prefix1+Out3
If ObjectRecord.DoorLock>1 Then
Strng=Strng+" [locked]"
Endif
If ObjectRecord.DoorLock=1 Then
If ObjectRecord.Closed Then
Strng=Strng+" [closed]"
Endif
Endif
If ObjectRecord.Invisible Then
Strng=Strng+" [inv]"
Endif
Strng=Strng+"."
Call IO.O
If Last.Command.Number=Identify.Command Then
If ObjectRecord.Keyed Then
Strng="It requires key number "+_
Right$(Str$(ObjectRecord.Keyed+100000!),4)+"."
Call IO.O
Endif
Endif
Strng=ObjectRecord.LongDesc
Strng=Rtrim$(Strng)
If Strng<>Nul Then
Call IO.O
Endif
Graphics.Off=False
Exit Sub
Endif
Call Num
Call Check.Monster
If Monster.Temp Then
Graphics.Off=True
Call The.Or.An
Temp4=MonsterArray(Monster.Temp).Level
Strng="It's "+Prefix1+Out3
Strng=Strng+" (level"+Str$((Temp4-1)*2+1)+" to"+Str$(Temp4*2)+")"
Call IO.O
If Last.Command.Number=Identify.Command Then
Strng="It has"+Str$(MonsterArray(Monster.Temp).Hits)+" hits and"+_
Str$(MonsterArray(Monster.Temp).Experience)+" experience."
Call IO.O
Strng="It carries the following treasure:"
Call IO.O
Temp9=False
For Temp4=1 To 5
Temp2=MonsterArray(Monster.Temp).Treasure(Temp4)
If Temp2>False And Temp2<=Lof(8)/Len(TreasureRecord) Then
Carriage.Return=True
Call IO.O
Get 8,Temp2,TreasureRecord
Out3=TreasureRecord.TreasureName
Strng=Rtrim$(Out3)+", "
Temp9=Temp9+1
If Temp9=1 Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Endif
Next
If Temp9=False Then
Strng="Nothing at all."
Else
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp9>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
Temp4=MonsterArray(Monster.Temp).Spell
If Temp4>False And Temp4<=Spells.Max Then
SpellRecord=SpellArray(Temp4)
Strng="It can cast "+Rtrim$(SpellRecord.SpellName)+" spells!"
Call IO.O
Endif
If MonsterArray(Monster.Temp).Poison Then
Strng="It can poison!"
Call IO.O
Endif
If MonsterArray(Monster.Temp).LevelDrain Then
Strng="It can drain levels!"
Call IO.O
Endif
If MonsterArray(Monster.Temp).Psionic Then
Strng="It can cast psi spells!"
Call IO.O
Endif
Endif
Graphics.Off=False
Exit Sub
Endif
Call Num
Call Check.User
If User.Temp Then
Out2=UserArray(User.Temp).CodeName
Call Decrypt(Out2)
Out2=Rtrim$(Out2)
Out2=Lcase$(Out2)
Call He.She
Graphics.Off=True
Strng=Prefix1+"'s "+Out2+" (level"+Str$(UserArray(User.Temp).Level)+")"
Call IO.O
If Last.Command.Number=Identify.Command Then
Strng=Prefix1+" has"+Str$(UserArray(User.Temp).Bank)+" hits and"+_
Str$(UserArray(User.Temp).Experience)+" experience."
Call IO.O
If UserArray(User.Temp).Align1+UserArray(User.Temp).Align2<False Then
Strng=Prefix1+" looks friendly."
Else
Strng=Prefix1+" looks hostile."
Endif
Call IO.O
Strng=Prefix1+" carries the following treasure:"
Call IO.O
Temp9=False
For Temp4=1 To 15
Temp2=UserArray(User.Temp).Inv(Temp4)
If Temp2 Then
Carriage.Return=True
Call IO.O
Get 8,Temp2,TreasureRecord
Out4=TreasureRecord.TreasureName
Strng=Rtrim$(Out4)+", "
Temp9=Temp9+1
If Temp9=1 Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Endif
Next
If Temp9=False Then
Strng="Nothing at all."
Else
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp9>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
Endif
Graphics.Off=False
Exit Sub
Endif
Strng="I can't examine that!"
Call IO.O
10311
Exit Sub
10312
Resume 10311
End Sub
Sub Check.Next.Room
On Local Error Goto 10322
Do While Security.Guard
If Room>False And Room<=Lof(5)/Len(RoomRecord) Then
Get 5,Room,RoomRecord
Exit Do
Endif
If Room>Lof(5)/Len(RoomRecord) Then
If Not Normal.User Then
Call Add.Room
If TempC Then
Exit Do
Endif
Endif
Endif
If Lof(5)/Len(RoomRecord)>Config2(15) Then
Room=Config2(15)
Graphics.Off=False
Strng="Nondescriptive room number"+Str$(Room)+"!"
Call IO.O
Else
Room=1
Graphics.Off=False
If Config2(16) Then
Node=True
Call Hang.Up(10)
Exit Sub
Endif
Exit Sub
Endif
Loop
10321
Exit Sub
10322
Resume 10321
End Sub
Sub Display.Room
On Local Error Goto 10332
Call Check.Next.Room
If Security.Guard=False Then
Exit Sub
Endif
Room.Rust.Rate=False
If RoomRecord.RustRate>False Then
Room.Rust.Rate=RoomRecord.RustRate
Endif
Room.Steal.Rate=False
If RoomRecord.StealRate>False Then
Room.Steal.Rate=RoomRecord.StealRate
Endif
Room.Monster.Rate=Config2(11)
If RoomRecord.EncounterRate Then
Room.Monster.Rate=RoomRecord.EncounterRate
Endif
Room.Health.Rate=Config2(10)
If RoomRecord.HealthRate Then
Room.Health.Rate=RoomRecord.HealthRate
Endif
Call Show.Room
Call Display.Offline.Users
10331
Exit Sub
10332
Resume 10331
End Sub
Sub Show.Room
On Local Error Goto 10334
Graphics.Off=True
If UserRecord.Brief Or Rtrim$(RoomRecord.LongDesc(1))=Nul Then
If Normal.User=False Or Config2(17) Then
Strng="(room:"+Str$(Room)+", monclass:"
Strng=Strng+Str$(RoomRecord.MonsterClass)+")."
Call IO.O
Endif
Strng=RoomRecord.ShortDesc
Strng=Rtrim$(Strng)
If Instr(Strng,Chr$(0)) Then
Strng=Left$(Strng,Instr(Strng,Chr$(0))-1)
Endif
Call IO.O
Else
For Temp2=1 To 4
Strng=RoomRecord.LongDesc(Temp2)
Strng=Rtrim$(Strng)
If Instr(Strng,Chr$(0)) Then
Strng=Left$(Strng,Instr(Strng,Chr$(0))-1)
Endif
If Strng=Nul Then
Exit For
Endif
Call IO.O
Next
Endif
Temp=False
If Config2(18) Then
If UserRecord.Brief Then
Strng=Nul
Else
Strng="The exits are "
Endif
For Temp5=1 To 11
If RoomRecord.Direct(Temp5) Then
Strng=Strng+Rtrim$(Direction(Temp5))+", "
Temp=True
Endif
Next
If Temp Then
Strng=Left$(Strng,Len(Strng)-2)+"."
If UserRecord.Brief Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Call IO.O
Endif
Endif
Temp1=False
If Node>False Then
Call Search.Mess(True)
Strng=Nul
For Temp5=1 To 36
If Temp5<>(Noden+1) Then
If Node.Work.Array1(Temp5)<>Nul Then
TempX=True
Get 1,Temp5,MessWorkRecord1
If MessWorkRecord1.Invisible Then
If Normal.User Then
TempX=False
Endif
Endif
If TempX Then
Carriage.Return=True
Call IO.O
Temp1=Temp1+1
Strng=Node.Work.Array1(Temp5)
If MessWorkRecord1.Invisible Then
Strng=Strng+" [inv]"
Endif
Strng=Strng+", "
Endif
Endif
Endif
Next
If Temp1 Then
Strng=Left$(Strng,Len(Strng)-2)
Endif
If Temp1>1 Then
Strng="and "+Strng+" are here!"
Call IO.O
Else
If Temp1=1 Then
Strng=Strng+" is here!"
Call IO.O
Endif
Endif
Endif
If UserRecord.Brief=False Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Strng=Nul
Temp8=False
Temp1=False
If Config2(20) Then
For Temp5=1 To 10
Temp9=False
Temp2=RoomRecord.Object(Temp5)
If Temp2>False And Temp2<=Lof(6)/Len(ObjectRecord) Then
Get 6,Temp2,ObjectRecord
If ObjectRecord.Invisible Then
If Normal.User Then
Temp9=True
Endif
Endif
If ObjectRecord.Hidden Then
If Normal.User Then
Temp9=True
Endif
Endif
If Temp9=False Then
Carriage.Return=True
Call IO.O
Temp1=Temp1+1
If Temp1=1 Then
If UserRecord.Brief Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Endif
Strng=ObjectRecord.ObjectName
Strng=Rtrim$(Strng)
If ObjectRecord.DoorLock>1 Then
Strng=Strng+" [locked]"
Else
If ObjectRecord.DoorLock Then
If ObjectRecord.Closed Then
Strng=Strng+" [closed]"
Endif
Endif
Endif
If ObjectRecord.Hidden Then
Strng=Strng+" [hidden]"
Else
If ObjectRecord.Invisible Then
Strng=Strng+" [inv]"
Endif
Endif
Strng=Strng+", "
Temp8=True
Endif
Endif
Next
For Temp5=1 To 10
Temp9=False
If RoomRecord.Flags(Temp5)>False Then
If Normal.User Then
Temp9=True
Endif
Endif
If Temp9=False Then
Temp2=RoomRecord.Treasure(Temp5)
If Temp2>False And Temp2<=Lof(8)/Len(TreasureRecord) Then
Get 8,Temp2,TreasureRecord
If TreasureRecord.Invisible Then
If Normal.User Then
Temp9=True
Endif
Endif
If Temp9=False Then
Carriage.Return=True
Call IO.O
Temp1=Temp1+1
If Temp1=1 Then
If UserRecord.Brief Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Endif
Strng=TreasureRecord.TreasureName
Strng=Rtrim$(Strng)
If TreasureRecord.Locked>False Then
Strng=Strng+" [locked]"
Else
If TreasureRecord.Locked<False Then
If TreasureRecord.Closed>False Then
Strng=Strng+" [closed]"
Endif
Endif
Endif
If TreasureRecord.Invisible Then
Strng=Strng+" [inv]"
Else
If RoomRecord.Flags(Temp5)=Hidden.Object Then
Strng=Strng+" [inv]"
Endif
Endif
If RoomRecord.Flags(Temp5)=Magic.Trap Then
Strng=Strng+" [trap]"
Endif
Strng=Strng+", "
Temp8=True
Endif
Endif
Endif
Next
Endif
For Temp5=1 To Room.Treasure.Max
Temp9=False
Temp2=Room.Inventory(Temp5)
If Temp2>False And Temp2<=Lof(8)/Len(TreasureRecord) Then
Get 8,Temp2,TreasureRecord
If TreasureRecord.Invisible Then
If Normal.User Then
Temp9=True
Endif
Endif
If Temp9=False Then
Carriage.Return=True
Call IO.O
Temp1=Temp1+1
If Temp1=1 Then
If UserRecord.Brief Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Endif
Strng=TreasureRecord.TreasureName
Strng=Rtrim$(Strng)
If TreasureRecord.Locked>False Then
Strng=Strng+" [locked]"
Else
If TreasureRecord.Locked<False Then
If TreasureRecord.Closed>False Then
Strng=Strng+" [closed]"
Endif
Endif
Endif
If TreasureRecord.Invisible Then
Strng=Strng+" [inv]"
Endif
Strng=Strng+", "
Temp8=True
Endif
Endif
Next
If Config2(19) Then
For Monster.Temp=1 To Number.Monsters
Temp1=Temp1+1
Carriage.Return=True
Call IO.O
If Temp1=1 And UserRecord.Brief Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Out3=MonsterArray(Monster.Temp).MonsterName
Out3=Rtrim$(Out3)
Call The.Or.An
Strng=Strng+Prefix1+Out3+", "
Temp8=True
Next
For User.Temp=1 To Number.Users
Temp1=Temp1+1
Carriage.Return=True
Call IO.O
If Temp1=1 And UserRecord.Brief Then
Strng="You see "
Carriage.Return=True
Call IO.O
Endif
Out3=UserArray(User.Temp).CodeName
Call Decrypt(Out3)
Out3=Rtrim$(Out3)
Out3=Lcase$(Out3)
Strng=Strng+Out3+", "
Temp8=True
Next
Endif
If Temp8=False Then
If UserRecord.Brief=False Then
Strng="nothing special."
Else
Strng="You see nothing."
Endif
Endif
If Temp8 And Strng<>Nul Then
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp1>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
10333
Exit Sub
10334
Resume 10333
End Sub
Sub Display.Offline.Users
On Local Error Goto 10336
If Config2(55) Then
For Temp1=1 To 11
Temp2=RoomRecord.Direct(Temp1)
If Temp2>False And Temp2<>Room Then
For Temp3=1 To Users.Max
If Temp3<>User.Index Then
If Temp2=User.Array1(Temp3) Then
If User.Array3(Temp3)<9 Then
If User.Array2(Temp3)>False Then
Room.Temp=Room
Room=Temp2
Call In.Room(13)
Room=Room.Temp
If TempA=False Then
Call Search.Mess(Temp3)
If Temp=False Then
Strng="There is a player in a nearby room!"
Call IO.O
Exit Sub
Endif
Endif
Endif
Endif
Endif
Endif
Next
Endif
Next
Endif
10335
Exit Sub
10336
Resume 10335
End Sub
Sub Display.Stats
On Local Error Goto 10342
Graphics.Off=True
Strng=UserRecord.CodeName
Call Decrypt(Strng)
Strng=Rtrim$(Strng)
Strng=Lcase$(Strng)
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Strng="Information: "+Strng
Call IO.O
Call Show.Align
Call Show.Health
Call Display.Info
Call Display.Inventory
10341
Exit Sub
10342
Resume 10341
End Sub
Sub Display.Inventory
On Local Error Goto 10352
Graphics.Off=True
Strng="You are carrying"+Str$(Number.Inventory)+" items"+_
" weighing"+Str$(Weight)+" pounds:"
Call IO.O
Temp9=False
For Temp5=1 To Number.Inventory
Temp2=Treasure(Temp5)
If Temp2 Then
Carriage.Return=True
Call IO.O
Get 8,Temp2,TreasureRecord
Out3=TreasureRecord.TreasureName
Out3=Rtrim$(Out3)
If TreasureRecord.Invisible Then
Out3=Out3+" [inv]"
Endif
Strng=Out3+", "
Temp9=Temp9+1
If Temp9=1 Then
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Endif
Endif
Next
If Normal.User=False Then
For Temp5=1 To 5
Temp2=UserRecord.Object(Temp5)
If Temp2 Then
Carriage.Return=True
Call IO.O
Get 6,Temp2,ObjectRecord
Out3=ObjectRecord.ObjectName
Out3=Rtrim$(Out3)
Strng=Out3+", "
Temp9=Temp9+1
Endif
Next
Endif
If Temp9=False Then
Strng="Nothing at all."
Else
Strng=Left$(Strng,Len(Strng)-2)+"."
If Temp9>1 Then
Strng="and "+Strng
Endif
Endif
Call IO.O
Call Display.Experience
10351
Exit Sub
10352
Resume 10351
End Sub
Sub Display.Experience
On Local Error Goto 10362
Graphics.Off=True
Strng="You have"+Str$(UserRecord.Gold)+" gold."
Call IO.O
Strng="You need"+Str$(UserRecord.Experience)
Strng=Strng+" experience points to reach the next level."
Call IO.O
Call Gold(Temp#)
Strng="You need"+Str$(Temp#)+" gold to train for the next level."
Call IO.O
10361
Exit Sub
10362
Resume 10361
End Sub
Sub Display.Info
On Local Error Goto 10372
Graphics.Off=True
If Sysop Then
Strng="You are a Sysop!"
Call IO.O
Endif
If Dungeon.Master Then
Strng="You are a Dungeon Master!"
Call IO.O
Endif
If Dungeon.Master.Assistant Then
Strng="You are an Assistant Dungeon Master!"
Call IO.O
Endif
If Town.Mayor Then
Strng="You are the Town Mayor!"
Call IO.O
Endif
If Governor Then
Strng="You are the Governor!"
Call IO.O
Endif
If Guild.Master Then
Strng="You are the Guild Master!"
Call IO.O
Endif
If UserRecord.Invisible Or Invisible Then
Strng="You are invisible!"
Call IO.O
Endif
If UserRecord.Poison Then
Strng="You are poisoned!"
Call IO.O
Endif
If Weapon7=False And Weapon1=False Then
Strng="You are wearing nothing."
Call IO.O
Endif
If Weapon2=False And Weapon3=False Then
Strng="You are holding nothing."
Call IO.O
Endif
If Weapon7 Then
Get 8,Abs(Treasure(Weapon7)),TreasureRecord
Strng="You are wearing "+TreasureRecord.TreasureName
Call IO.O
Endif
If Weapon1 Then
Get 8,Abs(Treasure(Weapon4)),TreasureRecord
Strng="You are wearing "+TreasureRecord.TreasureName
Call IO.O
Endif
Strng=Nul
If Weapon2 Or Weapon3 Then
Strng="You are holding "
If Weapon2 Then
Get 8,Abs(Treasure(Weapon6)),TreasureRecord
Strng=Strng+Rtrim$(TreasureRecord.TreasureName)
Endif
Endif
If Weapon3 Then
Get 8,Abs(Treasure(Weapon5)),TreasureRecord
If Weapon2 Then
Strng=Strng+" and "+Rtrim$(TreasureRecord.TreasureName)+"."
Call IO.O
Else
Strng="You are holding "+Rtrim$(TreasureRecord.TreasureName)+"."
Call IO.O
Endif
Else
If Weapon2 Then
Strng=Strng+"."
Call IO.O
Endif
Endif
10371
Exit Sub
10372
Resume 10371
End Sub
Sub Display.Health
On Local Error Goto 10382
Graphics.Off=True
Call Show.Align
Call Show.Health
10381
Exit Sub
10382
Resume 10381
End Sub
Sub Show.Health
On Local Error Goto 10392
Graphics.Off=True
Strng="Vitals: "+Mid$(Str$(UserRecord.Fatigue),2)+"/"+_
Mid$(Str$(UserRecord.FatigueMax),2)
If Weapon3 Or Weapon1 Then
Strng=Strng+"(+"+Mid$(Str$(Weapon3+Weapon1),2)+")"
Endif
Strng=Strng+" Fat "+Str$(UserRecord.Vitality)+"/"+_
Mid$(Str$(UserRecord.VitalityMax),2)+_
" Vit "+Str$(UserRecord.Magic)+"/"+_
Mid$(Str$(UserRecord.MagicMax),2)+_
" Mag "+Str$(UserRecord.Psionic)+"/"+_
Mid$(Str$(UserRecord.PsionicMax),2)+" Psi"
Call IO.O
Strng="Stats: "
For Temp5=1 To 7
Strng=Strng+Left$(Stat(Temp5),3)+Str$(UserRecord.Stats(Temp5))
If Temp5=1 Then
If Weapon2 Then
Strng=Strng+"(+"+Mid$(Str$(Weapon2),2)+")"
Endif
Endif
Strng=Strng+" "
Next
Call IO.O
Strng="Weapons: "
For Temp2=1 To 4
Strng=Strng+Rtrim$(Weapon.Type.Name(Temp2))+">"+_
Str$(UserRecord.Weapons(Temp2))+"% "
Next
Call IO.O
10391
Exit Sub
10392
Resume 10391
End Sub
Sub Show.Align
On Local Error Goto 10402
Graphics.Off=True
If UserRecord.Level<=False Then
Strng="You are dead!"
Call IO.O
Exit Sub
Endif
Strng="You are a level"
If UserRecord.Level>10 Then
Strng=Strng+Str$(UserRecord.Level)
Else
Strng=Strng+" "+Rtrim$(Numeral(UserRecord.Level))
Endif
If UserRecord.Race<=False Then
UserRecord.Race=1
Endif
Strng=Strng+" "+Rtrim$(Race(UserRecord.Race))+" "
Out2=UserRecord.ClassName
Call Decrypt(Out2)
Strng=Strng+Out2
Call IO.O
Strng="You are aligned "+_
Rtrim$(Alignment.Name1(UserRecord.Align1+2))+" "+_
Rtrim$(Alignment.Name2(UserRecord.Align2+2))+"."
Call IO.O
10401
Exit Sub
10402
Resume 10401
End Sub
Sub Display.Memory
On Local Error Goto 10412
Graphics.Off=True
Strng="Free Dynamic Data and Array Space(Heap in Bytes):"+Str$(Fre(-1))+"."
Call IO.O
Strng="Free Data Segment and String Space(Bytes):"+Str$(Fre(TempX$))+"."
Call IO.O
Strng="Free Stack Space(Bytes):"+Str$(Fre(-2))+"."
Call IO.O
Strng="Total Available Memory(K):"
Var1=Int((Fre(TempX$)+Fre(-1)+Fre(-2))/1024)
Strng=Strng+Str$(Var1)+"."
Call IO.O
10411
Exit Sub
10412
Resume 10411
End Sub
Sub Identify
On Local Error Goto 10422
If UserRecord.Level<Config2(59) Then
Strng="You are not high enough level!"
Call IO.O
Exit Sub
Endif
Call Display.Information
10421
Exit Sub
10422
Resume 10421
End Sub
Sub Status.Line(Var)
On Local Error Goto 10432
Static Statusline.Mode
If Var=-1 Then
If Security.Guard=False Then
Exit Sub
Endif
If Logged.In=False Then
Exit Sub
Endif
If Local.Mode Then
Exit Sub
Endif
Endif
If Var=-2 Then
For Temp5=1 To 10
Key Temp5,Nul
Next
Call Local.ANSI(1,37,15)
Var$=TempD$+Space$(79)
If Config2(47) Then
If Len(Door.Name) Then
Call Local.ANSI(2,24,1)
Temp$=TempD$+Var$
Call Display.Status.Line
Endif
Endif
Call Local.ANSI(2,25,1)
Temp$=TempD$+Var$
Call Display.Status.Line
If Graphics.Status Then
If Local.Mode=False Then
Call Display.Status.Line2
Endif
Endif
Exit Sub
Endif
If Var=-1 Then
Statusline.Mode=Not Statusline.Mode
Endif
If Var>0 Then
Statusline.Mode=False
If Local.Mode Then
If Normal.User=False Then
Statusline.Mode=True
Endif
Endif
If Config2(47) Then
If Len(Door.Name) Then
Call Door.Status.Line
Endif
Endif
Endif
If Var=0 Then
If Graphics.Status Then
If Local.Mode=False Then
Call Make.Status.Line(VarZ)
If VarZ Then
Call Display.Status.Line2
Endif
Endif
Endif
Endif
If Statusline.Mode=False Then
Call Make.Status.Line(VarZ)
If VarZ Then
Call Display.Status.Line
Endif
Else
If Var<>0 Then
Call Sysop.Status.Line
Endif
Endif
10431
Exit Sub
10432
Resume 10431
End Sub
Sub Make.Status.Line(VarY)
On Local Error Goto 10442
VarY=False
Temp$=UserRecord.CodeName
Call Decrypt(Temp$)
Temp$=Lcase$(Temp$)
If Left$(Temp$,9)=Deleted$ Then
Exit Sub
Endif
VarY=True
Mid$(Temp$,1,1)=Ucase$(Mid$(Temp$,1,1))
If UserRecord.ClassType=2 Then
Temp2$="MU"
Else
Temp2$=Left$(Class.Name(UserRecord.ClassType),8)
Endif
If Dungeon.Master.Assistant Then
Temp2$="ADM"
Endif
If Dungeon.Master Then
Temp2$="DM"
Endif
If Sysop Then
Temp2$="SYS"
Endif
Temp$=Temp$+" "+Temp2$
Temp$=Left$(Temp$,39)
Temp$=Temp$+Space$(39-Len(Temp$))
TempX=UserRecord.Fatigue
If TempX<False Then
TempX=False
Endif
Temp$=Temp$+" Fat:"+Mid$(Str$(TempX),2)
TempX=UserRecord.Vitality
If TempX<False Then
TempX=False
Endif
Temp$=Temp$+" Vit:"+Mid$(Str$(TempX),2)
TempX=UserRecord.Magic
If TempX<False Then
TempX=False
Endif
Temp$=Temp$+" Mag:"+Mid$(Str$(TempX),2)
TempX=UserRecord.Psionic
If TempX<False Then
TempX=False
Endif
Temp$=Temp$+" Psi:"+Mid$(Str$(TempX),2)
TempX=UserRecord.Level
If TempX<False Then
TempX=False
Endif
Temp2$=" Lvl:"+Mid$(Str$(TempX),2)
If Len(Temp$)+Len(Temp2$)<=79 Then
Temp$=Temp$+Temp2$
Endif
TempX=Room
If TempX<False Then
TempX=False
Endif
Temp2$=" Rm:"+Mid$(Str$(TempX),2)
If Len(Temp$)+Len(Temp2$)<=79 Then
Temp$=Temp$+Temp2$
Endif
Temp$=Left$(Temp$,79)
Temp$=Temp$+Space$(79-Len(Temp$))
Call Local.ANSI(2,25,1)
Temp$=TempD$+Temp$
10441
Exit Sub
10442
Resume 10441
End Sub
Sub Sysop.Status.Line
On Local Error Goto 10452
For Temp5=1 To 10
Key Temp5,Nul
Next
If Local.Mode And Normal.User=False Then
Key 1,Config3(9)+"EDIT"+Chr$(13)
Key 2,Config3(9)+"STA"+Chr$(13)
Key 3,Config3(9)+"DIS "
Key 4,Config3(9)+"REDU "
Key 5,Config3(9)+"CALL"
Key 6,Config3(9)+"KILL "
Key 7,Config3(9)+"TELE "
Key 8,Config3(9)+"INV"+Chr$(13)
Key 9,Config3(9)+"GET "
Key 10,Config3(9)+"LINK"+Chr$(13)
Endif
Call Cursor(False)
Call Screen.ANSI(4,37,15)
For Temp5=1 To 10
Call Screen.ANSI(2,25,Temp5*8-7)
TempA$="F"+Right$(Str$(Temp5+10),1)
Call Put.Screen(TempA$)
Next
Call Screen.ANSI(1,7,112)
For Temp5=1 To 10
Select Case Temp5
Case 1
TempA$="EDIT"
Case 2
TempA$="STA"
Case 3
TempA$="DIS"
Case 4
TempA$="REDU"
Case 5
TempA$="CALL"
Case 6
TempA$="KILL"
Case 7
TempA$="TELE"
Case 8
TempA$="INV"
Case 9
TempA$="GET"
Case 10
TempA$="LINK"
End Select
Call Screen.ANSI(2,25,Temp5*8-5)
TempA$=Config3(9)+TempA$
TempA$=Left$(TempA$,6)
TempA$=TempA$+Space$(6-Len(TempA$))
If Temp5=10 Then
TempA$=Left$(TempA$,5)
Endif
Call Put.Screen(TempA$)
Next
Call Cursor(True)
Call Restore.Color
10451
Exit Sub
10452
Resume 10451
End Sub
Sub Display.Status.Line
On Local Error Goto 10462
Call Cursor(False)
Call Screen.ANSI(1,7,112)
Call Put.Screen(Temp$)
Call Cursor(True)
Call Restore.Color
10461
Exit Sub
10462
Resume 10461
End Sub
Sub Display.Status.Line2
On Local Error Goto 10472
Var$=Chr$(27)+"[s"
Call Put.Modem(Var$)
Call Modem.ANSI(1,37,15)
Call Put.Modem(Temp$)
Var$=Chr$(27)+"[u"
Call Put.Modem(Var$)
10471
Exit Sub
10472
Resume 10471
End Sub
Sub Door.Status.Line
On Local Error Goto 10482
Call Cursor(False)
Call Screen.ANSI(1,7,112)
Call Screen.ANSI(2,24,1)
Temp2$=Left$(BBS.Name,19)
Temp2$=Temp2$+Space$(19-Len(Temp2$))
Temp3$=Left$(Door.Name,30)
Temp3$=Temp3$+Space$(30-Len(Temp3$))
Temp4$=" Time on: "+Time.On
Temp$="BBS: "+Temp2$+" Name: "+Temp3$+Temp4$
Temp$=Left$(Temp$,79)
Temp$=Temp$+Space$(79-Len(Temp$))
Call Put.Screen(Temp$)
Call Cursor(True)
Call Restore.Color
10481
Exit Sub
10482
Resume 10481
End Sub
Sub Restore.Color
On Local Error Goto 10492
Call Screen.ANSI(1,37,15)
If Color.Graphics Then
If Graphics.Off Then
Call Screen.ANSI(4,37,15)
Else
Call Screen.ANSI(4,Color.Code,Avatar.Code)
Endif
Endif
10491
Exit Sub
10492
Resume 10491
End Sub
Sub Time.Online
On Local Error Goto 10502
Graphics.Off=True
Strng="It is now "+FNclock$+"."
Call IO.O
OnTime#=TimeValue#(Time$)-TimeValue#(Time.On)
If OnTime#<False Then
OnTime#=OnTime#+TimeValue#("12:00:00")*2
Endif
Strng="You have been on for"
Strng2="."
Gosub Time.Display
Hours=Int(Time.Left/3600!)
Temp.Time=Time.Left-Hours*3600!
Minutes=Int(Temp.Time/60!)
Seconds=Temp.Time-Minutes*60!
OnTime#=TimeSerial#(Hours,Minutes,Seconds)-OnTime#
Strng="You have"
Strng2=" remaining."
Gosub Time.Display
Exit Sub
Time.Display:
If Hour&(OnTime#)>0 Then
Strng=Strng+Str$(Hour&(OnTime#))+" hours,"
Endif
If Minute&(OnTime#)>0 Then
Strng=Strng+Str$(Minute&(OnTime#))+" minutes,"
Endif
If Second&(OnTime#)>0 Then
Strng=Strng+Str$(Second&(OnTime#))+" seconds"
Endif
Strng=Strng+Strng2
Call IO.O
Return
10501
Exit Sub
10502
Resume 10501
End Sub
Sub Whisper
On Local Error Goto 10512
Call Parse
If Parser=False Then
Strng="Whisper what?"
Call IO.O
Exit Sub
Endif
Call Search.Mess(False)
If Temp<>Room Then
Strng="That user is not in this room!"
Call IO.O
Exit Sub
Endif
Call Send.Mess(7,TempB,Room,Parsed.Command2)
10511
Exit Sub
10512
Resume 10511
End Sub
Sub Send.Message
On Local Error Goto 10522
Call Parse
If Parser Then
Call Search.Mess(False)
If Temp>False Then
Call Send.Mess(6,TempB,False,Parsed.Command2)
Exit Sub
Endif
Endif
Call Send.Mess(1,False,False,Stored.Parsed.Command1)
10521
Exit Sub
10522
Resume 10521
End Sub
Sub Weapon.List
On Local Error Goto 10532
If Config2(50)=False Then
Call In.Room(11)
If TempA=False Then
Strng="Find the Weapons Shoppe."
Call IO.O
Exit Sub
Endif
Endif
Strng="The Blacksmith says: Here's a list of my inventory."
Call IO.O
Graphics.Off=True
Strng="To purchase, type 'buy #', for example: Buy 12."
Call IO.O
Out3=Mask$+Mask$+Mask$+" Weapon. Wgt. Gold. +"
Strng=Out3
Call IO.O
Temp8=3
Temp5=False
Var$=Config3(74)
Allow.Break=True
Do
If Instr(Var$,",") Then
Var=Val(Left$(Var$,Instr(Var$,",")-1))
Var$=Mid$(Var$,Instr(Var$,",")+1)
Else
Var=Val(Var$)
Var$=Nul
Endif
If Var>False And Var<=Lof(8)/Len(TreasureRecord) Then
Temp5=Temp5+1
Temp8=Temp8+1
Get 8,Var,TreasureRecord
Temp1=TreasureRecord.Weight
Temp2=TreasureRecord.Gold
Temp$=Left$(TreasureRecord.TreasureName,20)
Mid$(Temp$,1,1)=Ucase$(Mid$(Temp$,1,1))
Strng=Mid$(Str$(Temp5),2)+Space$(6-Len(Str$(Temp5)))+_
Temp$+Space$(8-Len(Str$(Temp1)))+Str$(Temp1)+_
Space$(8-Len(Str$(Temp2)))+Str$(Temp2)
If TreasureRecord.Spell Then
SpellRecord=SpellArray(TreasureRecord.Spell)
Strng=Strng+" "+Str$(SpellRecord.Level)
Else
If TreasureRecord.Plus Then
Strng=Strng+" "+Str$(Abs(TreasureRecord.Plus))
Endif
Endif
Call IO.O
If Break Then
Exit Do
Endif
If Var$=Nul Then
Exit Do
Endif
If Temp8=23 Then
Temp8=False
Call More.Prompt
If No Then
Exit Do
Endif
Endif
Endif
Loop
10531
Allow.Break=False
Exit Sub
10532
Resume 10531
End Sub
Sub Change.PassWord
On Local Error Goto 10542
Graphics.Off=True
Strng="Change your password(y/n)?"
No.Input.Out="N"
Call IO.I
If No Then
Strng="Password not changed."
Call IO.O
Exit Sub
Endif
If Yes Then
Strng="Type in old password for verification:"
Line.Length=20
Hide=True
Call IO.I
Hide=False
Out2=Ltrim$(Out2)
Out2=Rtrim$(Out2)
Out2=Ucase$(Out2)
Strng=UserRecord.PassWord
Call Decrypt(Strng)
If Strng=Nul Then
Strng="This password has a checksum error."
Call IO.O
Exit Sub
Endif
Strng=Rtrim$(Strng)
If Strng<>Out2 Then
Strng="Passwords don't match!"
Call IO.O
Exit Sub
Endif
Strng="Type in new password(20 char. max.)"
Call IO.O
Line.Length=20
Strng="?"
Hide=True
Call IO.I
Hide=False
If No.Input Then
Strng="Password not changed."
Call IO.O
Exit Sub
Endif
Out2=Ltrim$(Out2)
Out2=Rtrim$(Out2)
Out2=Ucase$(Out2)
Call Valid(Out2,20)
If Out2=Nul Then
Strng="Illegal characters in password."
Else
Call Encrypt(Out2,False)
UserRecord.PassWord=Out2
Strng="Password changed."
Endif
Call IO.O
Endif
10541
Exit Sub
10542
Resume 10541
End Sub
Sub Align
On Local Error Goto 10552
If Normal.User Then
If UserRecord.Flags And Alignmented Then
Strng="You've already changed alignment once!"
Call IO.O
Exit Sub
Endif
Endif
Strng="Change alignment(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
UserRecord.Flags=UserRecord.Flags Or Alignmented
Call Modify.Alignment
Strng="Alignment is now "
Strng=Strng+Rtrim$(Alignment.Name1(UserRecord.Align1+2))+" "
Strng=Strng+Rtrim$(Alignment.Name2(UserRecord.Align2+2))
Call IO.O
Endif
10551
Exit Sub
10552
Resume 10551
End Sub
Sub Reroll.Character
On Local Error Goto 10562
If Normal.User Then
If UserRecord.Flags And Rerolled Then
Strng="You've already re-rolled your character!"
Call IO.O
Exit Sub
Endif
Endif
Strng="Re-roll character(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
UserRecord.Flags=UserRecord.Flags Or Rerolled
Do While Security.Guard
Strng="Character re-roll:"
Call IO.O
Strng="Change class type/name(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call Modify.Class
Endif
Strng="Character re-roll:"
Call IO.O
Strng="Change vital statistics(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call Modify.Stats
Endif
Strng="Character re-roll:"
Call IO.O
Strng="Change character race type/name(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call Modify.Race
Endif
Strng="Character re-roll:"
Call IO.O
Strng="Change weapon proficiency(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call Modify.Proficiency
Endif
Strng="Character re-roll:"
Call IO.O
Strng="Change character alignment(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Call Modify.Alignment
Endif
Do While Security.Guard
Strng="All changes finished(y/n)?"
No.Input.Out="Y"
Call IO.I
If Yes Then
Exit Sub
Endif
If No Then
Exit Do
Endif
Loop
Loop
Endif
10561
Exit Sub
10562
Resume 10561
End Sub