<name>Cassandra</name>
<profession>Hostess</profession>
<faction>Serenity</faction>
<dialogue>
  <greeting>
    <reply>
      <text>Hello! What's your poison, hmmm?</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <text>Serve us your best plumwine.</text>
      <npc>
        <reply>
          <if><gold>1</gold></if>
          <text>With pleasure, [race].</text>
          <script><gold>-1</gold></script>
          <return>main</return> 
        </reply>
        <reply>
          <text>I'm sorry, [race], but you are flat broke.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
    <option>
      <if><gold>2</gold></if>
      <text>Join us for a drink and tell us the latest gossip!</text>
      <npc>
        <reply>
          <if><random>60</random></if>
          <text>Nobody will believe me, but I'm telling you, the tower of Murlank is going to fall!</text>
          <script><gold>-2</gold></script>
          <return>main</return>
        </reply>
        <reply>
          <if><random>80</random></if>
          <text>They say that long ago, a genie was sealed in his own bottle by an angry necromancer near this very town.</text>
          <script><gold>-2</gold></script>
          <return>main</return>
        </reply>
        <reply>
          <if><random>120</random></if>
          <text>I'm sure it's just a fairytale, but I heard that a princess was kidnapped by an evil ogre.</text>
          <script><gold>-2</gold></script>
          <return>main</return>
        </reply>
        <reply>
          <text>There are some strange monks about in the countryside that don't speak right.</text>
          <script><gold>-2</gold></script>
          <return>main</return>
        </reply>
      </npc>
    </option>
    <option>
      <if><food>!20</food></if>
      <text>We would like to buy some food.</text>
      <npc>
        <reply>
          <if><gold>5</gold></if>
          <text>There you go, [gender]!</text>
          <script>
            <gold>-5</gold>
            <food>5</food>
          </script>
          <return>main</return>
        </reply>
        <reply>
          <text>You don't have the 5 gold, [gender].</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
    <option>
      <text>We wish a room for a good, restful sleep!</text>
      <npc>
        <reply>
          <if><gold>30</gold></if>
          <script>
            <gold>-30</gold>
            <rest>tavern</rest>
          </script>
          <return>exit</return>
        </reply>
        <reply>
          <text>You can't afford a room.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
    <option>
      <if><key>taverngamebooked</key></if>
      <text>Would you like to play a game of Mages and Minions?</text>
      <npc>
        <reply>
          <text>I don't play, [name], but you can ask the judge.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
    <option>
      <text>Goodbye!</text>
      <npc>
        <reply>
          <return>exit</return>
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>