Paste #20919: Moralleath

Date: 2015/10/15 06:33:46 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#FirstCaveNPCQ
Moralleath:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
        - trigger name:proximity state:true cooldown:3s radius:5
    interact scripts:
    - 10 MoralleathInteract

MoralleathInteract:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                - narrate format:chatformat "Hello stranger."
                exit:
                - narrate format:narrateformat "I should speak to Moralleath before I leave."
                move:
                - queue clear
            click trigger:
                script:
                - if <player.has_flag[engaged]> {
                    - queue clear
                }
                else if <player.has_flag[ReturnToDarkness]> {
                    - zap step:3
                }
                else if <player.has_flag[FromTheDarkness]> {
                    - flag player engaged
                    - narrate format:chatformat "You again? Hrm...I don't believe you are ready for what I have in store."
                    - wait 2s
                    - flag player engaged:!
                    - zap step:2
                }
                else {
                    - flag player engaged
                    - narrate format:chatformat "Ah, another new face."
                    - wait 3s
                    - narrate format:chatformat "It seems you have braved a good deal of this mysterious cave. I have stopped asking newcomers how they have emerged from within."
                    - wait 5s
                    - narrate format:chatformat "In any case, you have much to learn here. There are two ways to go about this."
                    - wait 3s
                    - narrate format:chatformat "If you'd prefer to get straight to the wilderness then I advise you to head down the path to the port and speak with Halris, the dockmaster."
                    - wait 5s 
                    - narrate format:chatformat "Or perhaps you prefer to dig a little deeper into this island and our residents. If so, continue into the village and speak with Dhanri."
                    - wait 5s
                    - narrate format:chatformat "I may have something for you to do once you are ready. You will know when your time has come."
                    - wait 3s
                    - narrate format:chatformat "Good luck, newcomer. You'll need it."
                    - wait 3s
                    - execute as_player "quest accept &6 From the Darkness"
                    - narrate format:narrateformat "Quest Accepted - From the Darkness"
                    - flag player engaged:!
                    - flag player FromTheDarkness
                    - zap step:2
                }
        2:
            click trigger:
                script:
                - if <player.has_flag[engaged]> {
                    - queue clear
                }
                else if <player.has_flag[ReturnToDarkness]> {
                    - zap step:3
                }
                else {
                    - flag player engaged
                        - narrate format:chatformat "<player.name> was it? It is nice to see you again but it would seem you are still not ready."
                        - wait 3s
                        - narrate format:chatformat "Come back at a later time when you are prepared."
                    - flag player engaged:!
                }