 Rem File: Cmd185.bas
 Rem Sub: !Summon.Monster
 Rem $Include: 'dndbbs.inc'
 On Error Goto Main.Error
 If Chained<>-2 Then
    Color 15,0
    Print "DNDBBS Command 185 -- !Summon.Monster"
    Color 7,0
    End
 Endif
 Call Summon.Monster
Main.Resume:
 Chain DND.Path+"DNDBBS.EXE"
 End
Main.Error:
 Resume Main.Resume

Sub Summon.Monster
 On Local Error Goto Error.Trap185
 Call Safe.Room
 If TempA Then
    Strng="This is a safe haven."
    Call IO.O
    Exit Sub
 Endif
 Choice=Int(Val(Parsed.Command1)+.5)
 If Choice=SFalse Then
    Out4=Lcase$(Parsed.Command1)
    For Choice=1! To Lof(MonsterFile)/MonsterRecLen
       Call Read.Record(MonsterFile,Choice)
       If Left$(MonsterRecord.MonsterName,Len(Out4))=Out4 Then
          Call Get.Monster
          Exit Sub
       Endif
    Next
    Exit Sub
 Endif
 Call Get.Monster
Error.Resume185:
 Exit Sub
Error.Trap185:
 Resume Error.Resume185
End Sub
