<name>Demoleon</name>
<profession>Master Teacher of Chain</profession>
<faction>Centaurs</faction>
<dialogue>
  <greeting>
    <reply>
      <if>
        <reputation>70</reputation>
      </if>
      <text>Yazoo, travellers! May all the spears in the world fail to penetrate your armour.</text>
      <return>main</return>
    </reply>
    <reply>
      <text>Mind the pine tree. It's not good for throwing.</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <text>Is chainmail better than leather?</text>
      <npc>
        <reply>
          <text>Chainmail offers better protection, but it can slow you down a bit. I do prefer it to plate, which is quite cumbersome and really only good for knights.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>I would like to become a Chain Master.</text>
      <npc>
        <reply>
          <if><grandmaster>Chain</grandmaster></if>
          <text>You already are a grandmaster!!</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><master>Chain</master></if>
          <text>You already are a master!</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><skill>!Chain</skill></if>
          <text>You do not know the skill, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Explorer</class></if>
          <text>First, you must be promoted to Warrior.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if>
            <class>!Warrior</class>
            <class>!Knight</class>
            <class>!Ranger</class>
          </if>
          <text>Heroes of your class cannot achieve master status.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><expert>!Chain</expert></if>
          <text>Before you can be taught mastery, you must become an expert.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><masterlevel>!Chain</masterlevel></if>
          <text>You are not good enough yet.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!5000</gold></if>
          <text>You cannot afford the fee.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>Congratulations, [name]!</text>
          <return>main</return> 
          <script>
            <gold>-5000</gold>
            <expert>Chain</expert>
            <log>[name] Chain Expert</log>
          </script>
        </reply>
      </npc>
    </option>
    <option>
      <text>Where can the Grandmaster Teacher of Chain be found?</text>
      <npc>
        <reply>
          <text>Not far from here, in Verdigris, lives the troll Flambert Dragontamer.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>Oops! Pine tree ...</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>