[
    {
        "id":"thorin",
        "replies":[
            {
                "nextPhraseID":"thorin_return_1",
                "requires":[
                    {
                        "requireType":"questProgress",
                        "requireID":"thorin",
                        "value":40
                    }
                ]
            },
            {
                "nextPhraseID":"thorin_search_1",
                "requires":[
                    {
                        "requireType":"questProgress",
                        "requireID":"thorin",
                        "value":20
                    }
                ]
            },
            {
                "nextPhraseID":"thorin_1"
            }
        ]
    },
    {
        "id":"thorin_1",
        "message":"What's this, a visitor? How unexpected.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_2"
            }
        ]
    },
    {
        "id":"thorin_2",
        "message":"Tell me, what can Thorin do for you?",
        "replies":[
            {
                "text":"What are you doing here?",
                "nextPhraseID":"thorin_what_1"
            },
            {
                "text":"Who are you?",
                "nextPhraseID":"thorin_who_1"
            },
            {
                "text":"Mind if I use your bed over there to rest?",
                "nextPhraseID":"thorin_rest_1"
            },
            {
                "text":"Do you have anything to trade?",
                "nextPhraseID":"thorin_trade_1"
            }
        ]
    },
    {
        "id":"thorin_what_1",
        "message":"Oh, not much. Well actually, I am waiting for someone - or rather, some people.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_1"
            }
        ]
    },
    {
        "id":"thorin_story_1",
        "message":"You see, me and my fellow gatherers were out investigating the poisonous nature of the irdegh.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_2"
            }
        ]
    },
    {
        "id":"thorin_story_2",
        "message":"Apparently, I was the only one that was careful enough when handling our wares.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_3"
            }
        ]
    },
    {
        "id":"thorin_story_3",
        "message":"The others got ill quite quick, and we hid in this cave to rest up. However, we had not anticipated these bugs in here.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_4"
            }
        ]
    },
    {
        "id":"thorin_story_4",
        "message":"Those 'scaradon' things are tough! They did not even seem to take any damage when I hit them.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_5"
            }
        ]
    },
    {
        "id":"thorin_story_5",
        "message":"So, that's where I am now. The people that sent us to investigate told us to set up camp if we encountered any problems, and they would come help us.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_6"
            }
        ]
    },
    {
        "id":"thorin_story_6",
        "message":"So far, you are the first visitor here for quite a while.",
        "replies":[
            {
                "text":"You don't seem all that upset that your friends died.",
                "nextPhraseID":"thorin_story_6_1"
            },
            {
                "text":"Anything I can do to help you meanwhile?",
                "nextPhraseID":"thorin_story_7"
            },
            {
                "text":"Tough luck. I bet help will be here any day now. Goodbye.",
                "nextPhraseID":"X"
            }
        ]
    },
    {
        "id":"thorin_story_6_1",
        "message":"Nah, it's just business. Just business.",
        "replies":[
            {
                "text":"Anything I can do to help you?",
                "nextPhraseID":"thorin_story_7"
            },
            {
                "text":"Tough luck. I bet your rescue will be here any day now. Goodbye.",
                "nextPhraseID":"X"
            }
        ]
    },
    {
        "id":"thorin_story_7",
        "message":"Hmm. Yes, actually there is something that you could do for me.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_8"
            }
        ]
    },
    {
        "id":"thorin_story_8",
        "message":"The others that I was travelling with, they did not make it this far into the cave, but got attacked by those bugs closer to the entrance.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_9"
            }
        ]
    },
    {
        "id":"thorin_story_9",
        "message":"Considering how they died, I would be very interested in seeing what effects both the irdegh and the scaradons had on them.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_story_10"
            }
        ]
    },
    {
        "id":"thorin_story_10",
        "message":"If you could find me their remains, I would be most grateful. Maybe I could continue my investigation based on their remains. Hmm, yes that would be great.",
        "replies":[
            {
                "text":"Sure, find their remains. Sounds easy enough, I'll do it.",
                "nextPhraseID":"thorin_story_11"
            },
            {
                "text":"I'm all for finding dead things. I'll do it.",
                "nextPhraseID":"thorin_story_11"
            },
            {
                "text":"Hmm, this sounds a bit shady to me. I'm not sure I should do this.",
                "nextPhraseID":"thorin_decline"
            }
        ]
    },
    {
        "id":"thorin_story_11",
        "message":"Excellent. Bring me back the remains of all six of them. I would go search myself if those nasty bugs weren't there.",
        "rewards":[
            {
                "rewardType":"questProgress",
                "rewardID":"thorin",
                "value":20
            }
        ]
    },
    {
        "id":"thorin_who_1",
        "message":"Oh, I did not introduce me, my apologies. I am Thorin.",
        "replies":[
            {
                "text":"What are you doing here?",
                "nextPhraseID":"thorin_what_1"
            }
        ]
    },
    {
        "id":"thorin_decline",
        "message":"Too bad. Good day to you then."
    },
    {
        "id":"thorin_search_1",
        "message":"Welcome back. Did you find all six of them?",
        "replies":[
            {
                "text":"No, not yet. I am still looking.",
                "nextPhraseID":"thorin_search_2"
            },
            {
                "text":"Yes, this is what I found.",
                "nextPhraseID":"thorin_search_c_1",
                "requires":[
                    {
                        "requireType":"inventoryRemove",
                        "requireID":"thorin_bone",
                        "value":6
                    }
                ]
            },
            {
                "text":"Mind if I use your bed over there to rest?",
                "nextPhraseID":"thorin_rest_1"
            },
            {
                "text":"Do you have anything to trade?",
                "nextPhraseID":"thorin_trade_1"
            }
        ]
    },
    {
        "id":"thorin_search_2",
        "message":"OK then. Please return when you have found them all. I would go search myself if those nasty bugs weren't there."
    },
    {
        "id":"thorin_rest_1",
        "replies":[
            {
                "nextPhraseID":"thorin_rest_y",
                "requires":[
                    {
                        "requireType":"questProgress",
                        "requireID":"thorin",
                        "value":40
                    }
                ]
            },
            {
                "nextPhraseID":"thorin_rest_n"
            }
        ]
    },
    {
        "id":"thorin_rest_y",
        "message":"Please, go ahead. You may rest here as much as you like."
    },
    {
        "id":"thorin_rest_n",
        "message":"My bed? No, that's mine. Maybe I will let you use it if you help me with a small task.",
        "replies":[
            {
                "text":"What's that?",
                "nextPhraseID":"thorin_story_1"
            }
        ]
    },
    {
        "id":"thorin_trade_1",
        "replies":[
            {
                "nextPhraseID":"thorin_trade_y",
                "requires":[
                    {
                        "requireType":"questProgress",
                        "requireID":"thorin",
                        "value":40
                    }
                ]
            },
            {
                "nextPhraseID":"thorin_trade_n"
            }
        ]
    },
    {
        "id":"thorin_trade_y",
        "message":"Oh yes. The upside of this cave is that it literally is crawling with dead bodies of those scaradon bugs.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_trade_y2"
            }
        ]
    },
    {
        "id":"thorin_trade_y2",
        "message":"By chance, I happened to find out that with the right mixture, they can be made into a healing substance.",
        "replies":[
            {
                "text":"Let's see what you have to trade.",
                "nextPhraseID":"S"
            }
        ]
    },
    {
        "id":"thorin_trade_n",
        "message":"No. I might have something to trade if you help me with a small task.",
        "replies":[
            {
                "text":"What's that?",
                "nextPhraseID":"thorin_story_1"
            }
        ]
    },
    {
        "id":"thorin_search_c_1",
        "message":"Thank you. I would have gone myself if those nasty bugs weren't there. This turned out to be much easier though.",
        "replies":[
            {
                "text":"N",
                "nextPhraseID":"thorin_search_c_2"
            }
        ],
        "rewards":[
            {
                "rewardType":"questProgress",
                "rewardID":"thorin",
                "value":40
            }
        ]
    },
    {
        "id":"thorin_search_c_2",
        "message":"As a token of my appreciation, you are welcome to use the bed over there to rest. Also, if you are interested in healing, I might be able to provide some help.",
        "replies":[
            {
                "text":"I think I should use the bed to rest right now. Thank you.",
                "nextPhraseID":"X"
            },
            {
                "text":"Do you have anything to trade?",
                "nextPhraseID":"thorin_trade_1"
            },
            {
                "text":"You are welcome. Goodbye.",
                "nextPhraseID":"X"
            }
        ]
    },
    {
        "id":"thorin_return_1",
        "message":"My friend returns. What can Thorin do for you?",
        "replies":[
            {
                "text":"Mind if I use your bed over there to rest?",
                "nextPhraseID":"thorin_rest_1"
            },
            {
                "text":"Do you have anything to trade?",
                "nextPhraseID":"thorin_trade_1"
            }
        ]
    }
]