<name>Rowena</name>
<profession>GM Teacher of Mind Magic</profession>
<faction>Serenity</faction>
<dialogue>
  <greeting>
    <reply>
      <if>
        <reputation>70</reputation>
      </if>
      <text>I am honoured by your visit.</text>
      <return>main</return>
    </reply>
    <reply>
      <text>Strangers, did you get lost in the forest?</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <text>Tell us about the power of mind magic, milady.</text>
      <npc>
        <reply>
          <text>The power of the mind is such, that eventually you will be able to control all your enemy's moves. A Cleric in your party can learn all the spells, while a Saint can cast spells with more efficiency.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>I would like to become a Mind Magic Grandmaster.</text>
      <npc>
        <reply>
          <if><grandmaster>Mind Magic</grandmaster></if>
          <text>You already are a grandmaster, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><skill>!Mind Magic</skill></if>
          <text>You do not know the skill, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Student<class></if>
          <text>First, you must be promoted to Cleric.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Acolyte<class></if>
          <text>First, you must be promoted to Cleric.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Saint</class></if>
          <text>Saints cannot achieve grandmaster status.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>!Cleric</class></if>
          <text>Only Clerics can achieve grandmaster status.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><master>!Mind Magic</master></if>
          <text>Before you can be taught grandmastery, you must become a master.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><grandmasterlevel>!Mind Magic</grandmasterlevel></if>
          <text>You are not good enough yet, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!10000</gold></if>
          <text>You cannot afford the fee.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>Congratulations, [name]!</text>
          <return>main</return> 
          <script>
            <gold>-10000</gold>
            <grandmaster>Mind Magic</grandmaster>
            <log>[name] Mind Magic Grandmaster</log>
          </script>
        </reply>
      </npc>
    </option>
    <option>
      <text>Goodbye!</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>