home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
DND29C4.ZIP
/
SOURCE.ZIP
/
DNDEDIT2.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-07
|
94KB
|
3,754 lines
Rem dndedit2.bas v2.9c
Rem $Include: 'dndbbs.inc'
Sub RoomEdit
On Local Error Goto 10002
Restore RoomEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Select Case Selection
Case 1
Edit.Data(1)=RoomRecord.ShortDesc
Case 2
For Temp2=1 To 4
Edit.Data(Temp2)=Rtrim$(RoomRecord.LongDesc(Temp2))
Next
Case 3
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(1)),2)
Case 4
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(2)),2)
Case 5
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(3)),2)
Case 6
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(4)),2)
Case 7
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(5)),2)
Case 8
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(6)),2)
Case 9
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(7)),2)
Case 10
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(8)),2)
Case 11
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(9)),2)
Case 12
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(10)),2)
Case 13
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(11)),2)
Case 14
Edit.Data(1)=Mid$(Str$(RoomRecord.MonsterClass),2)
Case 15
Edit.Data(1)=Mid$(Str$(RoomRecord.RustRate),2)
Case 16
Edit.Data(1)=Mid$(Str$(RoomRecord.StealRate),2)
End Select
Call ScreenEdit
Select Case Selection
Case 1
RoomRecord.ShortDesc=Edit.Data(1)
Case 2
For Temp2=1 To 4
RoomRecord.LongDesc(Temp2)=Edit.Data(Temp2)
Next
Case 3 To 13
RoomRecord.Direct(Selection-2)=Val(Edit.Data(1))
Case 14
RoomRecord.MonsterClass=Int(Val(Edit.Data(1)))
Case 15
RoomRecord.RustRate=Int(Val(Edit.Data(1)))
Case 16
RoomRecord.StealRate=Int(Val(Edit.Data(1)))
End Select
10001
Exit Sub
10002
Resume 10001
End Sub
Sub ObjectEdit
On Local Error Goto 10012
Static TempE
Restore ObjectEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Select Case Selection
Case 1
Edit.Data(1)=ObjectRecord.ObjectName
Case 2
Edit.Data(1)=Lcase$(ObjectRecord.ShortName)
Case 3
Edit.Data(1)=Mid$(Str$(ObjectRecordRoom.Link),2)
Case 4
If ObjectRecord.LightRoom Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 5
Edit.Data(1)=Mid$(Str$(ObjectRecord.LightTime),2)
Case 6
Edit.Data(1)=Mid$(Str$(ObjectRecord.Keyed),2)
Case 7
Edit.Data(1)=Left$(ObjectRecord.LongDesc,79)
Case 8
Edit.Data(1)=ObjectRecord.ShortDesc
Case 9
If ObjectRecord.Hidden Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 10
If ObjectRecord.Invisible Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 11
If ObjectRecord.JailTrap Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 12
If ObjectRecord.DoorLock>1 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
If ObjectRecord.Relocks Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 14
If ObjectRecord.Permanent Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 15
Edit.Data(1)="?"
If ObjectRecord.Trap=1 Then
Edit.Data(1)="P"
Endif
If ObjectRecord.Trap=2 Then
Edit.Data(1)="F"
Endif
If ObjectRecord.Trap=3 Then
Edit.Data(1)="D"
Endif
Case 16
Edit.Data(1)="?"
If ObjectRecord.Trap=2 Then
If ObjectRecord.Teleport=False Then
Edit.Data(1)="N"
Else
Edit.Data(1)="Y"
Endif
Strng=Chr$(27)+"[17;61H"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng="(Y/N)"
Call Scrn(Strng)
Endif
If ObjectRecord.Trap=3 Then
Edit.Data(1)="?"
If ObjectRecord.Teleport>False Then
Edit.Data(1)="F"
Endif
If ObjectRecord.Teleport<False Then
Edit.Data(1)="V"
Endif
Strng=Chr$(27)+"[17;61H"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng="(F/V)"
Call Scrn(Strng)
Endif
Case 17
Edit.Data(1)=Mid$(Str$(Abs(ObjectRecord.Teleport)),2)
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Edit.Data(1)=Rtrim$(Edit.Data(1))
Call ScreenEdit
Select Case Selection
Case 1
ObjectRecord.ObjectName=Lcase$(Edit.Data(1))
Case 2
ObjectRecord.ShortName=Ucase$(Edit.Data(1))
Case 3
ObjectRecord.RoomLink=Val(Edit.Data(1))
Case 4
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.LightRoom=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.LightRoom=False
Endif
Case 5
ObjectRecord.LightTime=Val(Edit.Data(1))
Case 6
ObjectRecord.Keyed=Val(Edit.Data(1))
Case 7
ObjectRecord.LongDesc=Edit.Data(1)
Case 8
ObjectRecord.ShortDesc=Edit.Data(1)
Case 9
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.Hidden=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.Hidden=False
Endif
Case 10
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.Invisible=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.Invisible=False
Endif
Case 11
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.JailTrap=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.JailTrap=False
Endif
Case 12
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.DoorLock=2
ObjectRecord.Closed=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.DoorLock=False
ObjectRecord.Closed=False
Endif
Case 13
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.Relocks=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.Relocks=False
Endif
Case 14
If Ucase$(Edit.Data(1))="Y" Then
ObjectRecord.Permanent=True
Endif
If Ucase$(Edit.Data(1))="N" Then
ObjectRecord.Permanent=False
Endif
Case 15
ObjectRecord.Trap=False
If Ucase$(Edit.Data(1))="P" Then
ObjectRecord.Trap=1
ObjectRecord.Teleport=False
Endif
If Ucase$(Edit.Data(1))="F" Then
ObjectRecord.Trap=2
ObjectRecord.Teleport=1
Endif
If Ucase$(Edit.Data(1))="D" Then
ObjectRecord.Trap=3
ObjectRecord.Teleport=1
Endif
Call DisplayObject
Case 16
Select Case ObjectRecord.Trap
Case 2
Select Case Ucase$(Edit.Data(1))
Case "Y"
TempE=1
ObjectRecord.Teleport=1
Call DisplayObject
Next.Field=17
Call ShowField
Call ObjectEdit
Case Else
TempE=False
ObjectRecord.Teleport=False
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[17;59H"
Call Scrn(Strng)
Strng="N"
Call Scrn(Strng)
Strng=Chr$(27)+"[19;50H"
Call Scrn(Strng)
Strng="0"
Call Scrn(Strng)
Strng=Space$(4)
Call Scrn(Strng)
End Select
Case 3
Select Case Ucase$(Edit.Data(1))
Case "F"
TempE=1
ObjectRecord.Teleport=1
Call DisplayObject
Next.Field=17
Call ShowField
Call ObjectEdit
Case "V"
TempE=True
ObjectRecord.Teleport=True
Call DisplayObject
Next.Field=17
Call ShowField
Call ObjectEdit
Case Else
ObjectRecord.Teleport=False
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[17;59H"
Call Scrn(Strng)
Strng="?"
Call Scrn(Strng)
Strng=Chr$(27)+"[19;50H"
Call Scrn(Strng)
Strng="0"
Call Scrn(Strng)
Strng=Space$(4)
Call Scrn(Strng)
End Select
End Select
Case 17
ObjectRecord.Teleport=Val(Edit.Data(1))*TempE
Next.Field=16
Call ShowField
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[17;61H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
End Select
10011
Exit Sub
10012
Resume 10011
End Sub
Sub TreasureEdit
On Local Error Goto 10022
Static TempE
Restore TreasureEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
TempE=False
Select Case Selection
Case 1
Edit.Data(1)=TreasureRecord.TreasureName
Case 2
Edit.Data(1)=Lcase$(TreasureRecord.ShortName)
Case 3
Edit.Data(1)=Mid$(Str$(TreasureRecord.Weight),2)
Case 4
Edit.Data(1)=Mid$(Str$(TreasureRecord.Gold),2)
Case 5
Edit.Data(1)=Mid$(Str$(Abs(TreasureRecord.Plus)),2)
Case 6
Edit.Data(1)=Mid$(Str$(TreasureRecord.Charges),2)
Case 7
Select Case TreasureRecord.Proficiency
Case 1
Edit.Data(1)="B"
Case 2
Edit.Data(1)="P"
Case 3
Edit.Data(1)="S"
Case 4
Edit.Data(1)="T"
Case Else
Edit.Data(1)="?"
End Select
Case 8
If TreasureRecord.Type=False Then
If TreasureRecord.Plus=False Then
Edit.Data(1)="T"
Else
Edit.Data(1)="W"
Endif
Endif
If TreasureRecord.Type<False Then
Edit.Data(1)="S"
Endif
If TreasureRecord.Type>False Then
Edit.Data(1)="A"
Endif
Case 9
If TreasureRecord.Coin Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 10
If TreasureRecord.Potion Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 11
If TreasureRecord.Scroll Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 12
If TreasureRecord.Invisible Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
If TreasureRecord.Loadable Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 14
Edit.Data(1)=Mid$(Str$(TreasureRecord.AmmoLoads),2)
Case 15
If TreasureRecord.Ammunition Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 16
Edit.Data(1)=Mid$(Str$(TreasureRecord.Keyed),2)
Case 17
If TreasureRecord.Spell Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 18
If TreasureRecord.Spell>False And_
TreasureRecord.Spell<=Lof(4)/Len(SpellRecord) Then
Get 4,TreasureRecord.Spell,SpellRecord
Edit.Data(1)=Left$(SpellRecord.SpellName,20)
Else
Edit.Data(1)=Nul
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[4;40H"
Call Scrn(Strng)
Strng=Space$(20)
Call Scrn(Strng)
Endif
Case 19
If TreasureRecord.RingType Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 20
Edit.Data(1)="?"
If TreasureRecord.RingType=1 Then
Edit.Data(1)="P"
Endif
If TreasureRecord.RingType=2 Then
Edit.Data(2)="L"
Endif
If TreasureRecord.RingType=3 Then
Edit.Data(1)="S"
Endif
Case 21
If TreasureRecord.RingType<>3 Then
Exit Sub
Endif
If TreasureRecord.RingSpell<=False Then
Edit.Data(1)=Nul
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[10;40H"
Call Scrn(Strng)
Strng=Space$(20)
Call Scrn(Strng)
Endif
If TreasureRecord.RingSpell>False Then
Get 4,TreasureRecord.RingSpell,SpellRecord
Edit.Data(1)=Left$(SpellRecord.SpellName,20)
Endif
Case 22
If TreasureRecord.Recep Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 23
Edit.Data(1)=Mid$(Str$(TreasureRecord.RecepMax),2)
Case 24
Edit.Data(1)=Left$(TreasureRecord.RecepFileName,8)
Case 25
If TreasureRecord.Locked Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 26
If TreasureRecord.Edible Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 27
If TreasureRecord.Rustable Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 28
Edit.Data(1)=Mid$(Str$(TreasureRecord.RustPercent),2)
Case 29
If TreasureRecord.Stealable Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 30
Edit.Data(1)=Mid$(Str$(TreasureRecord.StealPercent),2)
Case 31
If TreasureRecord.Launchable Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 32
Edit.Data(1)=Mid$(Str$(TreasureRecord.LaunchLoads),2)
Case 33
If TreasureRecord.LaunchAmmo Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 34
If TreasureRecord.Movable Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Edit.Data(1)=Rtrim$(Edit.Data(1))
Call ScreenEdit
Select Case Selection
Case 1
TreasureRecord.TreasureName=Lcase$(Edit.Data(1))
Case 2
TreasureRecord.ShortName=Ucase$(Edit.Data(1))
Case 3
TreasureRecord.Weight=Val(Edit.Data(1))
Case 4
TreasureRecord.Gold=Val(Edit.Data(1))
Case 5
TreasureRecord.Plus=Val(Edit.Data(1))
Case 6
TreasureRecord.Charges=Val(Edit.Data(1))
Case 7
TreasureRecord.Proficiency=False
If Ucase$(Edit.Data(1))="B" Then
TreasureRecord.Proficiency=1
Endif
If Ucase$(Edit.Data(1))="P" Then
TreasureRecord.Proficiency=2
Endif
If Ucase$(Edit.Data(1))="S" Then
TreasureRecord.Proficiency=3
Endif
If Ucase$(Edit.Data(1))="T" Then
TreasureRecord.Proficiency=4
Endif
Case 8
If Ucase$(Edit.Data(1))="S" Then
TreasureRecord.Type=True
Endif
If Ucase$(Edit.Data(1))="A" Then
TreasureRecord.Type=1
Endif
If Ucase$(Edit.Data(1))="W" Then
TreasureRecord.Type=False
If TreasureRecord.Plus=False Then
TreasureRecord.Plus=1
TempX=5
Call ShowTreasure
Endif
Endif
If Ucase$(Edit.Data(1))="T" Then
TreasureRecord.Plus=False
TempX=5
Call ShowTreasure
TreasureRecord.Charges=False
TempX=6
Call ShowTreasure
TreasureRecord.Type=False
Endif
Case 9
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Coin=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Coin=False
Endif
Case 10
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Potion=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Potion=False
Endif
Case 11
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Scroll=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Scroll=False
Endif
Case 12
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Invisible=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Invisible=False
Endif
Case 13
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Loadable=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Loadable=False
Endif
Case 14
TreasureRecord.AmmoLoads=Val(Edit.Data(1))
Case 15
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Ammunition=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Ammunition=False
Endif
Case 16
TreasureRecord.Keyed=Val(Edit.Data(1))
Case 17
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Spell=True
TempX=Selection
Call ShowTreasure
Next.Field=18
Call ShowField
TempE=True
Call TreasureEdit
Exit Sub
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Spell=False
Call ShowTreasure(Selection+1)
Endif
Case 18
Edit.Data(1)=Rtrim$(Edit.Data(1))
Edit.Data(1)=Lcase$(Edit.Data(1))
If Edit.Data(1)=Nul Then
TreasureRecord.Spell=False
Call ShowTreasure(Selection-1)
Else
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
TreasureRecord.Spell=Temp2
If TempE=False Then
Call ShowTreasure(Selection-1)
Endif
Exit Sub
Endif
Next
TreasureRecord.Spell=False
Call ShowTreasure(Selection-1)
Strng="The spell was not found in the spell file."
Call ErrorMessage
Endif
Case 19
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.RingType=1
TreasureRecord.RingSpell=False
Strng=Chr$(27)+"[8;40H"
Call Scrn(Strng)
Call Scrn("P")
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.RingType=False
TreasureRecord.RingSpell=False
Strng=Chr$(27)+"[8;40H"
Call Scrn(Strng)
Call Scrn("?")
Endif
Strng=Chr$(27)+"[10;40H"
Call Scrn(Strng)
Strng="<none>"
Call Scrn(Strng)
Strng=Space$(14)
Call Scrn(Strng)
Case 20
If Ucase$(Edit.Data(1))="P" Then
TreasureRecord.RingType=1
TreasureRecord.RingSpell=False
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[5;45H"
Call Scrn(Strng)
Call Scrn("Y")
Strng=Chr$(27)+"[10;40H"
Call Scrn(Strng)
Strng="<none>"
Call Scrn(Strng)
Strng=Space$(14)
Call Scrn(Strng)
Endif
If Ucase$(Edit.Data(1))="L" Then
TreasureRecord.RingType=2
TreasureRecord.RingSpell=False
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[5;45H"
Call Scrn(Strng)
Call Scrn("Y")
Strng=Chr$(27)+"[10;40H"
Call Scrn(Strng)
Strng="<none>"
Call Scrn(Strng)
Strng=Space$(14)
Call Scrn(Strng)
Endif
If Ucase$(Edit.Data(1))="S" Then
TreasureRecord.RingType=3
TreasureRecord.RingSpell=True
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[10;40H"
Call Scrn(Strng)
Strng="<generic spell>"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Endif
Case 21
Edit.Data(1)=Rtrim$(Edit.Data(1))
Edit.Data(1)=Lcase$(Edit.Data(1))
If Edit.Data(1)=Nul Then
TreasureRecord.RingSpell=True
Else
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
TreasureRecord.RingSpell=Temp2
Exit Sub
Endif
Next
Strng="The spell was not found in the spell file."
Call ErrorMessage
Endif
Case 22
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Recep=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Recep=False
Endif
Case 23
TreasureRecord.RecepMax=Val(Edit.Data(1))
Case 24
TreasureRecord.RecepFileName=Edit.Data(1)
Case 25
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Locked=1
TreasureRecord.Closed=1
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Locked=False
TreasureRecord.Closed=False
Endif
Case 26
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Edible=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Edible=False
Endif
Case 27
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Rustable=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Rustable=False
Endif
Case 28
TreasureRecord.RustPercent=Int(Val(Edit.Data(1)))
Case 29
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Stealable=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Stealable=False
Endif
Case 30
TreasureRecord.StealPercent=Int(Val(Edit.Data(1)))
Case 31
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Launchable=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Launchable=False
Endif
Case 32
TreasureRecord.LaunchLoads=Int(Val(Edit.Data(1)))
Case 33
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.LaunchAmmo=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.LaunchAmmo=False
Endif
Case 34
If Ucase$(Edit.Data(1))="Y" Then
TreasureRecord.Movable=True
Endif
If Ucase$(Edit.Data(1))="N" Then
TreasureRecord.Movable=False
Endif
End Select
10021
Exit Sub
10022
Resume 10021
End Sub
Sub MonsterEdit
On Local Error Goto 10032
Restore MonsterEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Static TempE
TempE=False
Select Case Selection
Case 1
Edit.Data(1)=MonsterRecord.MonsterName
Case 2
Edit.Data(1)=MonsterRecord.PluralName
Case 3
Edit.Data(1)=Mid$(Str$(MonsterRecord.Level),2)
Case 4
Edit.Data(1)=Mid$(Str$(MonsterRecord.Hits),2)
Case 5
Edit.Data(1)=Mid$(Str$(MonsterRecord.Experience),2)
Case 6
For Temp2=1 To 5
Temp4=MonsterRecord.Treasure(Temp2)
Edit.Data(Temp2)=Nul
If Temp4>False Then
Get 8,Temp4,TreasureRecord
Edit.Data(Temp2)=TreasureRecord.TreasureName
Endif
Next
Case 7
If MonsterRecord.Psionic Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 8
If MonsterRecord.Psionic=False Or MonsterRecord.PsionicSpell=False Then
Edit.Data(1)=Nul
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[21;22H"
Call Scrn(Strng)
Strng=Space$(20)
Call Scrn(Strng)
Else
Get 4,MonsterRecord.PsionicSpell,SpellRecord
Edit.Data(1)=SpellRecord.SpellName
Endif
Case 9
Edit.Data(1)=Mid$(Str$(MonsterRecord.NumberAppearing),2)
Case 10
If MonsterRecord.Poison Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
ENdif
Case 11
Edit.Data(1)=Mid$(Str$(MonsterRecord.PoisonPercent),2)
Case 12
If MonsterRecord.LevelDrain Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
Edit.Data(1)=Mid$(Str$(MonsterRecord.DrainPercent),2)
Case 14
If MonsterRecord.Block Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 15
Edit.Data(1)=Mid$(Str$(MonsterRecord.BlockPercent),2)
Case 16
If MonsterRecord.Prevent Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 17
Edit.Data(1)=Mid$(Str$(MonsterRecord.PreventPercent),2)
Case 18
If MonsterRecord.Follow Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 19
Edit.Data(1)=Mid$(Str$(MonsterRecord.FollowPercent),2)
Case 20
Edit.Data(1)=Mid$(Str$(MonsterRecord.Teleport),2)
Case 21
If MonsterRecord.Spell Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 22
Edit.Data(1)=Mid$(Str$(MonsterRecord.SpellPercent),2)
Case 23
If MonsterRecord.Spell>False And_
MonsterRecord.Spell<=Lof(4)/Len(SpellRecord) Then
Get 4,MonsterRecord.Spell,SpellRecord
Edit.Data(1)=Left$(SpellRecord.SpellName,20)
Else
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[17;51H"
Call Scrn(Strng)
Edit.Data(1)=Nul
Strng=Space$(20)
Call Scrn(Strng)
Endif
Case 24
If MonsterRecord.Magic Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 25
If MonsterRecord.Permanent Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 26
If MonsterRecord.Equation Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
If Selection=6 Then
Out2="<esc> Exit Field"
Else
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Endif
Call StatusLine
Edit.Data(1)=Rtrim$(Edit.Data(1))
Call ScreenEdit
Select Case Selection
Case 1
MonsterRecord.MonsterName=Lcase$(Edit.Data(1))
Case 2
MonsterRecord.PluralName=Lcase$(Edit.Data(1))
Case 3
MonsterRecord.Level=Val(Edit.Data(1))
Case 4
MonsterRecord.Hits=Val(Edit.Data(1))
Case 5
MonsterRecord.Experience=Val(Edit.Data(1))
Case 6
For Temp2=1 To 5
Temp1=False
Edit.Data(Temp2)=Rtrim$(Edit.Data(Temp2))
If Edit.Data(Temp2)<>Nul Then
Edit.Data(Temp2)=Lcase$(Edit.Data(Temp2))
For Temp3=1 To Lof(8)/Len(TreasureRecord)
Get 8,Temp3,TreasureRecord
If Left$(TreasureRecord.TreasureName,_
Len(Edit.Data(Temp2)))=Edit.Data(Temp2) Then
Temp1=Temp3
Exit For
Endif
Next
Endif
MonsterRecord.Treasure(Temp2)=Temp1
Next
Case 7
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Psionic=True
TempX=Selection
Call ShowMonster
Next.Field=8
Call ShowField
TempE=True
Call MonsterEdit
Exit Sub
Endif
If Ucase$(Edit.Data(1))="N" Then
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowMonster(Selection+1)
Endif
Case 8
Edit.Data(1)=Rtrim$(Edit.Data(1))
Edit.Data(1)=Lcase$(Edit.Data(1))
If Edit.Data(1)=Nul Then
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowMonster(Selection-1)
Else
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
If SpellRecord.Psionic Then
MonsterRecord.Psionic=True
MonsterRecord.PsionicSpell=Temp2
If TempE=False Then
Call ShowMonster(Selection-1)
Endif
Exit Sub
Endif
Endif
Next
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowMonster(Selection-1)
Strng="The psi spell was not found in the spell file."
Call ErrorMessage
Endif
Case 9
MonsterRecord.NumberAppearing=Val(Edit.Data(1))
Case 10
MonsterRecord.Poison=False
MonsterRecord.PoisonPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Poison=True
Next.Field=11
Call ShowField
TempX=Selection
Call ShowMonster
Call MonsterEdit
Exit Sub
Endif
Case 11
MonsterRecord.PoisonPercent=Int(Val(Edit.Data(1)))
Case 12
MonsterRecord.LevelDrain=False
MonsterRecord.DrainPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.LevelDrain=True
Next.Field=13
Call ShowField
TempX=Selection
Call ShowMonster
Call MonsterEdit
Exit Sub
Endif
Case 13
MonsterRecord.DrainPercent=Int(Val(Edit.Data(1)))
Case 14
MonsterRecord.Block=False
MonsterRecord.BlockPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Block=True
Next.Field=15
Call ShowField
TempX=Selection
Call ShowMonster
Call MonsterEdit
Exit Sub
Endif
Case 15
MonsterRecord.BlockPercent=Int(Val(Edit.Data(1)))
Case 16
MonsterRecord.Prevent=False
MonsterRecord.PreventPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Prevent=True
Next.Field=17
Call ShowField
TempX=Selection
Call ShowMonster
Call MonsterEdit
Exit Sub
Endif
Case 17
MonsterRecord.PreventPercent=Int(Val(Edit.Data(1)))
Case 18
MonsterRecord.Follow=False
MonsterRecord.FollowPercent=False
MonsterRecord.Teleport=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Follow=True
Next.Field=19
Call ShowField
TempX=Selection
Call ShowMonster
Call MonsterEdit
Exit Sub
Endif
Case 19
MonsterRecord.FollowPercent=Int(Val(Edit.Data(1)))
Case 20
MonsterRecord.Teleport=Int(Val(Edit.Data(1)))
Case 21
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Call ShowMonster(Selection+1)
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Spell=True
TempX=Selection
Call ShowMonster
Next.Field=22
Call ShowField
Call MonsterEdit
Exit Sub
Endif
Case 22
MonsterRecord.SpellPercent=Int(Val(Edit.Data(1)))
Case 23
Edit.Data(1)=Lcase$(Edit.Data(1))
Edit.Data(1)=Rtrim$(Edit.Data(1))
If Edit.Data(1)=Nul Then
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Else
TempA=False
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
TempA=True
MonsterRecord.Spell=Temp2
Endif
Next
If TempA=False Then
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Strng="The spell was not found in the spell file."
Call ErrorMessage
Endif
Endif
Call ShowMonster(21)
Call ShowMonster(22)
Case 24
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Magic=True
Endif
If Ucase$(Edit.Data(1))="N" Then
MonsterRecord.Magic=False
Endif
Case 25
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Permanent=True
Endif
If Ucase$(Edit.Data(1))="N" Then
MonsterRecord.Permanent=False
Endif
Case 26
If Ucase$(Edit.Data(1))="Y" Then
Restore MonsterEditData2
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Edit.Data(1)=Rtrim$(MonsterRecord.MonsterEquate)
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Call ScreenEdit
MonsterRecord.Equation=True
MonsterRecord.MonsterEquate=Ucase$(Edit.Data$(1))
Else
MonsterRecord.Equation=False
MonsterRecord.MonsterEquate=Nul
Endif
End Select
10031
Exit Sub
10032
Resume 10031
End Sub
Sub NonplayerEdit
On Local Error Goto 10042
Restore NonplayerEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Static TempE
TempE=False
MonsterRecord.Magic=True
MonsterRecord.Permanent=-2
MonsterRecord.Equation=False
Select Case Selection
Case 1
Edit.Data(1)=MonsterRecord.MonsterName
Case 2
Edit.Data(1)=MonsterRecord.PluralName
Case 3
Edit.Data(1)=Mid$(Str$(MonsterRecord.Level),2)
Case 4
Edit.Data(1)=Mid$(Str$(MonsterRecord.Hits),2)
Case 5
Edit.Data(1)=Mid$(Str$(MonsterRecord.Experience),2)
Case 6
For Temp2=1 To 5
Temp4=MonsterRecord.Treasure(Temp2)
Edit.Data(Temp2)=Nul
If Temp4>False Then
Get 8,Temp4,TreasureRecord
Edit.Data(Temp2)=TreasureRecord.TreasureName
Endif
Next
Case 7
If MonsterRecord.Psionic Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 8
If MonsterRecord.Psionic=False Or MonsterRecord.PsionicSpell=False Then
Edit.Data(1)=Nul
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[21;21H"
Call Scrn(Strng)
Strng=Space$(20)
Call Scrn(Strng)
Else
Get 4,MonsterRecord.PsionicSpell,SpellRecord
Edit.Data(1)=SpellRecord.SpellName
Endif
Case 9
Edit.Data(1)=Mid$(Str$(MonsterRecord.NumberAppearing),2)
Case 10
If MonsterRecord.Poison Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 11
Edit.Data(1)=Mid$(Str$(MonsterRecord.PoisonPercent),2)
Case 12
If MonsterRecord.LevelDrain Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
Edit.Data(1)=Mid$(Str$(MonsterRecord.DrainPercent),2)
Case 14
If MonsterRecord.Block Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 15
Edit.Data(1)=Mid$(Str$(MonsterRecord.BlockPercent),2)
Case 16
If MonsterRecord.Prevent Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 17
Edit.Data(1)=Mid$(Str$(MonsterRecord.PreventPercent),2)
Case 18
If MonsterRecord.Follow Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 19
Edit.Data(1)=Mid$(Str$(MonsterRecord.FollowPercent),2)
Case 20
Edit.Data(1)=Mid$(Str$(MonsterRecord.Teleport),2)
Case 21
If MonsterRecord.Spell Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 22
Edit.Data(1)=Mid$(Str$(MonsterRecord.SpellPercent),2)
Case 23
If MonsterRecord.Spell>False And_
MonsterRecord.Spell<=Lof(4)/Len(SpellRecord) Then
Get 4,MonsterRecord.Spell,SpellRecord
Edit.Data(1)=Left$(SpellRecord.SpellName,20)
Else
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[17;51H"
Call Scrn(Strng)
Edit.Data(1)=Nul
Strng=Space$(20)
Call Scrn(Strng)
Endif
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
If Selection=6 Then
Out2="<esc> Exit Field"
Else
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Endif
Call StatusLine
Edit.Data(1)=Rtrim$(Edit.Data(1))
Call ScreenEdit
Select Case Selection
Case 1
MonsterRecord.MonsterName=Lcase$(Edit.Data(1))
Case 2
MonsterRecord.PluralName=Lcase$(Edit.Data(1))
Case 3
MonsterRecord.Level=Val(Edit.Data(1))
Case 4
MonsterRecord.Hits=Val(Edit.Data(1))
Case 5
MonsterRecord.Experience=Val(Edit.Data(1))
Case 6
For Temp2=1 To 5
Temp1=False
Edit.Data(Temp2)=Rtrim$(Edit.Data(Temp2))
If Edit.Data(Temp2)<>Nul Then
Edit.Data(Temp2)=Lcase$(Edit.Data(Temp2))
For Temp3=1 To Lof(8)/Len(TreasureRecord)
Get 8,Temp3,TreasureRecord
If Left$(TreasureRecord.TreasureName,_
Len(Edit.Data(Temp2)))=Edit.Data(Temp2) Then
Temp1=Temp3
Exit For
Endif
Next
Endif
MonsterRecord.Treasure(Temp2)=Temp1
Next
Case 7
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Psionic=True
TempX=Selection
Call ShowNonplayer
Next.Field=8
Call ShowField
TempE=True
Call NonplayerEdit
Exit Sub
Endif
If Ucase$(Edit.Data(1))="N" Then
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowNonplayer(Selection+1)
Endif
Case 8
Edit.Data(1)=Rtrim$(Edit.Data(1))
Edit.Data(1)=Lcase$(Edit.Data(1))
If Edit.Data(1)=Nul Then
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowNonplayer(Selection-1)
Else
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
If SpellRecord.Psionic Then
MonsterRecord.Psionic=True
MonsterRecord.PsionicSpell=Temp2
If TempE=False Then
Call ShowNonplayer(Selection-1)
Endif
Exit Sub
Endif
Endif
Next
MonsterRecord.Psionic=False
MonsterRecord.PsionicSpell=False
Call ShowNonplayer(Selection-1)
Strng="The psi spell was not found in the spell file."
Call ErrorMessage
Endif
Case 9
MonsterRecord.NumberAppearing=1
Case 10
MonsterRecord.Poison=False
MonsterRecord.PoisonPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Poison=True
Next.Field=11
Call ShowField
TempX=Selection
Call ShowNonplayer
Call NonplayerEdit
Exit Sub
Endif
Case 11
MonsterRecord.PoisonPercent=Int(Val(Edit.Data(1)))
Case 12
MonsterRecord.LevelDrain=False
MonsterRecord.DrainPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.LevelDrain=True
Next.Field=13
Call ShowField
TempX=Selection
Call ShowNonplayer
Call NonplayerEdit
Exit Sub
Endif
Case 13
MonsterRecord.DrainPercent=Int(Val(Edit.Data(1)))
Case 14
MonsterRecord.Block=False
MonsterRecord.BlockPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Block=True
Next.Field=15
Call ShowField
TempX=Selection
Call ShowNonplayer
Call NonplayerEdit
Exit Sub
Endif
Case 15
MonsterRecord.BlockPercent=Int(Val(Edit.Data(1)))
Case 16
MonsterRecord.Prevent=False
MonsterRecord.PreventPercent=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Prevent=True
Next.Field=17
Call ShowField
TempX=Selection
Call ShowNonplayer
Call NonplayerEdit
Exit Sub
Endif
Case 17
MonsterRecord.PreventPercent=Int(Val(Edit.Data(1)))
Case 18
MonsterRecord.Follow=False
MonsterRecord.FollowPercent=False
MonsterRecord.Teleport=False
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Follow=True
Next.Field=19
Call ShowField
TempX=Selection
Call ShowNonplayer
Call NonplayerEdit
Exit Sub
Endif
Case 19
MonsterRecord.FollowPercent=Int(Val(Edit.Data(1)))
Case 20
MonsterRecord.Teleport=Int(Val(Edit.Data(1)))
Case 21
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Call ShowNonplayer(Selection+1)
If Ucase$(Edit.Data(1))="Y" Then
MonsterRecord.Spell=True
TempX=Selection
Call ShowNonplayer
Next.Field=22
Call ShowField
Call NonplayerEdit
Exit Sub
Endif
Case 22
MonsterRecord.SpellPercent=Int(Val(Edit.Data(1)))
Case 23
Edit.Data(1)=Lcase$(Edit.Data(1))
Edit.Data(1)=Rtrim$(Edit.Data(1))
If Edit.Data(1)=Nul Then
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Else
TempA=False
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
TempA=True
MonsterRecord.Spell=Temp2
Endif
Next
If TempA=False Then
MonsterRecord.Spell=False
MonsterRecord.SpellPercent=False
Strng="The spell was not found in the spell file."
Call ErrorMessage
Endif
Endif
Call ShowNonplayer(21)
Call ShowNonplayer(22)
End Select
10041
Exit Sub
10042
Resume 10041
End Sub
Sub SpellEdit
On Local Error Goto 10052
Restore SpellEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Select Case Selection
Case 1
Edit.Data(1)=SpellRecord.SpellName
Case 2
Edit.Data(1)=Mid$(Str$(SpellRecord.Teleport),2)
Case 3
Edit.Data(1)=Mid$(Str$(SpellRecord.Level),2)
Case 4
Call DisplaySpellTypes
Edit.Data(1)=Mid$(Str$(SpellRecord.SpellType),2)
Case 5
If SpellRecord.Psionic Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 6
Select Case SpellRecord.PsionicMode
Case 1
Edit.Data(1)="A"
Case 2
Edit.Data(1)="D"
Case Else
Edit.Data(1)="?"
End Select
Case 7
If SpellRecord.Equation Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 8
Edit.Data(1)=Lcase$(SpellRecord.Chant)
Case 9
Edit.Data(1)=SpellRecord.Desc
Case 10
If SpellRecord.ClassType And Class1 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 11
If SpellRecord.ClassType And Class2 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 12
If SpellRecord.ClassType And Class3 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
If SpellRecord.ClassType And Class4 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 14
If SpellRecord.ClassType And Class5 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 15
If SpellRecord.ClassType And Class6 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 16
If SpellRecord.ClassType And Class7 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 17
If SpellRecord.ClassType And Class8 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 18
For Temp2=1 To 5
Temp4=SpellRecord.Ingred(Temp2)
Edit.Data(Temp2)=Nul
If Temp4>False Then
Get 8,Temp4,TreasureRecord
Edit.Data(Temp2)=TreasureRecord.TreasureName
Endif
Next
Case 19
If SpellRecord.SpellFlag And Use.Spell.Type Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 20
If SpellRecord.SpellFlag And Scroll.Spell.Type Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 21
If SpellRecord.SpellFlag And Cast.Spell.Type Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Edit.Data(1)=Rtrim$(Edit.Data(1))
Call ScreenEdit
Select Case Selection
Case 1
SpellRecord.SpellName=Lcase$(Edit.Data(1))
Case 2
SpellRecord.Teleport=Int(Val(Edit.Data(1)))
Case 3
SpellRecord.Level=Int(Val(Edit.Data(1)))
Case 4
SpellRecord.SpellType=Int(Val(Edit.Data(1)))
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
For TempX=3 To 12
Strng=Chr$(27)+"["+Mid$(Str$(TempX),2)+";32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Next
For TempX=13 To 14
Strng=Chr$(27)+"["+Mid$(Str$(TempX),2)+";47H"
Call Scrn(Strng)
Strng=Space$(33)
Call Scrn(Strng)
Next
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
For Temp2=18 To 21
Strng=Chr$(27)+"["+Mid$(Str$(Array.Data(Temp2,1)),2)+";"+_
Mid$(Str$(Array.Data(Temp2,2)),2)+"H"
Call Scrn(Strng)
Strng=Title.Data(Temp2)
Call Scrn(Strng)
Next
TempX=False
Call ShowSpell
For TempX=17 To 21
Call ShowSpell
Next
Case 5
SpellRecord.PsionicMode=False
SpellRecord.Psionic=False
SpellRecord.SpellType=False
If Ucase$(Edit.Data(1))="Y" Then
SpellRecord.SpellType=15
SpellRecord.Psionic=True
Endif
Case 6
If Ucase$(Edit.Data(1))="A" Then
SpellRecord.PsionicMode=1
Endif
If Ucase$(Edit.Data(1))="D" Then
SpellRecord.PsionicMode=2
Endif
Case 7
If Ucase$(Edit.Data(1))="Y" Then
Restore SpellEditData2
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Edit.Data(1)=Rtrim$(SpellRecord.SpellEquate)
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Call ScreenEdit
SpellRecord.Equation=True
SpellRecord.SpellEquate=Ucase$(Edit.Data$(1))
Else
SpellRecord.Equation=False
SpellRecord.SpellEquate=Nul
Endif
Case 8
SpellRecord.Chant=Ucase$(Edit.Data(1))
Case 9
SpellRecord.Desc=Edit.Data(1)
Case 10 To 17
If Ucase$(Edit.Data(1))="N" Then
SpellRecord.ClassType=SpellRecord.ClassType And Not 2^(Selection-8)
Endif
If Ucase$(Edit.Data(1))="Y" Then
SpellRecord.ClassType=SpellRecord.ClassType Or 2^(Selection-8)
Endif
Case 18
For Temp2=1 To 5
Temp1=False
Edit.Data(Temp2)=Rtrim$(Edit.Data(Temp2))
If Edit.Data(Temp2)<>Nul Then
Edit.Data(Temp2)=Lcase$(Edit.Data(Temp2))
For Temp3=1 To Lof(8)/Len(TreasureRecord)
Get 8,Temp3,TreasureRecord
If Left$(TreasureRecord.TreasureName,_
Len(Edit.Data(Temp2)))=Edit.Data(Temp2) Then
Temp1=Temp3
Exit For
Endif
Next
Endif
SpellRecord.Ingred(Temp2)=Temp1
Next
Case 19
If Ucase$(Edit.Data(1))="Y" Then
SpellRecord.SpellFlag=SpellRecord.SpellFlag Or Use.Spell.Type
Else
SpellRecord.SpellFlag=SpellRecord.SpellFlag And Not Use.Spell.Type
Endif
Case 20
If Ucase$(Edit.Data(1))="Y" Then
SpellRecord.SpellFlag=SpellRecord.SpellFlag Or Scroll.Spell.Type
Else
SpellRecord.SpellFlag=SpellRecord.SpellFlag And Not Scroll.Spell.Type
Endif
Case 21
If Ucase$(Edit.Data(1))="Y" Then
SpellRecord.SpellFlag=SpellRecord.SpellFlag Or Cast.Spell.Type
Else
SpellRecord.SpellFlag=SpellRecord.SpellFlag And Not Cast.Spell.Type
Endif
End Select
10051
Exit Sub
10052
Resume 10051
End Sub
Sub DisplaySpellTypes
On Local Error Goto 10062
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[3;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[3;47H"
Call Scrn(Strng)
Strng="Spell Type Numbers"
Call Scrn(Strng)
Strng=Chr$(27)+"[4;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[5;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[5;32H"
Call Scrn(Strng)
Strng="1)Enchant 9)Level Drain 19)Intoxicate"
Call Scrn(Strng)
Strng=Chr$(27)+"[6;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[6;32H"
Call Scrn(Strng)
Strng="2)Offense 10)Teleport 20)Set Trap"
Call Scrn(Strng)
Strng=Chr$(27)+"[7;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[7;32H"
Call Scrn(Strng)
Strng="3)Bless 11)Befuddle 21)Hide"
Call Scrn(Strng)
Strng=Chr$(27)+"[8;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[8;32H"
Call Scrn(Strng)
Strng="4)Wish 12)Turn Undead 22)Search"
Call Scrn(Strng)
Strng=Chr$(27)+"[9;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[9;32H"
Call Scrn(Strng)
Strng="5)Poison 13)Pass Door 23)Invisibility"
Call Scrn(Strng)
Strng=Chr$(27)+"[10;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[10;32H"
Call Scrn(Strng)
Strng="6)Vigor 14)Conjure 24)Identify"
Call Scrn(Strng)
Strng=Chr$(27)+"[11;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[11;32H"
Call Scrn(Strng)
Strng="7)Heal 15)Psionic 25)Enlighten"
Call Scrn(Strng)
Strng=Chr$(27)+"[12;32H"
Call Scrn(Strng)
Strng=Space$(48)
Call Scrn(Strng)
Strng=Chr$(27)+"[12;32H"
Call Scrn(Strng)
Strng="8)Curepoison 16)Detect Lock 26)Illuminate"
Call Scrn(Strng)
Strng=Chr$(27)+"[13;47H"
Call Scrn(Strng)
Strng=Space$(33)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;47H"
Call Scrn(Strng)
Strng="17)Detect Evil 27)Psyche"
Call Scrn(Strng)
Strng=Chr$(27)+"[14;47H"
Call Scrn(Strng)
Strng=Space$(33)
Call Scrn(Strng)
Strng=Chr$(27)+"[14;47H"
Call Scrn(Strng)
Strng="18)Detect Trap 28)Telepathy"
Call Scrn(Strng)
10061
Exit Sub
10062
Resume 10061
End Sub
Sub ActionEdit
On Local Error Goto 10072
Static Hits.Temp
Restore ActionEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Select Case Selection
Case 1
Edit.Data(1)=Mid$(Str$(RoomRecord.MonsterTrigger),2)
Case 2
Edit.Data(1)=Mid$(Str$(RoomRecord.MonsterTalk),2)
Case 3
Edit.Data(1)=Mid$(Str$(RoomRecord.Teleport),2)
Case 4
If RoomRecord.SpellTrigger>False And_
RoomRecord.SpellTrigger<=Lof(4)/Len(SpellRecord) Then
Get 4,RoomRecord.SpellTrigger,SpellRecord
Edit.Data(1)=Left$(SpellRecord.SpellName,30)
Else
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[11;2H"
Call Scrn(Strng)
Strng=Space$(30)
Call Scrn(Strng)
Edit.Data(1)=Space$(30)
Endif
Case 5
Edit.Data(1)=Mid$(Str$(Abs(RoomRecord.Level)),2)
Case 6
Edit.Data(1)="n/a"
If RoomRecord.Level<False Then
Edit.Data(1)="min"
Endif
If RoomRecord.Level>False Then
Edit.Data(1)="max"
Endif
Case 7
If RoomRecord.Restrictions And Direction1 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 8
If RoomRecord.Restrictions And Direction2 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 9
If RoomRecord.Restrictions And Direction3 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 10
If RoomRecord.Restrictions And Direction4 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 11
If RoomRecord.Restrictions And Direction5 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 12
If RoomRecord.Restrictions And Direction6 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 13
If RoomRecord.Restrictions And Direction7 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 14
If RoomRecord.Restrictions And Direction8 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 15
If RoomRecord.Restrictions And Direction9 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 16
If RoomRecord.Restrictions And Direction10 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 17
If RoomRecord.Restrictions And Direction11 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 18
If RoomRecord.Restrictions And Direction12 Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 19
Edit.Data(1)=Mid$(Str$(RoomRecord.HealthRate),2)
Case 20
Edit.Data(1)=Mid$(Str$(RoomRecord.EncounterRate),2)
Case 21
If RoomRecord.Fumble Then
Edit.Data(1)="Y"
Else
Edit.Data(1)="N"
Endif
Case 22
Select Case RoomRecord.Inventory
Case 1
Edit.Data(1)="W"
Case 2
Edit.Data(1)="S"
Case 3
Edit.Data(1)="A"
Case 4
Edit.Data(1)="M"
Case Else
Edit.Data(1)="?"
End Select
Case 23
Edit.Data(1)="?"
If RoomRecord.HitPoints>False Then
Edit.Data(1)="F"
Endif
If RoomRecord.HitPoints<False Then
Edit.Data(1)="V"
Endif
Case 24
Edit.Data(1)=Mid$(Str$(Abs(RoomRecord.HitPoints)),2)
Case 25
Edit.Data(1)=Mid$(Str$(RoomRecord.RustRate),2,4)
Case 26
Edit.Data(1)=Mid$(Str$(RoomRecord.StealRate),2,4)
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Call ScreenEdit
Edit.Data(1)=Rtrim$(Edit.Data(1))
Edit.Data(1)=Lcase$(Edit.Data(1))
Select Case Selection
Case 1
RoomRecord.MonsterTrigger=Int(Val(Edit.Data(1)))
Case 2
RoomRecord.MonsterTalk=Int(Val(Edit.Data(1)))
Case 3
RoomRecord.Teleport=Int(Val(Edit.Data(1)))
Case 3
If Edit.Data(1)<>Nul Then
For Temp2=1 To Lof(4)/Len(SpellRecord)
Get 4,Temp2,SpellRecord
If Left$(SpellRecord.SpellName,Len(Edit.Data(1)))=Edit.Data(1) Then
RoomRecord.SpellTrigger=Temp2
Exit Sub
Endif
Next
Strng="The spell was not found in the spell file."
Call ErrorMessage
Strng=Chr$(27)+"[21;2H"
Call Scrn(Strng)
Strng=Space$(60)
Call Scrn(Strng)
Endif
RoomRecord.SpellTrigger=False
Case 5
RoomRecord.Level=Int(Val(Edit.Data(1)))
TempX=6
Call ShowAction
Case 6
RoomRecord.Level=False
If Edit.Data(1)="min" Then
RoomRecord.Level=-Abs(RoomRecord.Level)
Endif
If Edit.Data(1)="max" Then
RoomRecord.Level=Abs(RoomRecord.Level)
Endif
TempX=5
Call ShowAction
Case 7 To 18
If Ucase$(Edit.Data(1))="Y" Then
RoomRecord.Restrictions=RoomRecord.Restrictions Or 2^(Selection-6)
Endif
If Ucase$(Edit.Data(1))="N" Then
RoomRecord.Restrictions=RoomRecord.Restrictions And Not 2^(Selection-6)
Endif
Case 19
RoomRecord.HealthRate=Int(Val(Edit.Data(1)))
Case 20
RoomRecord.EncounterRate=Int(Val(Edit.Data(1)))
Case 21
If Ucase$(Edit.Data(1))="Y" Then
RoomRecord.Fumble=True
Endif
If Ucase$(Edit.Data(1))="N" Then
RoomRecord.Fumble=False
Endif
Case 22
Select Case Ucase$(Edit.Data(1))
Case "W"
RoomRecord.Inventory=1
Case "S"
RoomRecord.Inventory=2
Case "A"
RoomRecord.Inventory=3
Case "M"
RoomRecord.Inventory=4
Case Else
RoomRecord.Inventory=False
End Select
Case 23
Select Case Ucase$(Edit.Data(1))
Case "F"
Hits.Temp=1
TempZ=Abs(RoomRecord.HitPoints)
RoomRecord.HitPoints=1
TempX=23
Call ShowAction
RoomRecord.HitPoints=TempZ
Next.Field=24
Call ShowField
Call ActionEdit
Exit Sub
Case "V"
Hits.Temp=True
TempZ=-Abs(RoomRecord.HitPoints)
RoomRecord.HitPoints=True
TempX=23
Call ShowAction
RoomRecord.HitPoints=TempZ
Next.Field=24
Call ShowField
Call ActionEdit
Exit Sub
Case Else
Hits.Temp=False
RoomRecord.HitPoints=False
TempX=23
Call ShowAction
TempX=24
Call ShowAction
End Select
Case 24
If Hits.Temp=False Then
Hits.Temp=1
Endif
RoomRecord.HitPoints=Val(Edit.Data(1))*Hits.Temp
TempX=24
Call ShowAction
Next.Field=23
Call ShowField
Case 25
RoomRecord.RustRate=Int(Val(Edit.Data(1)))
Case 26
RoomRecord.StealRate=Int(Val(Edit.Data(1)))
End Select
10071
Exit Sub
10072
Resume 10071
End Sub
Sub UserEdit
On Local Error Goto 10082
Restore UserEditData
For TempX=1 To Selection
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Next
Select Case Selection
Case 1
Strng=UserRecord.CodeName
Call Decrypt(Strng)
Strng=Lcase$(Strng)
Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
Edit.Data(1)=Strng
Case 2
Strng=UserRecord.PassWord
Call Decrypt(Strng)
Edit.Data(1)=Lcase$(Strng)
Case 3
Edit.Data(1)=Mid$(Str$(UserRecord.Level),2)
Case 4
Edit.Data(1)=Mid$(Str$(UserRecord.Room),2)
Case 5
If UserRecord.Race<1 Then
UserRecord.Race=1
Endif
Edit.Data(1)=Rtrim$(Race(UserRecord.Race))
Case 6
Select Case UserRecord.ClassType
Case 1
Edit.Data(1)="F"
Case 2
Edit.Data(1)="M"
Case 3
Edit.Data(1)="T"
Case 4
Edit.Data(1)="C"
Case 5
Edit.Data(1)="P"
Case 6
Edit.Data(1)="R"
Case 7
Edit.Data(1)="D"
Case 8
Edit.Data(1)="L"
Case 9
Edit.Data(1)="A"
Case 10
Edit.Data(1)="*"
Case Else
Edit.Data(1)="?"
End Select
Case 7
Select Case UserRecord.Align1
Case Is<False
Edit.Data(1)="Good"
Case Is>False
Edit.Data(1)="Evil"
Case False
Edit.Data(1)="Neutral"
End Select
Case 8
Strng=UserRecord.ClassName
Call Decrypt(Strng)
Edit.Data(1)=Strng
Case 9
Select Case UserRecord.Proficiency
Case 1
Edit.Data(1)="B"
Case 2
Edit.Data(1)="P"
Case 3
Edit.Data(1)="S"
Case 4
Edit.Data(1)="T"
Case Else
Edit.Data(1)="?"
End Select
Case 10
Edit.Data(1)=Mid$(Str$(UserRecord.Weapons(1)),2)
Case 11
Edit.Data(1)=Mid$(Str$(UserRecord.Weapons(2)),2)
Case 12
Edit.Data(1)=Mid$(Str$(UserRecord.Weapons(3)),2)
Case 13
Edit.Data(1)=Mid$(Str$(UserRecord.Weapons(4)),2)
Case 14
Edit.Data(1)=Mid$(Str$(UserRecord.FatigueMax),2)
Case 15
Edit.Data(1)=Mid$(Str$(UserRecord.VitalityMax),2)
Case 16
Edit.Data(1)=Mid$(Str$(UserRecord.MagicMax),2)
Case 17
Edit.Data(1)=Mid$(Str$(UserRecord.PsionicMax),2)
Case 18
Edit.Data(1)=Mid$(Str$(UserRecord.Experience),2)
Case 19
Edit.Data(1)=Mid$(Str$(UserRecord.Gold),2)
Case 20
Edit.Data(1)=Mid$(Str$(UserRecord.NumCalls),2)
Case 21
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(1)),2)
Case 22
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(2)),2)
Case 23
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(3)),2)
Case 24
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(4)),2)
Case 25
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(5)),2)
Case 26
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(6)),2)
Case 27
Edit.Data(1)=Mid$(Str$(UserRecord.Stats(7)),2)
End Select
Strng=Chr$(29)+Chr$(18)+" Cursor Edit "
Out2=Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Call ScreenEdit
Select Case Selection
Case 1
Edit.Data(1)=Rtrim$(Edit.Data(1))
If Lcase$(Edit.Data(1))=Deleted$ Then
Strng=Lcase$(Edit.Data(1))
Else
Strng=Ucase$(Edit.Data(1))
Endif
Call Valid(Strng,30)
If Strng<>Nul Then
Call Encrypt(Strng,True)
UserRecord.CodeName=Strng
Endif
Case 2
Edit.Data(1)=Rtrim$(Edit.Data(1))
If Lcase$(Edit.Data(1))=Deleted$ Then
Strng=Lcase$(Edit.Data(1))
Else
Strng=Ucase$(Edit.Data(1))
Endif
Call Valid(Strng,20)
If Strng<>Nul Then
Call Encrypt(Strng,False)
UserRecord.PassWord=Strng
Endif
Case 3
UserRecord.Level=Val(Edit.Data(1))
Case 4
UserRecord.Room=Val(Edit.Data(1))
Case 5
Edit.Data(1)=Ucase$(Edit.Data(1))
For Temp2=1 To 8
Strng=Ucase$(Rtrim$(Race(Temp2)))
If Left$(Strng,Len(Edit.Data(1)))=Edit.Data(1) Then
UserRecord.Race=Temp2
Exit For
Endif
Next
Case 6
Select Case Ucase$(Edit.Data(1))
Case "F"
UserRecord.ClassType=1
Case "M"
UserRecord.ClassType=2
Case "T"
UserRecord.ClassType=3
Case "C"
UserRecord.ClassType=4
Case "P"
UserRecord.ClassType=5
Case "R"
UserRecord.ClassType=6
Case "D"
UserRecord.ClassType=7
Case "L"
UserRecord.ClassType=8
Case "A"
UserRecord.ClassType=9
Case "*"
UserRecord.ClassType=10
Case Else
UserRecord.ClassType=False
End Select
UserRecord.ClassType=1
Case 7
Strng=Chr$(27)+"[13;12H"
Call Scrn(Strng)
Strng=Space$(7)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;12H"
Call Scrn(Strng)
Select Case Ucase$(Edit.Data(1))
Case "GOOD"
UserRecord.Align1=True
Call Scrn("Good")
Case "EVIL"
UserRecord.Align1=1
Call Scrn("Evil")
Case Else
UserRecord.Align1=False
Call Scrn("Neutral")
End Select
Restore UserEditData2
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Select Case UserRecord.Align2
Case Is<False
Edit.Data(1)="Lawful"
Case Is>False
Edit.Data(1)="Chaotic"
Case False
Edit.Data(1)="Neutral"
End Select
Call ScreenEdit
Select Case Ucase$(Edit.Data(1))
Case "LAWFUL"
UserRecord.Align2=True
Case "CHAOTIC"
UserRecord.Align2=1
Case Else
UserRecord.Align2=False
End Select
Case 8
Strng=Edit.Data(1)
Call Valid(Strng,20)
If Strng<>Nul Then
Call Encrypt(Strng,True)
UserRecord.ClassName=Strng
Endif
Case 9
Select Case Ucase$(Edit.Data(1))
Case "B"
UserRecord.Proficiency=1
Case "P"
UserRecord.Proficiency=2
Case "S"
UserRecord.Proficiency=3
Case "T"
UserRecord.Proficiency=4
Case Else
UserRecord.Proficiency=False
End Select
Case 10
UserRecord.Weapons(1)=Val(Edit.Data(1))
Case 11
UserRecord.Weapons(2)=Val(Edit.Data(1))
Case 12
UserRecord.Weapons(3)=Val(Edit.Data(1))
Case 13
UserRecord.Weapons(4)=Val(Edit.Data(1))
Case 14
UserRecord.FatigueMax=Val(Edit.Data(1))
Case 15
UserRecord.VitalityMax=Val(Edit.Data(1))
Case 16
UserRecord.MagicMax=Val(Edit.Data(1))
Case 17
UserRecord.PsionicMax=Val(Edit.Data(1))
Case 18
UserRecord.Experience=Val(Edit.Data(1))
Case 19
UserRecord.Gold=Val(Edit.Data(1))
Case 20
UserRecord.NumCalls=Val(Edit.Data(1))
Case 21
UserRecord.Stats(1)=Val(Edit.Data(1))
Case 22
UserRecord.Stats(2)=Val(Edit.Data(1))
Case 23
UserRecord.Stats(3)=Val(Edit.Data(1))
Case 24
UserRecord.Stats(4)=Val(Edit.Data(1))
Case 25
UserRecord.Stats(5)=Val(Edit.Data(1))
Case 26
UserRecord.Stats(6)=Val(Edit.Data(1))
Case 27
UserRecord.Stats(7)=Val(Edit.Data(1))
End Select
10081
Exit Sub
10082
Resume 10081
End Sub
Sub ShowMonclass
On Local Error Goto 10092
If TempX=False Then
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;11H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[2;2H"
Call Scrn(Strng)
Strng="Monclass"+Str$(Monclass)
Call Scrn(Strng)
Endif
If TempX>False Then
Temp3=MonclassRecord.Monsters(TempX)
If Temp3<1 Or Temp3>Lof(7)/Len(MonsterRecord) Then
MonclassRecord.Monsters(TempX)=False
If Temp3>False Then
Strng="The monster number is not within the monster file range."
Call MonclassErrorMessage
Endif
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(TempX*2+1),2)+";13H
Call Scrn(Strng)
Strng="0"+Space$(4)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(TempX*2+2),2)+";2H"
Call Scrn(Strng)
Strng=Space$(60)
Call Scrn(Strng)
Else
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(TempX*2+1),2)+";13H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(TempX*2+1),2)+";13H"
Call Scrn(Strng)
Strng=Mid$(Str$(Temp3),2)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Get 7,Temp3,MonsterRecord
Temp1=TempX*2+2
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";2H"
Call Scrn(Strng)
Strng=MonsterRecord.MonsterName
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";20H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";20H"
Call Scrn(Strng)
Strng=Mid$(Str$(MonsterRecord.Hits),2)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";30H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";30H"
Call Scrn(Strng)
Strng=Mid$(Str$(MonsterRecord.Experience),2)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";40H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";40H"
Call Scrn(Strng)
Strng=Mid$(Str$(MonsterRecord.Level),2)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";50H"
Call Scrn(Strng)
If MonsterRecord.Poison Then
Call Scrn("Y")
Else
Call Scrn("N")
Endif
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";52H"
Call Scrn(Strng)
If MonsterRecord.LevelDrain Then
Call Scrn("Y")
Else
Call Scrn("N")
Endif
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";54H"
Call Scrn(Strng)
If MonsterRecord.Block Then
Call Scrn("Y")
Else
Call Scrn("N")
Endif
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";56H"
Call Scrn(Strng)
If MonsterRecord.Prevent Then
Call Scrn("Y")
Else
Call Scrn("N")
Endif
Strng=Chr$(27)+"["+Mid$(Str$(Temp1),2)+";58H"
Call Scrn(Strng)
If MonsterRecord.Follow Then
Call Scrn("Y")
Else
Call Scrn("N")
Endif
Endif
Endif
10091
Exit Sub
10092
Resume 10091
End Sub
Sub MonclassScreen
On Local Error Goto 10102
Out3="Sysop Monclass Edit"
Call DisplayBorder(Out3)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[3;2H"
Call Scrn(Strng)
Strng="Monster 1"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
For Temp2=2 To 10
Strng=Chr$(27)+"["+Mid$(Str$(Temp2*2+1),2)+";2H"
Call Scrn(Strng)
Strng="Monster "+Mid$(Str$(Temp2),2)
Call Scrn(Strng)
Next
Selection=1
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;20H"
Call Scrn(Strng)
Strng="Hits"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;30H"
Call Scrn(Strng)
Strng="Exp"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;40H"
Call Scrn(Strng)
Strng="Lvl"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;50H"
Call Scrn(Strng)
Strng="P D B P F"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;61H"
Call Scrn(Strng)
Strng="P)oison"
Call Scrn(Strng)
Strng=Chr$(27)+"[3;61H"
Call Scrn(Strng)
Strng="D)rain"
Call Scrn(Strng)
Strng=Chr$(27)+"[4;61H"
Call Scrn(Strng)
Strng="B)lock"
Call Scrn(Strng)
Strng=Chr$(27)+"[5;61H"
Call Scrn(Strng)
Strng="P)revent"
Call Scrn(Strng)
Strng=Chr$(27)+"[6;61H"
Call Scrn(Strng)
Strng="F)ollow"
Call Scrn(Strng)
10101
Exit Sub
10102
Resume 10101
End Sub
Sub ShowRoomLink
On Local Error Goto 10112
If TempX=False Then
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;2H"
Call Scrn(Strng)
Strng="Room Number"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;14H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[2;14H"
Call Scrn(Strng)
Strng=Mid$(Str$(Room.Link),2)
Call Scrn(Strng)
Strng=Chr$(27)+"[11;38H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Temp2=40-Int(Len(Mid$(Str$(Room.Link),2))/2-.5)
Strng=Chr$(27)+"[11;"+Mid$(Str$(Temp2),2)+"H"
Call Scrn(Strng)
Strng=Mid$(Str$(Room.Link),2)
Call Scrn(Strng)
Endif
If TempX>False Then
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Link.Data(TempX,1)),2)+";"+_
Mid$(Str$(Link.Data(TempX,2)),2)+"H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Link.Data(TempX,1)),2)+";"+_
Mid$(Str$(Link.Data(TempX,2)),2)+"H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(TempX)),2)
Call Scrn(Strng)
Endif
10111
Exit Sub
10112
Resume 10111
End Sub
Sub DisplayRoomLink
On Local Error Goto 10122
Out3="Sysop Room Link Edit"
Call DisplayBorder(Out3)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;2H"
Call Scrn(Strng)
Strng="Room Number"
Call Scrn(Strng)
Room.Link=1
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[9;36H"
Call Scrn(Strng)
Strng="\ | /"
Call Scrn(Strng)
Strng=Chr$(27)+"[10;37H"
Call Scrn(Strng)
Strng="\ | /"
Call Scrn(Strng)
Strng=Chr$(27)+"[11;35H"
Call Scrn(Strng)
Strng="---"
Call Scrn(Strng)
Strng=Chr$(27)+"[11;43H"
Call Scrn(Strng)
Strng="---"
Call Scrn(Strng)
Strng=Chr$(27)+"[12;37H"
Call Scrn(Strng)
Strng="/ | \"
Call Scrn(Strng)
Strng=Chr$(27)+"[13;36H"
Call Scrn(Strng)
Strng="/ | \"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"["+Mid$(Str$(Array.Data(1,1)),2)+";"+_
Mid$(Str$(Array.Data(1,2)),2)+"H"
Call Scrn(Strng)
Strng=Title.Data(1)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
For Temp2=2 To 11
Strng=Chr$(27)+"["+Mid$(Str$(Array.Data(Temp2,1)),2)+";"+_
Mid$(Str$(Array.Data(Temp2,2)),2)+"H"
Call Scrn(Strng)
Strng=Title.Data(Temp2)
Call Scrn(Strng)
Next
Selection=1
10121
Exit Sub
10122
Resume 10121
End Sub
Sub DisplayMonclass
On Local Error Goto 10132
If Monclass>False And Monclass<=Lof(10)/Len(MonclassRecord) Then
Get 10,Monclass,MonclassRecord
For TempX=0 To 10
Call ShowMonclass
Next
Endif
Call MonclassField
10131
Exit Sub
10132
Resume 10131
End Sub
Sub EditMonclass
On Local Error Goto 10142
Monclass=1
If Lof(10)=False Then
Call AddMonclass
Endif
Call MonclassScreen
Call MonclassStatusLine
Call DisplayMonclass
Do
TempX$=Inkey$
While TempX$=Nul
TempX$=Inkey$
Wend
TempX=False
Select Case Len(TempX$)
Case 2
TempX=Asc(Mid$(TempX$,2,1))
Call MonclassSelect
Case 1
TempX=Asc(TempX$)
Select Case TempX
Case 1
Call AddMonclass
Case 8
Call Help(8)
Call MonclassScreen
Call MonclassStatusLine
Call DisplayMonclass
Case 13
Call EditSelectedMonclass
Case 14
Call NextMonclass
Case 17
Call PreviousMonclass
Case 18
Call SelectNextMonclass
Call MonclassStatusLine
Case 19
Call SearchMonclass
Case 27
Put 10,Monclass,MonclassRecord
Exit Sub
End Select
End Select
Loop
10141
Exit Sub
10142
Resume 10141
End Sub
Sub EditSelectedMonclass
On Local Error Goto 10152
Strng=Nul
Out2=Chr$(60)+Chr$(217)+" Exit Field "+Chr$(29)+" Cursor Edit"
Call StatusLine
Xcoor=Selection*2+1
Row=Xcoor
Restore MonclassData1
Read Ycoor, Column, Line.Length, Max.Lines, Line.Number
Edit.Data(1)=Mid$(Str$(MonclassRecord.Monsters(Selection)),2)
Call ScreenEdit
MonclassRecord.Monsters(Selection)=Val(Edit.Data(1))
Put 10,Monclass,MonclassRecord
TempX=Selection
Call ShowMonclass
Call MonclassStatusLine
Call MonclassField
10151
Exit Sub
10152
Resume 10151
End Sub
Sub NextMonclass
On Local Error Goto 10162
If Monclass>Lof(10)/Len(MonclassRecord) Then
Strng="This is the last monclass in the monclass file."
Call MonclassErrorMessage
Exit Sub
Endif
Put 10,Monclass,MonclassRecord
Monclass=Monclass+1
Call DisplayMonclass
10161
Exit Sub
10162
Resume 10161
End Sub
Sub PreviousMonclass
On Local Error Goto 10172
If Monclass<=1 Then
Strng="This is the first monclass in the monclass file."
Call MonclassErrorMessage
Exit Sub
Endif
Put 10,Monclass,MonclassRecord
Monclass=Monclass-1
Call DisplayMonclass
10171
Exit Sub
10172
Resume 10171
End Sub
Sub SelectNextMonclass
On Local Error Goto 10182
Strng=Nul
Out2=Chr$(60)+Chr$(217)+" Exit Field "+Chr$(29)+" Cursor Edit"
Call StatusLine
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;2H"
Call Scrn(Strng)
Strng="Enter Monclass: "
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;18H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;24H"
Call Scrn(Strng)
Strng="(1-"+Mid$(Str$(Lof(10)/Len(MonclassRecord)),2)+")"
Call Scrn(Strng)
Restore MonclassData2
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Edit.Data(1)=Nul
Call ScreenEdit
Temp2=Val(Edit.Data(1))
If Temp2<1 Or Temp2>Lof(10)/Len(MonclassRecord) Then
Strng="The monclass number is not within the monclass file range."
Call MonclassErrorMessage
Exit Sub
Endif
Put 10,Monclass,MonclassRecord
Monclass=Temp2
Call DisplayMonclass
10181
Exit Sub
10182
Resume 10181
End Sub
Sub SearchMonclass
On Local Error Goto 10192
Put 10,Monclass,MonclassRecord
Strng=Nul
Out2=Chr$(29)+" Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field "
Out2=Out2+"Append # sign and number for duplicate monsters"
Call StatusLine
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;2H"
Call Scrn(Strng)
Strng="Enter Monster Name or Number: "
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;32H"
Call Scrn(Strng)
Strng=Space$(30)
Call Scrn(Strng)
Restore MonclassData3
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Edit.Data(1)=Nul
Call ScreenEdit
Call MonclassStatusLine
Temp2=Val(Edit.Data(1))
If Temp2 Then
For Temp4=1 To Lof(10)/Len(MonclassRecord)
Get 10,Temp4,MonclassRecord
For Temp3=1 To 10
Temp5=MonclassRecord.Monsters(Temp3)
If Temp5>False And Temp5<=Lof(7)/Len(MonsterRecord) Then
If Temp5=Temp2 Then
Monclass=Temp4
Call DisplayMonclass
Exit Sub
Endif
Endif
Next
Next
Endif
Temp$=Lcase$(Edit.Data(1))
Temp.Index=False
Temp1=Instr(Temp$,"#")
If Temp1 Then
Temp.Index=Val(Mid$(Temp$,Temp1+1))
Temp$=Left$(Temp$,Temp1-1)
Endif
Temp6=Len(Temp$)
Temp5=False
For Temp2=1 To Lof(10)/Len(MonclassRecord)
Get 10,Temp2,MonclassRecord
For Temp3=1 To 10
Temp4=MonclassRecord.Monsters(Temp3)
If Temp4>False And Temp4<=Lof(7)/Len(MonsterRecord) Then
Get 7,Temp4,MonsterRecord
If Left$(MonsterRecord.MonsterName,Temp6)=Temp$ Then
Temp5=Temp5+1
If Temp5=Temp.Index Or Temp.Index=False Then
Monclass=Temp2
Call DisplayMonclass
Exit Sub
Endif
Endif
Endif
Next
Next
Strng="The monster name was not found in the monclass file."
Call MonclassErrorMessage
Get 10,Monclass,MonclassRecord
10191
Exit Sub
10192
Resume 10191
End Sub
Sub MonclassStatusLine
On Local Error Goto 10202
Strng=Chr$(29)+Chr$(18)+" Cursor Select "+Chr$(60)+Chr$(217)
Strng=Strng+" Enter Choice <esc> Exit and Save ^h Help ^a Add Record"
Out2="^r Select Monclass ^n Next Monclass "
Out2=Out2+"^q Previous Monclass ^s Search Monclass"
Call StatusLine
10201
Exit Sub
10202
Resume 10201
End Sub
Sub AddMonclass
On Local Error Goto 10212
Monclass=Lof(10)/Len(MonclassRecord)+1
For Temp2=1 To 10
MonclassRecord.Monsters(Temp2)=False
Next
Put 10,Monclass,MonclassRecord
Call DisplayMonclass
10211
Exit Sub
10212
Resume 10211
End Sub
Sub MonclassErrorMessage
On Local Error Goto 10222
TempX$=Strng+" Press <esc>."
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;2H"
Call Scrn(Strng)
Strng=Space$(78)
Call Scrn(Strng)
Strng=Chr$(27)+"[24;2H"
Call Scrn(Strng)
Strng=Space$(78)
Call Scrn(Strng)
Strng=Chr$(27)+"[24;2H"
Call Scrn(Strng)
Call Scrn(TempX$)
While Inkey$<>Chr$(27)
Wend
Call MonclassStatusLine
Call MonclassField
10221
Exit Sub
10222
Resume 10221
End Sub
Sub DisplayRoomLinkScreen
On Local Error Goto 10232
If Room.Link>False And Room.Link<=Lof(5)/Len(RoomRecord) Then
Get 5,Room.Link,RoomRecord
For TempX=0 To 11
Call ShowRoomLink
Next
Call RedisplayField
Endif
10231
Exit Sub
10232
Resume 10231
End Sub
Sub EditLink
On Local Error Goto 10242
Restore LinkData
For Temp2=1 To 11
Read Title.Data(Temp2)
Next
For Temp2=1 To 11
Read Array.Data(Temp2,1),Array.Data(Temp2,2)
Next
For Temp2=1 To 11
Read Link.Data(Temp2,1),Link.Data(Temp2,2)
Next
If Lof(5)=False Then
Call AddRoom
Endif
Call DisplayRoomLink
Call RoomLinkStatusLine
Call DisplayRoomLinkScreen
Do
TempX$=Inkey$
While TempX$=Nul
TempX$=Inkey$
Wend
TempX=False
Select Case Len(TempX$)
Case 2
TempX=Asc(Mid$(TempX$,2,1))
Call RoomLinkSelect
Case 1
TempX=Asc(TempX$)
Select Case TempX
Case 4
Call DeleteLinks
Case 8
Call Help(9)
Call DisplayRoomLink
Call RoomLinkStatusLine
Call DisplayRoomLinkScreen
Case 9
Call RoomLinkSelect
Case 10
Call JumpLink
Case 13
Call EditSelectedRoomLink
Case 14
Call NextRoomLink
Case 17
Call PreviousRoomLink
Case 18
Call SelectNextRoomLink
Call RoomLinkStatusLine
Case 27
Put 5,Room.Link,RoomRecord
Exit Sub
End Select
End Select
Loop
10241
Exit Sub
10242
Resume 10241
End Sub
Sub DeleteLinks
On Local Error Goto 10252
For Temp6=1 To 11
RoomRecord.Direct(Temp6)=False
Next
Put 5,Room.Link,RoomRecord
Call DisplayRoomLinkScreen
10251
Exit Sub
10252
Resume 10251
End Sub
Sub JumpLink
On Local Error Goto 10262
If RoomRecord.Direct(Selection)>False Then
If RoomRecord.Direct(Selection)<=Lof(5)/Len(RoomRecord) Then
Put 5,Room.Link,RoomRecord
Room.Link=RoomRecord.Direct(Selection)
Call DisplayRoomLinkScreen
Exit Sub
Endif
Endif
Strng="The room number is not within the room file range."
Call ErrorMessage
10261
Exit Sub
10262
Resume 10261
End Sub
Sub EditSelectedRoomLink
On Local Error Goto 10272
Strng=Nul
Out2=Chr$(60)+Chr$(217)+" Exit Field "+Chr$(29)+" Cursor Edit"
Call StatusLine
Xcoor=Link.Data(Selection,1)
Ycoor=Link.Data(Selection,2)
Row=Xcoor
Column=Ycoor
Restore RoomLinkData1
Read Line.Length, Max.Lines, Line.Number
Edit.Data(1)=Mid$(Str$(RoomRecord.Direct(Selection)),2)
Call ScreenEdit
RoomRecord.Direct(Selection)=Val(Edit.Data(1))
Put 5,Room.Link,RoomRecord
TempX=Selection
Call ShowRoomLink
Call RoomLinkStatusLine
Call RedisplayField
10271
Exit Sub
10272
Resume 10271
End Sub
Sub NextRoomLink
On Local Error Goto 10282
If Room.Link<Lof(5)/Len(RoomRecord) Then
Put 5,Room.Link,RoomRecord
Room.Link=Room.Link+1
Call DisplayRoomLinkScreen
Exit Sub
Endif
Strng="That is the last room number in the room file."
Call ErrorMessage
10281
Exit Sub
10282
Resume 10281
End Sub
Sub PreviousRoomLink
On Local Error Goto 10292
If Room.Link>1 Then
Put 5,Room.Link,RoomRecord
Room.Link=Room.Link-1
Call DisplayRoomLinkScreen
Exit Sub
Endif
Strng="That is the first room number in the room file."
Call ErrorMessage
10291
Exit Sub
10292
Resume 10291
End Sub
Sub SelectNextRoomLink
On Local Error Goto 10302
Strng=Nul
Out2=Chr$(29)+" Cursor Edit "+Chr$(60)+Chr$(217)+" Exit Field"
Call StatusLine
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;2H"
Call Scrn(Strng)
Strng="Enter Room: "
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;14H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[23;20H"
Call Scrn(Strng)
Strng="(1-"+Mid$(Str$(Lof(5)/Len(RoomRecord)),2)+")"
Call Scrn(Strng)
Restore RoomLinkData2
Read Xcoor, Ycoor, Column, Line.Length, Max.Lines, Row, Line.Number
Edit.Data(1)=Nul
Call ScreenEdit
Temp2=Val(Edit.Data(1))
If Temp2<1 Or Temp2>Lof(5)/Len(RoomRecord) Then
Strng="The room number is not within the room file range."
Call ErrorMessage
Exit Sub
Endif
Put 5,Room.Link,RoomRecord
Room.Link=Temp2
Call DisplayRoomLinkScreen
10301
Exit Sub
10302
Resume 10301
End Sub
Sub RoomLinkStatusLine
On Local Error Goto 10312
Strng=Chr$(29)+Chr$(18)+" Cursor Select "+Chr$(60)+Chr$(217)
Strng=Strng+" Enter Choice <esc> Exit and Save ^h Help"
Out2="^n Next Room ^q Prev Room ^r Select Room "
Out2=Out2+"^j Jump Room Link ^d Delete Links"
Call StatusLine
10311
Exit Sub
10312
Resume 10311
End Sub
Sub ShowRoom
On Local Error Goto 10322
Select Case TempX
Case 0
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;2H"
Call Scrn(Strng)
Strng="Room"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;7H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[2;7H"
Call Scrn(Strng)
Strng=Mid$(Str$(Room.Number),2)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[12;2H"
Call Scrn(Strng)
Strng="Room Links"
Call Scrn(Strng)
Room.Treasure=False
Room.Objects=False
For Temp2=1 To 10
If RoomRecord.Treasure(Temp2)>False Then
Room.Treasure=Room.Treasure+1
Endif
If RoomRecord.Object(Temp2)>False Then
Room.Objects=Room.Objects+1
Endif
Next
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;13H"
Call Scrn(Strng)
Strng="Treasure"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;22H"
Call Scrn(Strng)
Strng=" "
Call Scrn(Strng)
Strng=Chr$(27)+"[2;22H"
Call Scrn(Strng)
Strng=Mid$(Str$(Room.Treasure),2)
Call Scrn(Strng)
Strng=Chr$(27)+"[1;33;44m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;25H"
Call Scrn(Strng)
Strng="Objects"
Call Scrn(Strng)
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Strng=Chr$(27)+"[2;33H"
Call Scrn(Strng)
Strng=" "
Call Scrn(Strng)
Strng=Chr$(27)+"[2;33H"
Call Scrn(Strng)
Strng=Mid$(Str$(Room.Objects),2)
Call Scrn(Strng)
Case Else
Strng=Chr$(27)+"[1;37;40m"
Call Scrn(Strng)
Select Case TempX
Case 1
Strng=Chr$(27)+"[4;2H"
Call Scrn(Strng)
Strng=RoomRecord.ShortDesc
Call Scrn(Strng)
Case 2
For Temp2=1 To 4
Strng=Chr$(27)+"["+Mid$(Str$(Temp2+6),2)+";2H"
Call Scrn(Strng)
Strng=RoomRecord.LongDesc(Temp2)
Call Scrn(Strng)
Next
Case 3
Strng=Chr$(27)+"[13;8H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;8H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(1)),2)
Call Scrn(Strng)
Case 4
Strng=Chr$(27)+"[13;19H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;19H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(2)),2)
Call Scrn(Strng)
Case 5
Strng=Chr$(27)+"[13;31H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;31H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(3)),2)
Call Scrn(Strng)
Case 6
Strng=Chr$(27)+"[13;42H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;42H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(4)),2)
Call Scrn(Strng)
Case 7
Strng=Chr$(27)+"[13;52H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;52H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(5)),2)
Call Scrn(Strng)
Case 8
Strng=Chr$(27)+"[13;61H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;61H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(6)),2)
Call Scrn(Strng)
Case 9
Strng=Chr$(27)+"[13;72H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[13;72H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(7)),2)
Call Scrn(Strng)
Case 10
Strng=Chr$(27)+"[15;12H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[15;12H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(8)),2)
Call Scrn(Strng)
Case 11
Strng=Chr$(27)+"[15;28H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[15;28H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(9)),2)
Call Scrn(Strng)
Case 12
Strng=Chr$(27)+"[15;44H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[15;44H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(10)),2)
Call Scrn(Strng)
Case 13
Strng=Chr$(27)+"[15;60H"
Call Scrn(Strng)
Strng=Space$(5)
Call Scrn(Strng)
Strng=Chr$(27)+"[15;60H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.Direct(11)),2)
Call Scrn(Strng)
Case 14
Strng=Chr$(27)+"[17;11H"
Call Scrn(Strng)
Strng=Space$(4)
Call Scrn(Strng)
Strng=Chr$(27)+"[17;11H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.MonsterClass),2)
Call Scrn(Strng)
Case 15
Strng=Chr$(27)+"[17;26H"
Call Scrn(Strng)
Strng=Space$(4)
Call Scrn(Strng)
Strng=Chr$(27)+"[17;26H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.RustRate),2)
Call Scrn(Strng)
Case 16
Strng=Chr$(27)+"[19;13H"
Call Scrn(Strng)
Strng=Space$(4)
Call Scrn(Strng)
Strng=Chr$(27)+"[19;13H"
Call Scrn(Strng)
Strng=Mid$(Str$(RoomRecord.StealRate),2)
Call Scrn(Strng)
End Select
End Select
10321
Exit Sub
10322
Resume 10321
End Sub
Sub Valid(Var$,Var)
On Local Error Goto 10332
If Len(Var$)/2<>Len(Var$)\2 Then
Var$=Var$+" "
Endif
If Var/2<>Var\2 Then
Var=Var+1
Endif
Var$=Left$(Var$,Var)
Var$=Var$+Space$(Var-Len(Var$))
For Var1=1 To Var
Var2=Asc(Mid$(Var$,Var1,1))
If Var2<32 Or Var2>127 Then
Var$=Nul
Exit Sub
Endif
Next
10331
Exit Sub
10332
Resume 10331
End Sub
Sub Encrypt(Var$,Var)
On Local Error Goto 10342
Var1$=Nul
For Var2=1 To Len(Var$) Step 2
Var1=0
VarA=Asc(Mid$(Var$,Var2,1))
VarB=Asc(Mid$(Var$,Var2+1,1))
If Var Then
Var1=20000
Else
If (VarA+VarB)/2=(VarA+VarB)\2 Then
Var1=10000
Endif
Endif
Var1=Var1+(VarA-32)*100+(VarB-32)
Var1$=Var1$+Mki$(Var1)
Next
Var$=Var1$
10341
Exit Sub
10342
Resume 10341
End Sub
Sub Decrypt(Var$)
On Local Error Goto 10352
Var1$=Nul
For Var=1 To Len(Var$) Step 2
Var1=Cvi(Mid$(Var$,Var,2))
Var2=Var1\100
VarA=Var1-Var2*100
Var1=Var2
VarA=VarA+32
Var2=Var1\100
VarB=Var1-Var2*100
VarB=VarB+32
If Var2=0 Then
If ((VarA+VarB)/2)=((VarA+VarB)\2) Then
Var$=Nul
Exit Sub
Endif
Endif
If Var2=1 Then
If ((VarA+VarB)/2)<>((VarA+VarB)\2) Then
Var$=Nul
Exit Sub
Endif
Endif
Var1$=Var1$+Chr$(VarB)+Chr$(VarA)
Next
Var$=Var1$
10351
Exit Sub
10352
Resume 10351
End Sub
LinkData:
Data "North","East","South","West","Out","Up","Down"
Data "Northeast","Southeast","Southwest","Northwest"
Data 7,38,11,52,15,38,11,25,7,58,10,58,13,58,7,45,15,45,15,27,7,27,8,38,11,46
Data 14,38,11,30,8,58,11,58,14,58,8,45,14,45,14,31,8,31
RoomEditData:
Data 4,2,2,78,1,4,1
Data 7,2,2,78,4,7,1
Data 13,8,8,5,1,13,1
Data 13,19,19,5,1,13,1
Data 13,31,31,5,1,13,1
Data 13,42,42,5,1,13,1
Data 13,52,52,5,1,13,1
Data 13,61,61,5,1,13,1
Data 13,72,72,5,1,13,1
Data 15,12,12,5,1,15,1
Data 15,28,28,5,1,15,1
Data 15,44,44,5,1,15,1
Data 15,60,60,5,1,15,1
Data 17,10,10,4,1,17,1
Data 17,26,26,4,1,17,1
Data 19,13,13,4,1,19,1
ObjectEditData:
Data 4,2,2,30,1,4,1
Data 7,2,2,30,1,7,1
Data 9,12,12,5,1,9,1
Data 11,10,10,1,1,11,1
Data 11,25,25,5,1,11,1
Data 13,13,13,5,1,13,1
Data 16,2,2,78,1,16,1
Data 19,2,2,40,1,19,1
Data 3,57,57,1,1,3,1
Data 5,60,60,1,1,5,1
Data 7,60,60,1,1,7,1
Data 9,57,57,1,1,9,1
Data 11,58,58,1,1,11,1
Data 13,60,60,1,1,13,1
Data 15,65,65,1,1,15,1
Data 17,59,59,1,1,17,1
Data 19,50,50,5,1,19,1
TreasureEditData:
Data 4,2,2,30,1,4,1
Data 6,2,2,30,1,6,1
Data 8,9,9,5,1,8,1
Data 10,8,8,5,1,10,1
Data 12,7,7,5,1,12,1
Data 14,10,10,5,1,14,1
Data 16,17,17,1,1,16,1
Data 18,16,16,1,1,18,1
Data 3,26,26,1,1,3,1
Data 5,27,27,1,1,5,1
Data 7,27,27,1,1,7,1
Data 9,30,30,1,1,9,1
Data 11,29,29,1,1,11,1
Data 13,31,31,5,1,13,1
Data 15,31,31,1,1,15,1
Data 17,31,31,5,1,17,1
Data 19,28,28,1,1,19,1
Data 4,40,40,20,1,4,1
Data 5,45,45,1,1,5,1
Data 8,40,40,1,1,8,1
Data 10,40,40,20,1,20,1
Data 11,51,51,1,1,9,1
Data 13,55,55,5,1,11,1
Data 14,49,49,8,1,13,1
Data 17,47,47,1,1,15,1
Data 19,47,47,1,1,19,1
Data 3,71,71,1,1,3,1
Data 5,75,75,3,1,5,1
Data 7,72,72,1,1,7,1
Data 9,76,76,3,1,9,1
Data 11,73,73,1,1,11,1
Data 13,75,75,3,1,13,1
Data 15,74,74,1,1,15,1
Data 17,70,70,1,1,17,1
MonsterEditData:
Data 4,2,2,30,1,4,1
Data 7,2,2,30,1,7,1
Data 9,8,8,5,1,9,1
Data 11,7,7,5,1,11,1
Data 13,13,13,5,1,13,1
Data 15,2,2,30,5,15,1
Data 21,10,10,1,1,21,1
Data 21,22,22,20,1,21,1
Data 3,58,58,5,1,3,1
Data 5,52,52,1,1,5,1
Data 5,68,68,3,1,5,1
Data 7,57,57,1,1,7,1
Data 7,68,68,3,1,7,1
Data 9,51,51,1,1,9,1
Data 9,68,68,3,1,9,1
Data 11,53,53,1,1,11,1
Data 11,68,68,3,1,11,1
Data 13,52,52,1,1,13,1
Data 13,68,68,3,1,13,1
Data 13,72,72,3,1,13,1
Data 15,56,56,1,1,15,1
Data 15,68,68,3,1,15,1
Data 17,51,51,20,1,17,1
Data 19,53,53,1,1,19,1
Data 19,65,65,1,1,21,1
Data 20,54,54,1,1,20,1
MonsterEditData2:
Data 21,45,45,35,1,21,1
SpellEditData:
Data 4,2,2,30,1,4,1
Data 6,16,16,5,1,6,1
Data 8,8,8,2,1,8,1
Data 8,22,22,2,1,8,1
Data 10,16,16,1,1,10,1
Data 12,20,20,1,1,12,1
Data 13,11,11,1,1,13,1
Data 16,2,2,78,1,16,1
Data 18,2,2,78,1,18,1
Data 20,10,10,1,1,20,1
Data 20,23,23,1,1,20,1
Data 20,31,31,1,1,20,1
Data 20,40,40,1,1,20,1
Data 20,50,50,1,1,20,1
Data 20,59,59,1,1,20,1
Data 20,67,67,1,1,20,1
Data 20,75,75,1,1,20,1
Data 4,49,49,30,5,4,1
Data 10,61,61,1,1,10,1
Data 12,56,56,1,1,12,1
Data 14,62,62,1,1,14,1
SpellEditData2:
Data 14,2,2,40,1,14,1
ActionEditData:
Data 4,17,17,5,1,4,1
Data 6,18,18,5,1,6,1
Data 8,14,14,5,1,8,1
Data 11,2,2,30,1,11,1
Data 13,14,14,5,1,13,1
Data 15,16,16,3,1,15,1
Data 18,8,8,1,1,18,1
Data 18,15,15,1,1,18,1
Data 18,23,23,1,1,18,1
Data 18,30,30,1,1,18,1
Data 18,36,36,1,1,18,1
Data 18,41,41,1,1,18,1
Data 18,48,48,1,1,18,1
Data 18,53,53,1,1,18,1
Data 18,58,58,1,1,18,1
Data 18,63,63,1,1,18,1
Data 18,68,68,1,1,18,1
Data 18,76,76,1,1,18,1
Data 4,62,62,5,1,4,1
Data 6,65,65,5,1,6,1
Data 8,57,57,1,1,8,1
Data 10,77,77,1,1,10,1
Data 12,64,64,1,1,12,1
Data 13,67,67,5,1,13,1
Data 15,60,60,4,1,15,1
Data 15,76,76,4,1,15,1
UserEditData:
Data 4,2,2,30,1,4,1
Data 6,2,2,30,1,6,1
Data 8,2,2,5,1,8,1
Data 10,2,2,5,1,10,1
Data 11,7,7,10,1,11,1
Data 12,29,29,1,1,12,1
Data 13,12,12,7,1,13,1
Data 15,2,2,20,1,15,1
Data 16,30,30,1,1,16,1
Data 17,7,7,3,1,17,1
Data 17,17,17,3,1,17,1
Data 17,27,27,3,1,17,1
Data 17,41,41,3,1,17,1
Data 19,10,10,5,1,19,1
Data 19,25,25,5,1,19,1
Data 19,37,37,5,1,19,1
Data 21,17,17,5,1,21,1
Data 3,54,54,22,1,3,1
Data 5,55,55,22,1,5,1
Data 7,62,62,3,1,7,1
Data 9,59,59,5,1,9,1
Data 11,63,63,5,1,11,1
Data 13,57,57,5,1,13,1
Data 15,60,60,5,1,15,1
Data 17,63,63,5,1,17,1
Data 19,56,56,5,1,19,1
Data 21,59,59,5,1,21,1
UserEditData2:
Data 13,20,20,7,1,13,1
NonplayerEditData:
Data 4,2,2,30,1,4,1
Data 7,2,2,30,1,7,1
Data 9,8,8,5,1,9,1
Data 11,7,7,5,1,11,1
Data 13,13,13,5,1,13,1
Data 15,2,2,30,5,15,1
Data 21,10,10,1,1,21,1
Data 21,22,22,20,1,21,1
Data 3,58,58,5,1,3,1
Data 5,52,52,1,1,5,1
Data 5,68,68,3,1,5,1
Data 7,57,57,1,1,7,1
Data 7,68,68,3,1,7,1
Data 9,51,51,1,1,9,1
Data 9,68,68,3,1,9,1
Data 11,53,53,1,1,11,1
Data 11,68,68,3,1,11,1
Data 13,52,52,1,1,13,1
Data 13,68,68,3,1,13,1
Data 13,72,72,3,1,13,1
Data 15,56,56,1,1,15,1
Data 15,68,68,3,1,15,1
Data 17,51,51,20,1,17,1
MonclassData1:
Data 13,13,5,1,1
MonclassData2:
Data 23,18,18,5,1,23,1
MonclassData3:
Data 23,32,32,30,1,23,1
RoomLinkData1:
Data 5,1,1
RoomLinkData2:
Data 23,14,14,5,1,23,1