<name>Dattamohia</name>
<profession>Guild Mistress</profession>
<faction>Serenity</faction>
<dialogue>
  <greeting>
    <reply>
      <text>Life is a game whose rules you learn if you leap into it and play it to the hilt!</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <text>Begging your pardon, but what exactly is a guild?</text>
      <npc>
        <reply>
          <text>A guild is where you can be taught new skills or spells. There are quite a few in Karigor. The Towers of Learning in Soronne are famous, they say that you can even train there! Well, those who would repeat the past must control the teaching of history, right? 
Usually, you have to become a member first, but Pilgrim's Wisdom is open to anyone. Remember, if you buy a spellbook, you must read it to learn the spell.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>

<!-- Spellcasting, Staff, Leather, Perception, Merchant, Meditation, Alchemy -->

    <option>
      <if><skill>!Spellcasting</skill></if>
      <text>I would like to learn the Spellcasting skill.</text>
      <npc>
        <reply>
          <if><class>Explorer</class></if>
          <text>First, [name], you must be promoted to Agent, Adventurer or Ranger.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Warrior</class></if>
          <text>First, [name], you must be promoted to Ranger.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Knight</class></if>
          <text>Knights cannot learn this skill, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!250</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-250</gold>
            <skill>Spellcasting</skill>
            <log>[name] learned Spellcasting</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Staff</skill></if>
      <text>I would like to learn the Staff skill.</text>
      <npc>
        <reply>
          <if><class>Explorer</class></if>
          <text>First, [name], you must be promoted to Warrior or Adventurer.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!250</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-250</gold>
            <skill>Staff</skill>
            <log>[name] learned Staff</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Leather</skill></if>
      <text>I would like to learn the Leather skill.</text>
      <npc>
        <reply>
          <if><gold>!250</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-250</gold>
            <skill>Leather</skill>
            <log>[name] learned Leather</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Perception</skill></if>
      <text>I would like to learn the Perception skill.</text>
      <npc>
        <reply>
          <if><gold>!250</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-250</gold>
            <skill>Perception</skill>
            <log>[name] learned Perception</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Merchant</skill></if>
      <text>I would like to learn the Merchant skill.</text>
      <npc>
        <reply>
          <if><gold>!250</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-250</gold>
            <skill>Merchant</skill>
            <log>[name] learned Merchant</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Meditation</skill></if>
      <text>I would like to learn the Meditation skill.</text>
      <npc>
        <reply>
          <if><class>Explorer</class></if>
          <text>First, [name], you must be promoted to Agent, Adventurer or Ranger.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Warrior</class></if>
          <text>First, [name], you must be promoted to Ranger.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><class>Knight</class></if>
          <text>Knights cannot learn this skill, [name].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!500</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-500</gold>
            <skill>Meditation</skill>
            <log>[name] learned Meditation</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if><skill>!Alchemy</skill></if>
      <text>I would like to learn the Alchemy skill.</text>
      <npc>
        <reply>
          <if><gold>!500</gold></if>
          <text>You don't have enough gold.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>An excellent choice, [name]. Feel the waves!</text>
          <script>
            <gold>-500</gold>
            <skill>Alchemy</skill>
            <log>[name] learned Alchemy</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

<!-- Shopping -->

    <option>
      <text>We wish to buy some spellbooks.</text>
      <npc>
        <reply>
          <if><hour>!8</hour></if>
          <text>I have to dust them off first, [gender]. It's still early, come back at eight.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><hour>20</hour></if>
          <text>I'll be glad to help you tomorrow, [gender].</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>Don't put your hand in the box.</text>
          <script><shop>Pilgrim's Wisdom</shop></script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>Thanks for your time!</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>