BEGIN ~JEREMY~

IF ~NumTimesTalkedTo(0)
Global("TalkedJeremy","GLOBAL",0)
~ THEN BEGIN 0
  SAY @0
  IF ~~ THEN REPLY @1 GOTO 1
  IF ~~ THEN REPLY @2 GOTO 1
  IF ~~ THEN REPLY @3 GOTO 3
END

IF ~~ THEN BEGIN 1
  SAY @4
  IF ~~ THEN REPLY @5 GOTO 2
  IF ~~ THEN REPLY @6 GOTO 4
  IF ~~ THEN REPLY @7 GOTO 5
END

IF ~~ THEN BEGIN 2
  SAY @8
  IF ~~ THEN REPLY @9 GOTO 8
  IF ~~ THEN REPLY @10 GOTO 9
  IF ~~ THEN REPLY @11 GOTO 5
END

IF ~~ THEN BEGIN 3
  SAY @4
  IF ~~ THEN REPLY @12 GOTO 8
  IF ~~ THEN REPLY @13 GOTO 2
  IF ~~ THEN REPLY @14 GOTO 5
END

IF ~~ THEN BEGIN 4
  SAY @15
  IF ~~ THEN DO ~SetGlobal("TalkedJeremy","GLOBAL",1)
EscapeArea()
~ %UNSOLVED_JOURNAL% @20018 EXIT
END

IF ~~ THEN BEGIN 5
  SAY @17
  IF ~~ THEN REPLY @18 GOTO 8
  IF ~~ THEN REPLY @19 GOTO 10
END

IF ~!Global("DragonDead","GLOBAL",1)
~ THEN BEGIN 6
  SAY @20
  IF ~~ THEN EXIT
END

IF ~Global("DragonDead","GLOBAL",1)
~ THEN BEGIN 7
  SAY @21
  IF ~~ THEN DO ~ReputationInc(2) EscapeArea() %ERASEJOURNALENTRY_20018%~  %SOLVED_JOURNAL% @20019 EXIT
END

IF ~~ THEN BEGIN 8
  SAY @23
  IF ~~ THEN DO ~SetGlobal("TalkedJeremy","GLOBAL",1)
EscapeArea()
~ %UNSOLVED_JOURNAL% @20018 EXIT
END

IF ~~ THEN BEGIN 9
  SAY @24
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 10
  SAY @25
  IF ~~ THEN DO ~SetGlobal("JeremyPay","GLOBAL",1)
SetGlobal("TalkedJeremy","GLOBAL",1)
~ %UNSOLVED_JOURNAL% @20018 EXIT
END

IF ~Global("DragonDead","GLOBAL",1)
Global("JeremyPay","GLOBAL",1)
~ THEN BEGIN 11
  SAY @21
  IF ~~ THEN DO ~GivePartyGold(5000) EscapeArea() %ERASEJOURNALENTRY_20018%~  %SOLVED_JOURNAL% @20019 EXIT
END
