BEGIN ~CBSCCW01~

IF ~Global("Cb_SpokeWithEmbarassedCowls","AR1000",0)
Global("CbHelpingMelinda","GLOBAL",0)
OR(2)
GlobalGT("HiredByCowled","GLOBAL",0)
GlobalGT("BribedCowled","GLOBAL",0)~ THEN BEGIN 0
  SAY @1
  IF ~~ THEN REPLY @2 GOTO 1
  IF ~~ THEN REPLY @3 GOTO 10
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY @4 GOTO 11
  IF ~~ THEN REPLY @5 GOTO 14
END

IF ~~ THEN BEGIN 1
  SAY @6
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2
  SAY @7
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3
  SAY @8
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4
  SAY @9
  IF ~~ THEN REPLY @10 GOTO 5
  IF ~~ THEN REPLY @11 GOTO 6
  IF ~~ THEN REPLY @12 GOTO 21
END

IF ~~ THEN BEGIN 5
  SAY @13
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6
  SAY @14
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7
  SAY @15
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8
  SAY @16
  IF ~~ THEN REPLY @17 GOTO 21
  IF ~~ THEN REPLY @12 GOTO 21
  IF ~~ THEN REPLY @18 GOTO 9
END

IF ~~ THEN BEGIN 9
  SAY @19
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10
  SAY @20
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11
  SAY @21
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12
  SAY @22
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13
  SAY @23
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 14
  SAY @24
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15
  SAY @25
  IF ~~ THEN GOTO 3
END

IF ~Global("Cb_SpokeWithEmbarassedCowls","AR1000",0)
Global("CbHelpingMelinda","GLOBAL",0)
OR(2)
Global("BribedCowled","GLOBAL",0)
Global("HiredByCowled","GLOBAL",0)~ THEN BEGIN 16
  SAY @26
  IF ~~ THEN REPLY @27 GOTO 18
  IF ~~ THEN REPLY @28 GOTO 17
  IF ~GlobalGT("JaheiraCursed","GLOBAL",0)
GlobalLT("JaheiraCursed","GLOBAL",8)~ THEN REPLY @29 GOTO 19
  IF ~~ THEN REPLY @30 GOTO 20
END

IF ~~ THEN BEGIN 17
  SAY @31
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18
  SAY @32
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 19
  SAY @33
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 20
  SAY @34
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 21
  SAY @35
  IF ~~ THEN DO ~SetGlobal("Cb_CowlsGoEnemy","GLOBAL",1)~ GOTO 22
END

IF ~~ THEN BEGIN 22
  SAY @36
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23
  SAY @37
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24
  SAY @38
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25
  SAY @39
  IF ~~ THEN REPLY @40 GOTO 26
  IF ~~ THEN REPLY @41 GOTO 27
  IF ~~ THEN REPLY @42 GOTO 28
  IF ~~ THEN REPLY @43 GOTO 32
END

IF ~~ THEN BEGIN 26
  SAY @44
  IF ~~ THEN REPLY @41 GOTO 27
  IF ~~ THEN REPLY @42 GOTO 28
  IF ~~ THEN REPLY @43 GOTO 32
END

IF ~~ THEN BEGIN 27
  SAY @45
  IF ~~ THEN REPLY @40 GOTO 26
  IF ~~ THEN REPLY @42 GOTO 28
  IF ~~ THEN REPLY @43 GOTO 32
END

IF ~~ THEN BEGIN 28
  SAY @46
  IF ~~ THEN REPLY @47 GOTO 29
  IF ~~ THEN REPLY @48 GOTO 30
  IF ~~ THEN REPLY @43 GOTO 32
END

IF ~~ THEN BEGIN 29
  SAY @49
  IF ~~ THEN DO ~SetGlobal("Cb_CowlsGoEnemy","GLOBAL",2)
AddJournalEntry(@69,INFO)~ EXIT
END

IF ~~ THEN BEGIN 30
  SAY @50
  IF ~~ THEN REPLY @40 GOTO 26
  IF ~~ THEN REPLY @41 GOTO 27
  IF ~~ THEN REPLY @51 GOTO 28
  IF ~~ THEN REPLY @43 GOTO 32
  IF ~~ THEN REPLY @52 GOTO 31
END

IF ~~ THEN BEGIN 31
  SAY @53
  IF ~~ THEN DO ~SetGlobal("Cb_SpokeWithEmbarassedCowls","AR1000",1)
SetGlobal("CbMelindaSilenced","GLOBAL",1)
AddJournalEntry(@70,QUEST)~ EXIT
END

IF ~~ THEN BEGIN 32
  SAY @54
  IF ~~ THEN GOTO 33
END

IF ~~ THEN BEGIN 33
  SAY @55
  IF ~~ THEN REPLY @40 GOTO 26
  IF ~~ THEN REPLY @41 GOTO 27
  IF ~~ THEN REPLY @51 GOTO 28
  IF ~~ THEN REPLY @52 GOTO 31
END

IF ~Global("CbHelpingMelinda","GLOBAL",1)
RandomNum(2,1)~ THEN BEGIN 34
  SAY @56
  IF ~~ THEN EXIT
END

IF ~Global("CbHelpingMelinda","GLOBAL",1)
RandomNum(2,2)~ THEN BEGIN 35
  SAY @57
  IF ~~ THEN EXIT
END

IF ~Global("CbHelpingMelinda","GLOBAL",3)~ THEN BEGIN 36
  SAY @58
  IF ~~ THEN REPLY @59 GOTO 37
  IF ~~ THEN REPLY @60 GOTO 38
  IF ~~ THEN REPLY @61 GOTO 39
END

IF ~~ THEN BEGIN 37
  SAY @62
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 38
  SAY @63
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 39
  SAY @64
  IF ~~ THEN GOTO 40
END

IF ~~ THEN BEGIN 40
  SAY @65
  IF ~~ THEN GOTO 41
END

IF ~~ THEN BEGIN 41
  SAY @66
  IF ~~ THEN GOTO 42
END

IF ~~ THEN BEGIN 42
  SAY @67
  IF ~~ THEN DO ~SetGlobal("CbHelpingMelinda","GLOBAL",4)
SetGlobalTimer("Cb_HelpMelindaQuick","GLOBAL",300)~ EXIT
END

IF ~Global("CbMelindaSilenced","GLOBAL",1)~ THEN BEGIN 43
  SAY @68
  IF ~~ THEN EXIT
END
