<name>Murgrum</name>
<profession>A strange monk ...</profession>
<dialogue>
  <greeting>
    <reply>
      <if>
        <gender>Female</gender>
        <race>title</race>
      </if>
      <text>Madam!</text>
      <return>main</return>
    </reply>
    <reply>
      <if>
        <gender>Female</gender>
      </if>
      <text>Hello doll, eh!</text>
      <return>main</return>
    </reply>
    <reply>
      <if>
        <race>title</race>
      </if>
      <text>Er... is he level, eh, Sire!</text>
      <return>main</return>
    </reply>
    <reply>
      <text>`Ullu!</text>
      <return>main</return>
    </reply>
  </greeting>

  <main>
    <option>
      <if>
        <key>!drawkcabextraordinarieaccepted</key>
      </if>
      <text>Why are you speaking so strangely?</text>
      <npc>
        <reply>
          <text>We are the Drawkcab monks. We study palindromes. A palindrome is a word or a phrase that reads the same backwards as forwards. Would you like to join us and become a Drawkcab monk yourself?</text>
          <return>drawkcabinitiation</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>drawkcabextraordinarieaccepted</key>
        <key>!drawkcabextraordinariecomplete</key>
      </if>
      <text>What did you say I had to do to become a Drawkcab monk?</text>
      <npc>
        <reply>
          <text>You must tell me which item I am thinking about and then change your name into a true palindrome. Talk to the other drawkcabs to get clues.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>drawkcabextraordinarieaccepted</key>
      </if>
      <text>I think I know which item you are thinking about.</text>
      <npc>
        <reply>
          <text>Then write it down on a piece of paper and keep it safe. Return to me when the game is finished.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
   
    <option>
      <if>
        <key>!stercesaccepted</key>
      </if>
      <text>Is there anything I can do for you?</text>
      <npc>
        <reply>
          <text>As a matter of fact, there is. At our last formal count we, the Drawkcab monks of Jaleb`s Deep, were one too many. We are, however, unable to detemine the reason for this, but I personally suspect the presence of an imposter. Would you be willing to help me reveal this imposter?</text>
          <return>sterces</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>stercesaccepted</key>
        <key>!stercescomplete</key>
        <key>toremovethisoption</key>
      </if>
      <text>What was it I was supposed to get for you again?</text>
      <npc>
        <reply>
          <text>You forgot, didn`t you. Look for the Serces for Orrim in the Wanderhoven. Find a way to activate them and use them to reveal the imposter.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>stercesaccepted</key>
        <key>!fandertempkey1</key>
        <!-- Insert check for Item Sterces for Orrim here -->
      </if>
      <text>I have found the Sterces for Orrim. How do I activate them?</text>
      <npc>
        <reply>
          <text>I am not sure. Try approaching the statue of Orrim in the main hall.</text>
          <script>
            <key>fandertempkey1</key>
            <quest>Sterces for Orrim|You have activated the Sterces</quest>
            <log>Activated the Streces for Orrim</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>stercesaccepted</key>
        <!-- Insert check for Item Activated Sterces for Orrim here -->
        <key>fandertempkey1</key>
        <key>!stercesskotosrevealed</key>
      </if>
      <text>I have activated the Sterces for Orrim. How do I use them?</text>
      <npc>
        <reply>
          <text>Good job on activating them. Now go and confront all the Drawkcabs.</text>
          <script>
            <key>fandertempkey2</key>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <if>
        <key>stercesskotosrevealed</key>
        <key>!stercescomplete</key>
      </if>
      <text>Skotos is your imposter!</text>
      <npc>
        <reply>
          <text>I thought so. Thank you for helping me confirm my suspicions. Accept this timy reward as well as my sincere gratitude.</text>
          <script>
            <key>stercescomplete</key>
            <gold>1000</gold>
            <expall>10000</expall>
            <quest>Sterces for Orrim|done</quest>            
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <text>Do you think you put color on Serenity?</text>
      <npc>
        <reply>
          <text>No, I tan a nation!</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>

    <option>
      <text>Good day to you.</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main>

  <sterces>
    <option>
      <text>Yes. Please tell me more.</text>
      <npc>
        <reply>
          <text>If only we had the Sterces for Orrim, we could activate them and confront all the Drawkcabs. In front of the Sterces, everybody reveals their true selves. Thus we can reveal the imposter. Look for the Sterces for Orrim in the Wanderhoven. When you have the Sterces, you must find a way to activate them. Lastly, speak to all the drawkcabs an see if the activated Sterces for Orrim might help you reveal the imposter.</text>
          <script>
            <key>stercesaccepted</key>
            <quest>Sterces for Orrim|Find the Sterces for Orrim in Wanderhoven and find a way to activate them. Then use the Sterces to reveal the Drawkcab imposter. Return to Murgrum, the Drawkcab leader when you have found the imposter</quest>
            <log>Accepted a quest from Murgrum to reveal the imposter</log>
            <item>Sterces for Orrim</item>
            <quest>Sterces for Orrim|You have found the Sterces</quest>
            <log>Found the Sterces for Orrim</log>
          </script>
          <return>main</return>
        </reply>
      </npc>
    </option>

    <option>
      <text>Not at this time. I am already heavily quested.</text>
      <npc>
        <reply>
          <text>Oh, well. Maybe some other time then.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
  </sterces>

  <drawkcabinitiation>
    <option>
      <text>Sure. What do I need to do?</text>
      <npc>
        <reply>
          <text>We have a little test for our initiates. All you need to do is tell me the name of a fictional item and then choose a new name for yourself. Talk to the other drawkcabs to get clues that will help you identify this item and return to me when you think you know what it is. The new name you choose must, of course, be a true palindrome. Upon completing these simple tasks, I will grant you the title Drawkcab Extraordinarie. Should you choose not to change you name, I will dub you Honorary Drawkcab instead.</text>
          <script>
            <key>drawkcabextraordinarieaccepted</key>
            <quest>Drawkcab Extraordinarie|For your initiation, tell Murgrum the name of a fictional item. Clues will be provided by the other Drawkcabs</quest>
            <log>Started quest to be initiated as Drawkcab Extraordinarie</log>
          </script>
          <return>main</return>
        </reply>
      </npc>
    </option>

    <option>
      <text>Absolutely not. No offence intended.</text>
      <npc>
        <reply>
          <text>I understand. Maybe the intricacies of symmetry in civilized conversation is a bit too much for you.</text>
          <return>main</return>
        </reply>
      </npc>
    </option>
  </drawkcabinitiation>

</dialogue>

