Paste #42916: Yoma

Date: 2017/07/05 07:36:34 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


talktoyoma:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 10 npc_findflowerquest_interact

qchat:
    type: format
    format: "<&8><npc.name> <&f>to you<&co> <&7><text>"

npc_findflowerquest_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[find_azurebluet_quest]> queue clear
                - if <player.has_flag[npc_engaged]> queue clear
                - flag player npc_engaged
                - engage
                - if <player.flag[find_azurebluet_quest_count]> == 1 {
                   - narrate format:qchat "Thank you very much! Here, take this as a gift."
                   - give 1@gold
                   -disengage
                   - flag player find_azurebluet_quest_count: !
                   - disengage
                   - flag player npc_engaged: !
                   - queue clear
                - engage         
                - narrate format:qchat "Oh, hello there! Would you like to help me?"
                - wait 5s
                - narrate format:qchat "It happens to be so that I need a flower to my robe."
                - wait 5s
                - narrate format:qchat "Could you bring one to me, please?"
                - wait 5s
                - narrate "[<&6>Type <&b><&6>Yes <&6><&6> or <&b><&6>No<&7>]"
                - disengage
                - flag player npc_engaged: !
            chat trigger:
                1:
                    trigger: /Yes/ I will gladly help you! Which kind of flower is it?
                    script:
                    - if <player.has_flag[find_azurebluet_quest]> queue clear
                    - engage
                    - narrate "Oh, great!" format:qchat
                    - wait 3s
                    - narrate "It's an Azure Bluet." format:qchat
                    - wait 3s
                    - flag player find_azurebluet_quest
                    - flag player find_azurebluet_quest_count: 0
                    - disengage
                2:
                    trigger: /No/ I cannot help you.
                    script:
                    - if <player.has_flag[find_azurebluet_quest]> queue clear
                    - random {
                        - narrate format:qchat "Oh, okay."
                        - narrate format:qchat "Well, I'll ask someone else, then."
                        - narrate format:qchat "Okay, maybe another time."
                        }
find_azurebluet_quest_world:
    type: world
    events:
        on player breaks i@azure_bluet:
        - if !<player.has_flag[find_azurebluet_quest]> queue clear
        - flag player find_azurebluet_quest_count:++
        - if <player.flag[find_azurebluet_quest_count]> == 1 {
        - narrate "[Go back to Yoma]"
        - flag find_azurebluet_quest: !
        }