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

Sub Lose.Player
 On Local Error Goto ErrTrap19
 Gosub Get.Config
 If Len(option1$) Then
    Out2=option1$
    Call Equate(Temp#)
 Else
    Temp#=Int(Rnd*5+5)>UserRecord.Stats(2)/2
 Endif
 If Temp# Then
    Strng="Didn't work!"
    Call IO.O
    Exit Sub
 Endif
 Call Send.Mess(20,SFalse,SFalse,"Lose")
 Strng="You lose any following players!"
 Call IO.O
 Exit Sub
Get.Config:
 VarX=0
 Do
    VarX=VarX+1
    If VarX>Options.Lines Then
       Exit Do
    Endif
    Var$=Ltrim$(Rtrim$(Options.Array(VarX)))
    If Ucase$(Var$)="[CMD084]" Then
       Do
          VarX=VarX+1
          If VarX>Options.Lines Then
             Return
          Endif
          Var$=Ltrim$(Rtrim$(Options.Array(VarX)))
          If Ucase$(Var$)="[END]" Then
             Return
          Endif
          Var=Instr(Var$,"=")
          If Var Then
             Var2$=Ltrim$(Rtrim$(Left$(Var$,Var-1)))
             Var3$=Ltrim$(Rtrim$(Mid$(Var$,Var+1)))
             Select Case Lcase$(Var2$)
             Case "lose.player.equation"
                If Left$(Var3$,1)=Chr$(34) Then
                   If Right$(Var3$,1)=Chr$(34) Then
                      option1$=Mid$(Var3$,2)
                      option1$=Left$(option1$,Len(option1$)-1)
                   Endif
                Endif
             End Select
          Endif
       Loop
    Endif
 Loop
 Return
ErrResume19:
 Exit Sub
ErrTrap19:
 Resume ErrResume19
End Sub
