<name>Tremayne</name>
<profession>Biographer</profession>
<faction>Serenity</faction>
<dialogue>
  <greeting>
    <reply>
      <if><reputation>70</reputation></if>
      <text>Honoured guests, welcome to our Wine Cellar. What can I do for you?</text>
      <return>main</return>
    </reply>
    <reply>
      <text>Are you the Cork Examiners that I sent for?</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <text>We would like to see the wines.</text>
      <npc>
        <reply>
          <text>Feel free to walk around. If you wish to taste some, the Brewery sells both beer and wine, and with any luck you can get something to eat there, too.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>We hear that you are a biographer. Has Karigor known many famous people?</text>
      <npc>
        <reply>
          <if><reputation>70</reputation></if>
          <text>Why, certainly. I am presently writing a biography of Kehl, a famous necromancer from M'Akal whose tower, when he finally built one far away, sank beneath the ocean's surface. He had quite a library in there, a real shame.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>I may tell you another time. I'm busy now.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if>
        <key>leftSerenity</key>
        <key>!missingmonksbooked</key>
      </if>
      <text>We understand that you handle all promotions to Monk?</text>
      <npc>
        <reply>
          <text>I do. If you wish to earn such a promotion, I have an important quest for you.
You may already have heard that several monks of our community are missing. We fear that they have gone on an adventure that they could not quite handle, but we do not know where they went. Will you endeavour to find them and bring them back to safety?</text>
          <return>accept</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if>
        <key>missingmonksbooked</key>
        <key>rescuedBaleminotu</key>
        <key>rescuedLadob</key>
        <key>rescuedRustavius</key>
      </if>
      <text>We have found all the missing monks.</text>
      <npc>
        <reply>
          <text>Our small community will never forget your bravery. Those of you who wish to become Monk, can now choose so, or come back later. Already, you have earned the title of honorary monks.</text>
          <script>
            <key>missingmonksdone</key>
            <expall>15000</expall>
            <quest>Missing Monks|done</quest>
            <log>Earned the right to be promoted to Monks</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if>
        <key>leftSerenity</key>
        <key>missingmonksbooked</key>
      </if>
      <text>I would like to be promoted to Monk.</text>
      <npc>
        <reply>
          <if><class>Monk</class></if>
          <text>But [name], you already are a Monk.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Bard</class></if>
          <text>You have already chosen your profession, [class].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>!Adventurer</class></if>
          <text>I'm sorry, [class], but only adventurers can become monks.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><key>!missingmonksdone</key></if>
          <text>To become a Monk, you must earn the promotion.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>A magnificent choice. From now on, you are one of us!</text>
          <script>
            <class>Monk</class>
            <experience>25000</experience>
            <log>[name] promoted to Monk[/log]
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>We will meet again, father Tremayne.</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
  <accept>
    <option>
      <text>We will do that for you.</text>
      <npc>
        <reply>
          <text>Wonderful! Remember, you must rescue all free of them.</text>
          <script>
            <key>missingmonksbooked</key>
            <quest>Missing Monks|Find the missing monks and bring them back to safety</quest>
            <log>Received quest from brother Tremayne for missing monks</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>We have urgent business now, but we may return later.</text>
      <npc>
        <reply>
          <text>I hope you do, [class].</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
  </accept>
</dialogue>