#NAME Test NPC
names can't be longer than 32 characters

#TEXTURE wandmaker\idle\1.png
the npc texture folder is assets\textures\npc\

this spawns on object next to the npc
#LEFTOBJECT MANA_CRYSTAL

#HEADTEX hero\head\head.png
#HAIRTEX hero\hair\crazy_hair.png
#EYESTEX hero\eyes\eyes.png
#RIGHTTEX hero\robe_front\lapel_right.png
#LEFTTEX hero\robe_front\lapel_left.png
#BACKTEX hero\robe_back\robe_back.png
#LEFTSHOETEX hero\feet\left_dress_shoe.png
#RIGHTSHOETEX hero\feet\right_dress_shoe.png

#HEADCOLOR 1 1 1
#HAIRCOLOR .5 .5 .5
#EYESCOLOR .5 .5 .5
#RIGHTCOLOR .6 .78 1
#LEFTCOLOR .6 .78 1
#BACKCOLOR 0 0 0
#LEFTSHOECOLOR .3 .36 .5
#RIGHTSHOECOLOR .3 .36 .5

#NOWANDER

#AUTORANGE 0
this automatically triggers the npc if the player is within this range

#DISABLEEXIT

#SPIDEREXITANIMATION
this plays azazel's exit animation when you're done talking to the npc

#DIALOGUE
{
  #TEXT &4This &3text &5is &7very &1colorful.&0
  #NEWLINE This text is on a new line.
  #NEWLINE NICK WENT AND MADE ME LESS OBNOXIOUS RECENTLY.

  color codes:
  &0 white
  &1 red
  &2 green
  &3 blue 
  &4 purple 
  &5 yellow
  &6 cyan 
  &7 orange
  &8 grey
  &9 magenta

  any text without a preceding #tag will be ignored.  you can use this to comment a file
  #OPTION PRESS THIS WHEN EDITING MAPS
  {
    #END
  }
  #OPTION sfdkjfsdjksfdjkl
  {
    #TEXT sdfjksdfkjl
  }  
  #OPTION This button is orange and increments test flag 0
  {
    #BUTTONCOLOR ORANGE
    other options: GREEN BLUE YELLOW

    #ADDFLAG TEST_FLAG_0 1

    you can still set flags to FALSE
    flags must defined in the conversationflagdefinitions file
    it also contains default values for the flag
    there is a control in the GLOBAL file to use the defaults instead of the values in the save file (use this for testing)
    if the indicated flag is not defined it will default to the first defined flag
    

    #TEXT This text is random.
    #NEWLINE superrandom yo
    
    #TEXT this text also shows up randomly

    #TEXT oh god it keeps happening 
    
    #TEXT you can't stop the random text

    #TEXT it can go on forever

   multiple TEXT tags result in random text 
 
    #OPTION This will go to the parent node
    {
      #GIVEMATERIAL 1 FIRE_MAT A
      #GIVEQUESTITEM QUEST_MAP

      GIVEMATERIAL uses the codes listed in pretty much every data file related to materials
      GIVEQUESTITEM uses the following values:
  QUEST_WAND
  QUEST_SPELLBOOK
  QUEST_ROBE
  QUEST_MAP
  QUEST_SCROLL
  QUEST_FOREST_KEY
    QUEST_ARTIFACT_JUMP_SOCKS
    QUEST_ARTIFACT_MANA_STAFF
    QUEST_ARTIFACT_REVIVE_DOLL
    QUEST_ARTIFACT_DESPERATION_TOMBSTONE
    QUEST_ARTIFACT_WARP_HOURGLASS
    QUEST_ARTIFACT_MANA_HAT
  QUEST_CASTLE_KEY
  QUEST_DESERT_KEY
  QUEST_CAVERN_KEY
  QUEST_TEMPLE_KEY
  QUEST_GENERAL_KEY
    QUEST_ARTIFACT_HASTE_DUSTPAN
    QUEST_ARTIFACT_MINIMAP_COMPASS
    QUEST_ARTIFACT_REVEAL_MEDALLIION
    QUEST_ARTIFACT_QUEST_LOCKET
    QUEST_ARTIFACT_LIMITBREAK_SPELLBLADE
    QUEST_ARTIFACT_LIGHT_LANTERN

      QUEST_APPEARANCE_MUSTACHE
      QUEST_APPEARANCE_MONOCLE
      QUEST_APPEARANCE_TOP_HAT
      QUEST_APPEARANCE_SUNGLASSES
      QUEST_APPEARANCE_BLING
      QUEST_APPEARANCE_HELMET
      QUEST_APPEARANCE_COWBOY_HAT
      QUEST_APPEARANCE_HORNS
      QUEST_APPEARANCE_HALO
      QUEST_APPEARANCE_HOBO_BEARD

      every tag that takes quest items as an argument, also takes 
      the coupon codes registered in couponlist.
      #BACK
    }
  }
  #OPTION this option only appears if flag 0 > 2 and flag 1 is true
  {
    #TEXT This is the second child of the second level.
    #CONDITIONTYPE AND
    #CONDITION TEST_FLAG_0 > 2    
    #CONDITION TEST_FLAG_1 TRUE
 
    
    the conditiontype flag also accepts OR as an argument 
    if no conditiontype is supplied, it defaults to AND

    condition accepts ==, !=, >, >=, <, <= operators

    #OPTION This gives you gold
    {
      #TEXT Check this sweet picture bro
      #IMAGE 480 480 sample.png
      #GIVEGOLD 50
      don't forget you can use negative values too

      #OPTION This returns you to the root
      {
        #ROOT
      }
      #OPTION This enters the appropriate quest dialogue tree
      {
        #QUEST TESTQUEST
        #QUEST TESTQUEST2
      
        this selects the first unfinished quest that you meet the prerequisites for
      }
    }
  }
  #OPTION This ends the conversation and only appears if you have 200 gold
  {
    #CONDITION SPECIAL_FLAG_GOLD >= 200
    this is special flag that refers to the player's current gold instead of the defined flag list
    note that you can use this flag with all the tags (SETFLAG, ADDFLAG)

    #END

  }
  #OPTION This opens a menu and sets flag 1 to true and flag 0 to 0
  {
    #SETFLAG TEST_FLAG_1 TRUE
    #SETFLAG TEST_FLAG_0 0
    

    #MENU TRAINING_TARGET_MENU

    other options
    WAND_MENU
    ROBE_MENU
    SPELL_MENU
    ALCHEMY_MENU
    SHOP_MENU 
    ARTIFACT_MENU
    TRAINING_RACE_MENU
    SPELL_CUSTOMIZE_MENU
    COSMETIC_MENU
  }
}

currently, only four options per node is supported