BEGIN ~joia~

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 0
  SAY @11888
  IF ~~ THEN REPLY @11890 GOTO 1
  IF ~~ THEN REPLY @11891 GOTO 2
  IF ~~ THEN REPLY @11892 GOTO 3
END

IF ~~ THEN BEGIN 1
  SAY @11889
  IF ~~ THEN REPLY @11894 GOTO 2
  IF ~~ THEN REPLY @11895 GOTO 4
  IF ~~ THEN REPLY @11896 GOTO 5
END

IF ~~ THEN BEGIN 2
  SAY @11893
  IF ~~ THEN DO ~EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 3
  SAY @11897
  IF ~~ THEN REPLY @11900 GOTO 4
  IF ~~ THEN REPLY @11901 GOTO 2
  IF ~~ THEN REPLY @11902 GOTO 5
END

IF ~~ THEN BEGIN 4
  SAY @11903
  IF ~~ THEN UNSOLVED_JOURNAL @310015 EXIT
END

IF ~~ THEN BEGIN 5
  SAY @11905
  IF ~~ THEN REPLY @11906 GOTO 4
  IF ~~ THEN REPLY @11907 GOTO 2
END

IF ~!PartyHasItem("RINGJOIA")~ THEN BEGIN 6
  SAY @11908
  IF ~~ THEN EXIT
END

IF ~PartyHasItem("RINGJOIA")~ THEN BEGIN 7
  SAY @11909
  IF ~~ THEN DO ~AddexperienceParty(400)
ReputationInc(1)
TakePartyItem("RINGJOIA")
EraseJournalEntry(@310015)
EscapeArea()~ SOLVED_JOURNAL @310016 EXIT
END
