 Rem File: Editcmd1 for Dndbbs Version v5.0a Release r2.0
 Rem $Include: 'edit.inc'

 On Error Goto ErrMain0
 If Chained2=False Then
    Call Open.Arrays
    Call Get.Config
    Call Increase.Files
    Call Make.FileNames
    Call Open.Files
    Call Reset.Cursor
    Call Detect.Share
    Call Save.Screen2(0)
    Call Passwrd9(Var,"1")
    If Var=False Then
       Call Terminate.Program
       End
    Endif
 Endif
 Call Edit.Action
MainExit0:
 End
ErrMain0:
 Resume MainExit0
 End

Sub Edit.Action
 On Local Error Goto ErrResume29
 Call Edit.Status.Line
 If Lof(ActionFile)=False Then
    Call Add.Action
 Endif
 Do While Lost.Carrier=False
    If TempC=False Then
       Graphics.Off=False
       Strng="Action Edit utility v"+Left$(Version$,4)+" menu:"
       Call IO.O
       Graphics.Off=True
       Strng=RT$(19,"[A]")+"dd"
       Call IO.O
       Strng=RT$(20,"[C]")+"hange"
       Call IO.O
       Strng=RT$(21,"[L]")+"ist"
       Call IO.O
       If Local.Mode Then
          Strng=RT$(582,"[P]")+"rint"
          Call IO.O
       Endif
       Graphics.Off=False
    Endif
    Strng="Action edit option(q to quit)? "
    Line.Length=TempD
    No.Input.Out="Q"
    Call IO.I
    Select Case Ucase$(Out2)
    Case "A"
       If RT$(19,"[A]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Call Add.Action
          Temp!=Lof(ActionFile)/ActionRecLen
          Call Change.Action
       Endif
    Case "C"
       If RT$(20,"[C]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Call Find.Action
          If Temp! Then
             Call Change.Action
          Endif
       Endif
    Case "L"
       If RT$(21,"[L]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Call List.Action
       Endif
    Case "P"
       If Local.Mode Then
          If RT$(582,"[P]")="[*]" Then
             Strng="Command restricted.."
             Call IO.O
          Else
             Call Print.Actions
          Endif
       Endif
    Case "Q"
       Exit Do
    End Select
 Loop
 Close
 Call Clear.Status.Line
 If Chained2 Then
    Chain DND.Path+"EDIT.EXE"
 Endif
 Call Terminate.Program
ErrExit29:
 Exit Sub
ErrResume29:
 Resume ErrExit29
End Sub

Sub Change.Action
 On Local Error Goto ErrResume30
 Call Read.Record(ActionFile,Temp!)
 Do While Lost.Carrier=False
    Graphics.Off=True
    Strng="Editing action #"+Mid$(Str$(Temp!),2)+"."
    Call IO.O
    If TempC=False Then
       Graphics.Off=False
       Strng="Triggers:"
       Call IO.O
       Graphics.Off=True
       Strng=RT$(22,"[E]")+"ncounter\attack monster"
       Call IO.O
       Strng=RT$(23,"[S]")+"pells"
       Call IO.O
       Strng=RT$(24,"[M]")+"onster talk"
       Call IO.O
       Strng=RT$(25,"[L]")+"evel entry"
       Call IO.O
       Graphics.Off=False
       Strng="Results:"
       Call IO.O
       Graphics.Off=True
       Strng=RT$(26,"[H]")+"ealth"
       Call IO.O
       Strng=RT$(27,"[R]")+"ate"
       Call IO.O
       Strng=RT$(28,"[I]")+"nventory"
       Call IO.O
       Strng=RT$(29,"[F]")+"umble"
       Call IO.O
       Strng=RT$(30,"[T]")+"eleport"
       Call IO.O
       Graphics.Off=False
       Strng="Other:"
       Call IO.O
       Graphics.Off=True
       Strng=RT$(31,"[A]")+"ttribute"
       Call IO.O
       Strng=RT$(32,"[C]")+"lear action"
       Call IO.O
       Strng=RT$(33,"[W]")+"eapon rusting"
       Call IO.O
       Strng=RT$(34,"[O]")+"bject stealing"
       Call IO.O
       Strng=RT$(35,"[D]")+"isplay action"
       Call IO.O
       Strng=RT$(36,"[P]")+"urchase item"
       Call IO.O
       Strng=RT$(700,"[Z]")+"Wish/Poison percent"
       Call IO.O
       Graphics.Off=False
    Endif
    Strng="Action change option(q to quit)? "
    Line.Length=TempD
    No.Input.Out="Q"
    Call IO.I
    Select Case Ucase$(Out2)
    Case "A"
       If RT$(31,"[A]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             Graphics.Off=True
             If TempC=False Then
                Strng=RT$(81,"[A]")+"ir terrain"
                Call IO.O
                Strng=RT$(82,"[L]")+"and terrain"
                Call IO.O
                Strng=RT$(83,"[W]")+"ater terrain"
                Call IO.O
                Strng=RT$(84,"[U]")+"nlit room"
                Call IO.O
                Strng=RT$(85,"[X]")+"Clear attributes"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action attribute option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             Select Case Ucase$(Out2)
             Case "A"
                If RT$(81,"[A]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Attribute2=Air
                   Strng="Action is now air terrain."
                Endif
             Case "L"
                If RT$(82,"[L]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Attribute2=Land
                   Strng="Action is now land terrain."
                   Call IO.O
                Endif
             Case "W"
                If RT$(83,"[W]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Attribute2=Water
                   Strng="Action is now water terrain."
                   Call IO.O
                Endif
             Case "U"
                If RT$(84,"[U]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Attribute1=UnlitRoom
                   Strng="Action is now unlit."
                   Call IO.O
                Endif
             Case "X"
                If RT$(85,"[X]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Attribute1=False
                   ActionRecord.Attribute2=False
                   Strng="Action is now clear of attributes."
                   Call IO.O
                Endif
             Case "Q"
                Exit Do
             End Select
          Loop
       Endif
    Case "C"
       If RT$(32,"[C]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          ActionRecord.Attribute1=False
          ActionRecord.Attribute2=False
          ActionRecord.SpellTrigger=SFalse
          ActionRecord.HealthRate=False
          ActionRecord.EncounterRate=False
          ActionRecord.HitPoints=False
          ActionRecord.Inventory=False
          ActionRecord.InvPercent=False
          ActionRecord.InvNumber=False
          ActionRecord.Fumble=False
          ActionRecord.TelePercent=False
          ActionRecord.Level=False
          ActionRecord.Restrictions=False
          ActionRecord.RustRate=False
          ActionRecord.StealRate=False
          ActionRecord.Hidden=False
          For Temp2=1 To 3
             ActionRecord.AttackMonster(Temp2)=SFalse
             ActionRecord.MonsterTalk(Temp2)=SFalse
             ActionRecord.MonsterTrigger(Temp2)=SFalse
          Next
          For Temp2=1 To 5
             ActionRecord.Teleport(Temp2)=SFalse
          Next
          Strng="Action cleared."
          Call IO.O
       Endif
    Case "D"
       If RT$(35,"[D]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Allow.Break=True
          Break=False
          Temp0=False
          For VarQ=1 To 22
             Call Display.Action(VarQ)
             If Break Then
                Exit For
             Endif
          Next
          Allow.Break=False
          Break=False
          Call More.Prompt
       Endif
    Case "E"
       If RT$(22,"[E]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Strng="Encounter monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTrigger(1)=TempD!
             Strng="Encounter monster trigger added to action."
             Call IO.O
          Endif
          Strng="Encounter permanent monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTrigger(2)=TempD!
             Strng="Encounter permanent monster trigger added to action."
             Call IO.O
          Endif
          Strng="Encounter nonplayer monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTrigger(3)=TempD!
             Strng="Encounter nonplayer monster trigger added to action."
             Call IO.O
          Endif
          Strng="Attack monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.AttackMonster(1)=TempD!
             Strng="Attack monster trigger added to action."
             Call IO.O
          Endif
          Strng="Attack permanent monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.AttackMonster(2)=TempD!
             Strng="Attack monster trigger added to action."
             Call IO.O
          Endif
          Strng="Attack nonplayer monster trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.AttackMonster(3)=TempD!
             Strng="Attack monster trigger added to action."
             Call IO.O
          Endif
       Endif
    Case "F"
       If RT$(29,"[F]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          ActionRecord.Fumble=True
          Strng="Action now fumbles."
          Call IO.O
       Endif
    Case "H"
       If RT$(26,"[H]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             Graphics.Off=True
             If TempC=False Then
                Strng=RT$(66,"[F]")+"atigue"
                Call IO.O
                Strng=RT$(67,"[V]")+"itality"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action health rate option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             Select Case Ucase$(Out2)
             Case "F"
                If RT$(66,"[F]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Number of hits of fatigue(1-32767)? "
                   No.Input.Out="10"
                   Call IO.I
                   ActionRecord.HitPoints=Int(Val(Out2))
                   Strng="Action now hits for fatigue."
                   Call IO.O
                Endif
             Case "V"
                If RT$(67,"[V]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Number of hits of vitality(1-32767)? "
                   No.Input.Out="10"
                   Call IO.I
                   ActionRecord.HitPoints=-Int(Val(Out2))
                   Strng="Action now hits for vitality."
                   Call IO.O
                Endif
             Case "Q"
                Exit Do
             End Select
          Loop
       Endif
    Case "I"
       If RT$(28,"[I]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             Graphics.Off=True
             If TempC=False Then
                For VarQ=1 To 10 ' 70-79
                   Strng=RT$(VarQ+69,"["+Ltrim$(Str$(VarQ))+"]")
                   Strng=Strng+Rtrim$(InventoryNames(VarQ))
                   If VarQ>1 Then
                      Strng=Strng+"s"
                   Endif
                   Call IO.O
                Next
                Strng=RT$(80,"[X]")+"none"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action inventory option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             If Ucase$(Out2)="Q" Then
                Exit Do
             Endif
             If Ucase$(Out2)="X" Then
                If RT$(80,"[X]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.Inventory=False
                   ActionRecord.InvPercent=False
                   ActionRecord.InvNumber=False
                   Strng="Inventory action cleared."
                   Call IO.O
                Endif
             Else
                Var=Int(Val(Out2))
                If Var>=1 And Var<=10 Then
                   If RT$(Var+69,"[?]")="[*]" Then
                      Strng="Command restricted.."
                      Call IO.O
                   Else
                      ActionRecord.Inventory=Var
                      Strng="Percent of breakage(1-100/<enter>=none)?"
                      Call IO.I
                      Var2=Int(Val(Out2))
                      If Var2>=False And Var2<=100 Then
                         ActionRecord.InvPercent=Var2
                      Endif
                      Strng="Number to break(1-32767/<enter>=all)?"
                      Call IO.I
                      Var2=Int(Val(Out2))
                      If Var2>=False And Var2<=32767 Then
                         ActionRecord.InvNumber=Var2
                      Endif
                      Strng="Inventory action changed."
                      Call IO.O
                   Endif
                Endif
             Endif
          Loop
       Endif
    Case "L"
       If RT$(25,"[L]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             Graphics.Off=True
             If TempC=False Then
                Strng=RT$(37,"[H]")+"ighest level (at least) for entry to room"
                Call IO.O
                Strng=RT$(38,"[L]")+"owest level (at most) for entry to room"
                Call IO.O
                Strng=RT$(39,"[D]")+"irection restrictions"
                Call IO.O
                Strng=RT$(53,"[R]")+"oom directions hidden"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action level entry option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             Select Case Ucase$(Out2)
             Case "H"
                If RT$(37,"[H]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Highest level user must be (at least) to enter room?"
                   No.Input.Out="1"
                   Call IO.I
                   ActionRecord.Level=Int(Val(Out2))
                Endif
             Case "L"
                If RT$(38,"[L]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Lowest level user must be (at most) to enter room?"
                   No.Input.Out="1"
                   Call IO.I
                   ActionRecord.Level=-Int(Val(Out2))
                Endif
             Case "D"
                If RT$(39,"[D]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Do While Lost.Carrier=False
                      Call Display.Action(6)
                      Graphics.Off=True
                      If TempC=False Then
                         Strng=RT$(40,"[N]")+"orth"
                         Call IO.O
                         Strng=RT$(41,"[E]")+"ast"
                         Call IO.O
                         Strng=RT$(42,"[S]")+"outh"
                         Call IO.O
                         Strng=RT$(43,"[W]")+"est"
                         Call IO.O
                         Strng=RT$(44,"[NE]")+"northeast"
                         Call IO.O
                         Strng=RT$(45,"[SE]")+"southeast"
                         Call IO.O
                         Strng=RT$(46,"[SW]")+"southwest"
                         Call IO.O
                         Strng=RT$(47,"[NW]")+"northwest"
                         Call IO.O
                         Strng=RT$(48,"[U]")+"p"
                         Call IO.O
                         Strng=RT$(49,"[D]")+"own"
                         Call IO.O
                         Strng=RT$(50,"[I]")+"n"
                         Call IO.O
                         Strng=RT$(51,"[O]")+"ut"
                         Call IO.O
                         Strng=RT$(52,"[G]")+"o portal"
                         Call IO.O
                         Graphics.Off=False
                      Endif
                      Strng="Action room restriction option(q to quit)? "
                      No.Input.Out="Q"
                      Line.Length=TempD
                      Call IO.I
                      Temp=False
                      Select Case Ucase$(Out2)
                      Case "N"
                         If RT$(40,"[N]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction1
                         Endif
                      Case "E"
                         If RT$(41,"[E]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction2
                         Endif
                      Case "S"
                         If RT$(42,"[S]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction3
                         Endif
                      Case "W"
                         If RT$(43,"[W]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction4
                         Endif
                      Case "NE"
                         If RT$(44,"[NE]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction5
                         Endif
                      Case "SE"
                         If RT$(45,"[SE]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction6
                         Endif
                      Case "SW"
                         If RT$(46,"[SW]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction7
                         Endif
                      Case "NW"
                         If RT$(47,"[NW]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction8
                         Endif
                      Case "U"
                         If RT$(48,"[U]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction9
                         Endif
                      Case "D"
                         If RT$(49,"[D]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction10
                         Endif
                      Case "I"
                         If RT$(50,"[I]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction11
                         Endif
                      Case "O"
                         If RT$(51,"[O]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction12
                         Endif
                      Case "G"
                         If RT$(52,"[G]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction13
                          Endif
                      Case "Q"
                         Exit Do
                      End Select
                      If Temp Then
                         If (ActionRecord.Restrictions And Temp)=0 Then
                            ActionRecord.Restrictions=ActionRecord.Restrictions Or Temp
                            Strng="Direction restriction added."
                            Call IO.O
                         Else
                            ActionRecord.Restrictions=ActionRecord.Restrictions And Not Temp
                            Strng="Direction restriction removed."
                            Call IO.O
                         Endif
                      Endif
                   Loop
                Endif
             Case "R"
                If RT$(53,"[R]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Do While Lost.Carrier=False
                      Call Display.Action(19)
                      Graphics.Off=True
                      If TempC=False Then
                         Strng=RT$(54,"[N]")+"orth"
                         Call IO.O
                         Strng=RT$(55,"[E]")+"ast"
                         Call IO.O
                         Strng=RT$(56,"[S]")+"outh"
                         Call IO.O
                         Strng=RT$(57,"[W]")+"est"
                         Call IO.O
                         Strng=RT$(58,"[NE]")+"northeast"
                         Call IO.O
                         Strng=RT$(59,"[SE]")+"southeast"
                         Call IO.O
                         Strng=RT$(60,"[SW]")+"southwest"
                         Call IO.O
                         Strng=RT$(61,"[NW]")+"northwest"
                         Call IO.O
                         Strng=RT$(62,"[U]")+"p"
                         Call IO.O
                         Strng=RT$(63,"[D]")+"own"
                         Call IO.O
                         Strng=RT$(64,"[I]")+"n"
                         Call IO.O
                         Strng=RT$(65,"[O]")+"ut"
                         Call IO.O
                         Strng=RT$(52,"[C1]")+"custom direction#1"
                         Call IO.O
                         Strng=RT$(52,"[C2]")+"custom direction#2"
                         Call IO.O
                         Graphics.Off=False
                      Endif
                      Strng="Action room hidden option(q to quit)? "
                      No.Input.Out="Q"
                      Line.Length=TempD
                      Call IO.I
                      Temp=False
                      Select Case Ucase$(Out2)
                      Case "N"
                         If RT$(54,"[N]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction1
                         Endif
                      Case "E"
                         If RT$(55,"[E]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction2
                         Endif
                      Case "S"
                         If RT$(56,"[S]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction3
                         Endif
                      Case "W"
                         If RT$(57,"[W]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction4
                         Endif
                      Case "NE"
                         If RT$(58,"[NE]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction5
                         Endif
                      Case "SE"
                         If RT$(59,"[SE]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction6
                         Endif
                      Case "SW"
                         If RT$(60,"[SW]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction7
                         Endif
                      Case "NW"
                         If RT$(61,"[NW]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction8
                         Endif
                      Case "U"
                         If RT$(62,"[U]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction9
                         Endif
                      Case "D"
                         If RT$(63,"[D]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction10
                         Endif
                      Case "I"
                         If RT$(64,"[I]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction11
                         Endif
                      Case "O"
                         If RT$(65,"[O]")="[*]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=Direction12
                         Endif
                      Case "C1"
                         If RT$(52,"[C1]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=2^13
                         Endif
                      Case "C2"
                         If RT$(52,"[C2]")="[**]" Then
                            Strng="Command restricted.."
                            Call IO.O
                         Else
                            Temp=2^14
                         Endif
                      Case "Q"
                         Exit Do
                      End Select
                      If Temp Then
                         If (ActionRecord.Hidden And Temp)=0 Then
                            ActionRecord.Hidden=ActionRecord.Hidden Or Temp
                            Strng="Direction hidden added."
                            Call IO.O
                         Else
                            ActionRecord.Hidden=ActionRecord.Hidden And Not Temp
                            Strng="Direction hidden removed."
                            Call IO.O
                         Endif
                      Endif
                   Loop
                Endif
             Case "Q"
                Exit Do
             End Select
          Loop
       Endif
    Case "M"
       If RT$(24,"[M]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Strng="Monster talk trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTalk(1)=TempD!
             Strng="Monster talk trigger added to action."
             Call IO.O
          Endif
          Strng="Permanent monster talk trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTalk(2)=TempD!
             Strng="Permanent monster talk trigger added to action."
             Call IO.O
          Endif
          Strng="Nonplayer monster talk trigger:"
          Call IO.O
          Call Find.Monster(-1)
          If TempD! Then
             ActionRecord.MonsterTalk(3)=TempD!
             Strng="Nonplayer monster talk trigger added to action."
             Call IO.O
          Endif
       Endif
    Case "O"
       If RT$(34,"[O]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Strng="Rate for monsters to steal treasure(# of action prompts)? "
          No.Input.Out="6"
          Call IO.I
          Temp=Int(Val(Out2))
          ActionRecord.StealRate=Temp
          Strng="Action now has monster stealing rate."
          Call IO.O
       Endif
    Case "P"
       If RT$(36,"[P]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             If TempC=False Then
                Graphics.Off=False
                Strng="Action purchase edit prompt:"
                Call IO.O
                Graphics.Off=True
                Strng=RT$(86,"[O]")+"bject"
                Call IO.O
                Strng=RT$(87,"[T]")+"reasure"
                Call IO.O
                Strng=RT$(88,"[N]")+"one"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action purchase edit option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             Select Case Ucase$(Out2)
             Case "O"
                If RT$(86,"[O]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Call Find.Object
                   If TempD! Then
                      ActionRecord.ItemForSale=-Abs(TempD!)
                      Strng="Object added."
                      Call IO.O
                   Else
                      Strng="No object found."
                      Call IO.O
                   Endif
                Endif
             Case "T"
                If RT$(87,"[T]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Call Find.Treasure
                   If TempC! Then
                      ActionRecord.ItemForSale=TempC!
                      Strng="Treasure added."
                      Call IO.O
                   Else
                      Strng="No treasure found."
                      Call IO.O
                   Endif
                Endif
             Case "N"
                If RT$(88,"[N]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   ActionRecord.ItemForSale=SFalse
                Endif
             Case "Q"
                Exit Do
             End Select
          Loop
       Endif
    Case "R"
       If RT$(27,"[R]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Do While Lost.Carrier=False
             Graphics.Off=True
             If TempC=False Then
                Strng=RT$(68,"[E]")+"ncounter"
                Call IO.O
                Strng=RT$(69,"[H]")+"ealth"
                Call IO.O
                Graphics.Off=False
             Endif
             Strng="Action room rate option(q to quit)? "
             Line.Length=TempD
             No.Input.Out="Q"
             Call IO.I
             Select Case Ucase$(Out2)
             Case "E"
                If RT$(68,"[E]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Encounter rate(1-32767)? "
                   No.Input.Out="6"
                   Call IO.I
                   ActionRecord.EncounterRate=Int(Val(Out2))
                   Strng="New encounter rate now in effect."
                   Call IO.O
                Endif
             Case "H"
                If RT$(69,"[H]")="[*]" Then
                   Strng="Command restricted.."
                   Call IO.O
                Else
                   Strng="Health rate(1-32767)? "
                   No.Input.Out="6"
                   Call IO.I
                   ActionRecord.HealthRate=Int(Val(Out2))
                   Strng="Health rate now in effect."
                   Call IO.O
                Endif
             Case "Q"
                Exit Do
             End Select
          Loop
       Endif
    Case "S"
       If RT$(23,"[S]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Call Find.Spell(-1)
          If TempD! Then
             ActionRecord.SpellTrigger=TempD!
             Strng="Spell trigger added to action."
             Call IO.O
          Endif
       Endif
    Case "T"
       If RT$(30,"[T]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Temp1=False
          Var1!=Lof(RoomFile)/RoomRecLen
          For Temp2=1 To 5
             Strng="Room number #"+Mid$(Str$(Temp2),2)+":"
             Call Get.Record.Range2(SFalse,Var1!,Var2!)
             ActionRecord.Teleport(Temp2)=Var2!
             If Var2!>SFalse Then
                Temp1=True
             Endif
          Next
          Strng="Percent(1-100/<enter>=none)?"
          Call IO.I
          Graphics.Off=False
          Var2=Int(Val(Out2))
          If Var2>=False And Var2<=100 Then
             ActionRecord.TelePercent=Var2
          Endif
          If Temp1 Then
             Strng="Action now teleports."
             Call IO.O
          Endif
       Endif
    Case "W"
       If RT$(33,"[W]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Strng="Rate for weapons to rust(# of action prompts)? "
          No.Input.Out="6"
          Call IO.I
          Temp=Int(Val(Out2))
          ActionRecord.RustRate=Temp
          Strng="Action now has weapon rusting rate."
          Call IO.O
       Endif
    Case "Z"
       If RT$(700,"[Z]")="[*]" Then
          Strng="Command restricted.."
          Call IO.O
       Else
          Strng="Wish Percent(-1 To -100,0,1 To 100)? "
          Call IO.I
          VarQ=Int(Val(Out2))
          VarQ1=Abs(VarQ)
          If VarQ1>=0 And VarQ1<=100 Then
             ActionRecord.WishPercent=VarQ
          Endif
          Strng="Poison Percent(-1 To -100,0,1 To 100)? "
          Call IO.I
          VarQ=Int(Val(Out2))
          VarQ1=Abs(VarQ)
          If VarQ1>=0 And VarQ1<=100 Then
             ActionRecord.PoisonPercent=VarQ
          Endif
       Endif
    Case "Q"
       Exit Do
    End Select
 Loop
 Call Write.Record(ActionFile,Temp!)
ErrExit30:
 Exit Sub
ErrResume30:
 Resume ErrExit30
End Sub

Sub Find.Action
 On Local Error Goto ErrResume31
 Temp3!=Lof(ActionFile)/ActionRecLen
 Strng="Action number"
 Call Get.Record.Range2(1!,Temp3!,Temp!)
ErrExit31:
 Exit Sub
ErrResume31:
 Resume ErrExit31
End Sub

Sub Add.Action
 On Local Error Goto ErrResume32
 Temp!=Lof(ActionFile)/ActionRecLen+1!
 ActionRecord.Attribute1=False
 ActionRecord.Attribute2=False
 ActionRecord.EncounterRate=False
 ActionRecord.Fumble=False
 ActionRecord.HealthRate=False
 ActionRecord.HitPoints=False
 ActionRecord.Inventory=False
 ActionRecord.InvPercent=False
 ActionRecord.InvNumber=False
 ActionRecord.Level=False
 ActionRecord.Restrictions=False
 ActionRecord.RustRate=False
 ActionRecord.SpellTrigger=SFalse
 ActionRecord.StealRate=False
 ActionRecord.TelePercent=False
 For Temp2=1 To 3
    ActionRecord.AttackMonster(Temp2)=SFalse
    ActionRecord.MonsterTalk(Temp2)=SFalse
    ActionRecord.MonsterTrigger(Temp2)=SFalse
 Next
 For Temp2=1 To 5
    ActionRecord.Teleport(Temp2)=SFalse
 Next
 ActionRecord.Hidden=False
 ActionRecord.ItemForSale=SFalse
 ActionRecord.WishPercent=False
 ActionRecord.PoisonPercent=False
 Call Write.Record(ActionFile,Temp!)
 UserRecord.ObjectsCreated(1)=UserRecord.ObjectsCreated(1)+1#
 If User.Index Then
    Call Write.Record(UserFile,User.Index)
 Endif
ErrExit32:
 Exit Sub
ErrResume32:
 Resume ErrExit32
End Sub

Sub List.Action
 On Local Error Goto ErrResume33
 Temp3!=Lof(ActionFile)/ActionRecLen
 Call Get.Record.Range(Temp!,Temp2!,Temp3!)
 Allow.Break=True
 Break=False
 Continuous=False
 For Temp5!=Temp! To Temp2!
    Call Read.Record(ActionFile,Temp5!)
    Graphics.Off=True
    Strng="Action number:"+Str$(Temp5!)+"."
    Call IO.O
    Graphics.Off=False
    Temp0=False
    For VarQ=1 To 22
       Call Display.Action(VarQ)
       If Break Then
          Exit For
       Endif
    Next
    Graphics.Off=False
    If Break Then
       Exit For
    Endif
    If Continuous=False Then
       Call More.Prompt
       If No Or Quit Then
          Exit For
       Endif
    Endif
 Next
 Allow.Break=False
 Break=False
ErrExit33:
 Exit Sub
ErrResume33:
 Resume ErrExit33
End Sub

Sub Print.Actions
 On Local Error Goto ErrResume33a
 Strng="Printer port(1-3)? "
 Call IO.I
 VarP=Int(Val(Out2))
 If VarP>=1 And VarP<=3 Then
    Close #TempFile1
    VarP$="LPT"+Mid$(Str$(VarP),2)+":"
    Open VarP$ For Output As #TempFile1
    Temp3!=Lof(ActionFile)/ActionRecLen
    VarZ=False
    Call Get.Record.Range(Temp!,Temp2!,Temp3!)
    For Temp5!=Temp! To Temp2!
       Call Read.Record(ActionFile,Temp5!)
       Strng="Action number:"+Str$(Temp5!)+"."
       Print #TempFile1,Strng
       Temp0=False
       For VarQ=1 To 22
          Call Print.Action(VarQ)
       Next
       If Temp0 Then
          VarZ=VarZ+1
          If VarZ=3 Then
             VarZ=False
             Print #TempFile1,Chr$(12);
          Endif
       Endif
    Next
 Endif
ErrExit33a:
 Close #TempFile1
 Exit Sub
ErrResume33a:
 Resume ErrExit33a
End Sub

Sub Display.Action(Var)
 On Local Error Goto ErrResume34
 Select Case Var
 Case 1
    If ActionRecord.MonsterTrigger(1) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(1))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.MonsterTrigger(2) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter permanent monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(2))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.MonsterTrigger(3) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter nonplayer monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(3))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(1) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(1))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(2) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack permanent monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(2))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(3) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack nonplayer monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(3))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
 Case 2
    If ActionRecord.SpellTrigger Then
       Call Read.Record(SpellFile,ActionRecord.SpellTrigger)
       Strng2=SpellRecord.SpellName
       Strng2=Rtrim$(Strng2)
       Strng="Spell trigger in effect for spell:"+_
       Str$(ActionRecord.SpellTrigger)+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
 Case 3
    If ActionRecord.MonsterTalk(1) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(1))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.MonsterTalk(2) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Permanent monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(2))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.MonsterTalk(3) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Nonplayer monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(3))+", "+Strng2+"."
       Call IO.O
       Temp0=True
    Endif
 Case 4
    If ActionRecord.Level>False Then
       Strng="Highest level user must be (at least) to enter room:"+_
       Str$(ActionRecord.Level)+"."
       Call IO.O
       Temp0=True
    Endif
 Case 5
    If ActionRecord.Level<False Then
       Strng="Lowest level user must be (at most) to enter room:"+_
       Str$(Abs(ActionRecord.Level))+"."
       Call IO.O
       Temp0=True
    Endif
 Case 6
    If ActionRecord.Restrictions>False Then
       Strng="Restricted room directions:"
       Call IO.O
       Strng=Nul
       For Temp6=1 To 12
          If ActionRecord.Restrictions And 2^Temp6 Then
             Strng=Strng+Rtrim$(Direction(Temp6))+", "
          Endif
       Next
       If ActionRecord.Restrictions And Direction13 Then
          Strng=Strng+"Go portal, "
       Endif
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-2)+"."
          Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
          Call IO.O
          Temp0=True
       Endif
    Endif
 Case 7
    If ActionRecord.HitPoints>False Then
       Strng="Action hits for"+Str$(ActionRecord.HitPoints)+" fatigue."
       Call IO.O
       Temp0=True
    Endif
 Case 8
    If ActionRecord.HitPoints<False Then
       Strng="Action hits for"+Str$(Abs(ActionRecord.HitPoints))+" vitality."
       Call IO.O
       Temp0=True
    Endif
 Case 9
    If ActionRecord.EncounterRate Then
       Strng="Encounter rate:"+Str$(ActionRecord.EncounterRate)+"."
       Call IO.O
       Temp0=True
    Endif
 Case 10
    If ActionRecord.HealthRate Then
       Strng="Health rate:"+Str$(ActionRecord.HealthRate)+"."
       Call IO.O
       Temp0=True
    Endif
 Case 11
    Strng2=Nul
    VarQ=ActionRecord.Inventory
    If VarQ>=1 And VarQ<=8 Then
       Strng2=Rtrim$(InventoryNames(VarQ))
       If VarQ>1 Then
          Strng2=Strng2+"s"
       Endif
    Endif
    If Len(Strng2) Then
       Strng="Action breaks"
       If ActionRecord.InvNumber>False Then
          Strng=Strng+Str$(ActionRecord.InvNumber)
       Else
          Strng=Strng+" all"
       Endif
       Strng=Strng+" "+Strng2
       If ActionRecord.InvPercent>False Then
          Strng=Strng+"("+Mid$(Str$(ActionRecord.InvPercent),2)+"%)"
       Endif
       Strng=Strng+"."
       Call IO.O
       Temp0=True
    Endif
 Case 12
    If ActionRecord.Fumble Then
       Strng="Action fumbles."
       Call IO.O
       Temp0=True
    Endif
 Case 13
    VarY=False
    For Temp2=1 To 5
       If ActionRecord.Teleport(Temp2)>SFalse Then
          VarY=True
       Endif
    Next
    If VarY Then
       Strng="Action teleports to rooms:"
       Call IO.O
       For Temp2=1 To 5
          Strng=Strng+Str$(ActionRecord.Teleport(Temp2))+","
       Next
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-1)+"."
       Endif
       Call IO.O
       Strng="Percent:"
       If ActionRecord.TelePercent Then
          Strng=Strng+Str$(ActionRecord.TelePercent)+"%"
       Else
          Strng=Strng+" <none>"
       Endif
       Call IO.O
       Temp0=True
    Endif
 Case 14
    If ActionRecord.RustRate Then
       Strng="Action has weapon rusting rate of"+_
       Str$(ActionRecord.RustRate)+" action prompts."
       Call IO.O
       Temp0=True
    Endif
 Case 15
    If ActionRecord.StealRate Then
       Strng="Action has monster stealing rate of"+_
       Str$(ActionRecord.StealRate)+" action prompts."
       Call IO.O
       Temp0=True
    Endif
 Case 16
    If ActionRecord.Attribute1=UnlitRoom Then
       Strng="Action is unlit room."
       Call IO.O
       Temp0=True
    Endif
 Case 17
    If ActionRecord.Attribute2=Air Then
       Strng="Action is room type air."
       Call IO.O
       Temp0=True
    Endif
 Case 18
    If ActionRecord.Attribute2=Water Then
       Strng="Action is room type water."
       Call IO.O
       Temp0=True
    Endif
 Case 19
    If ActionRecord.Hidden>False Then
       Strng="Hidden room directions:"
       Call IO.O
       Strng=Nul
       For Temp6=1 To 12
          If ActionRecord.Hidden And 2^Temp6 Then
             Strng=Strng+Rtrim$(Direction(Temp6))+", "
          Endif
       Next
       If ActionRecord.Hidden And 2^13 Then
          Strng=Strng+"custom#1, "
       Endif
       If ActionRecord.Hidden And 2^14 Then
          Strng=Strng+"custom#2, "
       Endif
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-2)+"."
          Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
          Call IO.O
          Temp0=True
       Endif
    Endif
 Case 20
    If ActionRecord.ItemForSale<SFalse Then
       VarX!=Abs(ActionRecord.ItemForSale)
       If VarX!>0! And VarX!<=Lof(ObjectFile)/ObjectRecLen Then
          Call Read.Record(ObjectFile,VarX!)
          Var$=Ltrim$(Rtrim$(Lcase$(ObjectRecord.ObjectName)))
          Strng="Action has object for sale: "+Var$
          Call IO.O
          Temp0=True
       Endif
    Else
       If ActionRecord.ItemForSale>SFalse Then
          VarX!=ActionRecord.ItemForSale
          If VarX!>0! And VarX!<=Lof(TreasureFile)/TreasureRecLen Then
             Call Read.Record(TreasureFile,VarX!)
             Var$=Ltrim$(Rtrim$(Lcase$(TreasureRecord.TreasureName)))
             Strng="Action has treasure for sale: "+Var$
             Call IO.O
             Temp0=True
          Endif
       Endif
    Endif
 Case 21
    If ActionRecord.WishPercent Then
       Strng="Wish percent: "+Ltrim$(Str$(ActionRecord.WishPercent))
       Call IO.O
       Temp0=True
    Endif
    If ActionRecord.PoisonPercent Then
       Strng="Poison percent: "+Ltrim$(Str$(ActionRecord.PoisonPercent))
       Call IO.O
       Temp0=True
    Endif
 Case 22
    If Temp0=False Then
       If Break=False Then
          Strng="Action has no triggers or results."
          Call IO.O
       Endif
    Endif
 End Select
 Graphics.Off=False
ErrExit34:
 Exit Sub
ErrResume34:
 Resume ErrExit34
End Sub

Sub Print.Action(Var)
 On Local Error Goto ErrResume34a
 Select Case Var
 Case 1
    If ActionRecord.MonsterTrigger(1) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(1))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.MonsterTrigger(2) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter permanent monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(2))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.MonsterTrigger(3) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTrigger(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Encounter nonplayer monster trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTrigger(3))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(1) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(1))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(2) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack permanent monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(2))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.AttackMonster(3) Then
       Call Read.Record(MonsterFile,ActionRecord.AttackMonster(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Attack nonplayer monster trigger in effect for monster:"+_
       Str$(ActionRecord.AttackMonster(3))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 2
    If ActionRecord.SpellTrigger Then
       Call Read.Record(SpellFile,ActionRecord.SpellTrigger)
       Strng2=SpellRecord.SpellName
       Strng2=Rtrim$(Strng2)
       Strng="Spell trigger in effect for spell:"+_
       Str$(ActionRecord.SpellTrigger)+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 3
    If ActionRecord.MonsterTalk(1) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(1))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(1))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.MonsterTalk(2) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(2))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Permanent monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(2))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.MonsterTalk(3) Then
       Call Read.Record(MonsterFile,ActionRecord.MonsterTalk(3))
       Strng2=MonsterRecord.MonsterName
       Strng2=Rtrim$(Strng2)
       Strng="Nonplayer monster talk trigger in effect for monster:"+_
       Str$(ActionRecord.MonsterTalk(3))+", "+Strng2+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 4
    If ActionRecord.Level>False Then
       Strng="Highest level user must be (at least) to enter room:"+_
       Str$(ActionRecord.Level)+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 5
    If ActionRecord.Level<False Then
       Strng="Lowest level user must be (at most) to enter room:"+_
       Str$(Abs(ActionRecord.Level))+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 6
    If ActionRecord.Restrictions>False Then
       Strng="Restricted room directions:"
       Print #TempFile1,Strng
       Strng=Nul
       For Temp6=1 To 12
          If ActionRecord.Restrictions And 2^Temp6 Then
             Strng=Strng+Rtrim$(Direction(Temp6))+", "
          Endif
       Next
       If ActionRecord.Restrictions And Direction13 Then
          Strng=Strng+"Go portal, "
       Endif
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-2)+"."
          Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
          Print #TempFile1,Strng
          Temp0=True
       Endif
    Endif
 Case 7
    If ActionRecord.HitPoints>False Then
       Strng="Action hits for"+Str$(ActionRecord.HitPoints)+" fatigue."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 8
    If ActionRecord.HitPoints<False Then
       Strng="Action hits for"+Str$(Abs(ActionRecord.HitPoints))+" vitality."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 9
    If ActionRecord.EncounterRate Then
       Strng="Encounter rate:"+Str$(ActionRecord.EncounterRate)+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 10
    If ActionRecord.HealthRate Then
       Strng="Health rate:"+Str$(ActionRecord.HealthRate)+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 11
    Strng2=Nul
    VarQ=ActionRecord.Inventory
    If VarQ>=1 And VarQ<=8 Then
       Strng2=Rtrim$(InventoryNames(VarQ))
       If VarQ>1 Then
          Strng2=Strng2+"s"
       Endif
    Endif
    If Len(Strng2) Then
       Strng="Action breaks"
       If ActionRecord.InvNumber>False Then
          Strng=Strng+Str$(ActionRecord.InvNumber)
       Else
          Strng=Strng+" all"
       Endif
       Strng=Strng+" "+Strng2
       If ActionRecord.InvPercent>False Then
          Strng=Strng+"("+Mid$(Str$(ActionRecord.InvPercent),2)+"%)"
       Endif
       Strng=Strng+"."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 12
    If ActionRecord.Fumble Then
       Strng="Action fumbles."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 13
    VarY=False
    For Temp2=1 To 5
       If ActionRecord.Teleport(Temp2)>SFalse Then
          VarY=True
       Endif
    Next
    If VarY Then
       Strng="Action teleports to rooms:"
       Print #TempFile1,Strng
       For Temp2=1 To 5
          Strng=Strng+Str$(ActionRecord.Teleport(Temp2))+","
       Next
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-1)+"."
       Endif
       Print #TempFile1,Strng
       Strng="Percent:"
       If ActionRecord.TelePercent Then
          Strng=Strng+Str$(ActionRecord.TelePercent)+"%"
       Else
          Strng=Strng+" <none>"
       Endif
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 14
    If ActionRecord.RustRate Then
       Strng="Action has weapon rusting rate of"+_
       Str$(ActionRecord.RustRate)+" action prompts."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 15
    If ActionRecord.StealRate Then
       Strng="Action has monster stealing rate of"+_
       Str$(ActionRecord.StealRate)+" action prompts."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 16
    If ActionRecord.Attribute1=UnlitRoom Then
       Strng="Action is unlit room."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 17
    If ActionRecord.Attribute2=Air Then
       Strng="Action is room type air."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 18
    If ActionRecord.Attribute2=Water Then
       Strng="Action is room type water."
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 19
    If ActionRecord.Hidden>False Then
       Strng="Hidden room directions:"
       Print #TempFile1,Strng
       Strng=Nul
       For Temp6=1 To 12
          If ActionRecord.Hidden And 2^Temp6 Then
             Strng=Strng+Rtrim$(Direction(Temp6))+", "
          Endif
       Next
       If ActionRecord.Hidden And 2^13 Then
          Strng=Strng+"custom#1, "
       Endif
       If ActionRecord.Hidden And 2^14 Then
          Strng=Strng+"custom#2, "
       Endif
       If Len(Strng) Then
          Strng=Left$(Strng,Len(Strng)-2)+"."
          Mid$(Strng,1,1)=Ucase$(Mid$(Strng,1,1))
          Print #TempFile1,Strng
          Temp0=True
       Endif
    Endif
 Case 20
    If ActionRecord.ItemForSale<SFalse Then
       VarX!=Abs(ActionRecord.ItemForSale)
       If VarX!>0! And VarX!<=Lof(ObjectFile)/ObjectRecLen Then
          Call Read.Record(ObjectFile,VarX!)
          Var$=Ltrim$(Rtrim$(Lcase$(ObjectRecord.ObjectName)))
          Strng="Action has object for sale: "+Var$
          Print #TempFile1,Strng
          Temp0=True
       Endif
    Else
       If ActionRecord.ItemForSale>SFalse Then
          VarX!=ActionRecord.ItemForSale
          If VarX!>0! And VarX!<=Lof(TreasureFile)/TreasureRecLen Then
             Call Read.Record(TreasureFile,VarX!)
             Var$=Ltrim$(Rtrim$(Lcase$(TreasureRecord.TreasureName)))
             Strng="Action has treasure for sale: "+Var$
             Print #TempFile1,Strng
             Temp0=True
          Endif
       Endif
    Endif
 Case 21
    If ActionRecord.WishPercent Then
       Strng="Wish percent: "+Ltrim$(Str$(ActionRecord.WishPercent))
       Print #TempFile1,Strng
       Temp0=True
    Endif
    If ActionRecord.PoisonPercent Then
       Strng="Poison percent: "+Ltrim$(Str$(ActionRecord.PoisonPercent))
       Print #TempFile1,Strng
       Temp0=True
    Endif
 Case 22
    If Temp0=False Then
       If Break=False Then
          Strng="Action has no triggers or results."
          Print #TempFile1,Strng
       Endif
    Endif
 End Select
 Graphics.Off=False
ErrExit34a:
 Exit Sub
ErrResume34a:
 Resume ErrExit34a
End Sub
