BEGIN ~bgcalaha~

IF WEIGHT #1 ~NumTimesTalkedTo(0)~ THEN BEGIN 0
  SAY @20730
  IF ~~ THEN REPLY @20732 DO ~SetGlobal("CalTalk","GLOBAL",1)~ GOTO 2
  IF ~~ THEN REPLY @20731 DO ~SetGlobal("CalTalk","GLOBAL",1)~ GOTO 1
  IF ~~ THEN REPLY @20733 DO ~SetGlobal("CalTalk","GLOBAL",1)~ GOTO 3
  IF ~~ THEN REPLY @20734 DO ~SetGlobal("CalTalk","GLOBAL",1)~ GOTO 6
END

IF ~~ THEN BEGIN 1
  SAY @20735
  IF ~~ THEN REPLY @20736 GOTO 4
  IF ~~ THEN REPLY @20737 GOTO 5
  IF ~~ THEN REPLY @20738 GOTO 7
END

IF ~~ THEN BEGIN 2
  SAY @20739
  IF ~~ THEN REPLY @20740 GOTO 8
  IF ~ReactionLT(LastTalkedToBy(),NEUTRAL_LOWER)~ THEN REPLY @20741 GOTO 8
  IF ~~ THEN REPLY @20742 GOTO 6
  IF ~ReactionGT(LastTalkedToBy(),HOSTILE_UPPER)~ THEN REPLY @20778 GOTO 9
END

IF ~~ THEN BEGIN 3
  SAY @20743
  IF ~~ THEN REPLY @20744 GOTO 2
  IF ~~ THEN REPLY @20745 GOTO 7
END

IF ~~ THEN BEGIN 4
  SAY @20746
  IF ~~ THEN REPLY @20747 GOTO 7
  IF ~~ THEN REPLY @20748 GOTO 2
  IF ~~ THEN REPLY @20749 GOTO 10
END

IF ~~ THEN BEGIN 5
  SAY @20750
  IF ~~ THEN REPLY @20752 GOTO 7
  IF ~~ THEN REPLY @20753 GOTO 2
  IF ~~ THEN REPLY @20754 GOTO 10
END

IF ~~ THEN BEGIN 6
  SAY @20755
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7
  SAY @20757
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8
  SAY @20758
  IF ~~ THEN REPLY @20759 GOTO 11
  IF ~~ THEN REPLY @20760 GOTO 6
  IF ~~ THEN REPLY @20761 GOTO 12
END

IF ~~ THEN BEGIN 9
  SAY @20762
  IF ~~ THEN REPLY @20763 UNSOLVED_JOURNAL @310654 GOTO 13
END

IF ~~ THEN BEGIN 10
  SAY @20756
  IF ~~ THEN REPLY @20764 GOTO 14
END

IF ~~ THEN BEGIN 11
  SAY @20765
  IF ~~ THEN REPLY @20766 DO ~TakePartyGold(20)~ GOTO 9
END

IF ~~ THEN BEGIN 12
  SAY @20767
  IF ~~ THEN REPLY @20768 DO ~TakePartyGold(20)~ GOTO 9
  IF ~~ THEN REPLY @20769 GOTO 7
END

IF ~~ THEN BEGIN 13
  SAY @20770
  IF ~~ THEN REPLY @20771 DO ~SetGlobal("CalDone","GLOBAL",1)~ UNSOLVED_JOURNAL @310655 GOTO 15
  IF ~~ THEN REPLY @20772 DO ~SetGlobal("CalDone","GLOBAL",1)~ UNSOLVED_JOURNAL @310655 GOTO 15
END

IF ~~ THEN BEGIN 14
  SAY @20773
  IF ~~ THEN REPLY @20774 GOTO 16
END

IF ~~ THEN BEGIN 15
  SAY @20775
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16
  SAY @20776
  IF ~~ THEN REPLY @20777 GOTO 7
END

IF WEIGHT #2 ~Global("CalTalk","GLOBAL",1)~ THEN BEGIN 17
  SAY @22155
  IF ~~ THEN REPLY @22156 GOTO 7
  IF ~~ THEN REPLY @22157 GOTO 2
  IF ~~ THEN REPLY @22158 GOTO 10
END

IF WEIGHT #0 ~Global("CalDone","GLOBAL",1)~ THEN BEGIN 18
  SAY @22302
  IF ~~ THEN EXIT
END
