Paste #59015: Untitled Paste

Date: 2019/10/08 22:20:42 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


killquest:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - npc_killquest_interact

cchat:
    type: format
    format: "<&e><npc.name> <ยง3>to you<&co> <&e><text>"

killquest_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[npc_engaged]>:
                    - stop
                - if <player.flag[kill_zombie_quest_count]> == 0:
                    - narrate "Come back when the job is done, Dismissed"
                - if <player.has_flag[kill_zombie_quest]>:
                    - stop
                - flag player npc_engaged
                # - engage
                - if <player.flag[kill_zombie_quest_count]> == 5:
                    - narrate format:cchat "Great work! Here's your reward, ill have more for you later"
                    - give emerald quantity:25
                    - flag player kill_zombie_quest_count:!
                    - flag player npc_engaged:!
                    # - disengage
                    - stop
                - narrate format:cchat "Hey your that new recruit right."
                - wait 5t
                - narrate format:cchat "No? well I could use you anyways."
                - wait 5t
                - narrate format:cchat "do you think you could go clear out some ghouls in that ruin just behind the barracks"
                - wait 5t
                - narrate "[<&o>Type <&b><&o>Yes<&f><&o> or <&b><&o>No<&f>]"
                - flag player npc_engaged:!
                # - disengage
            chat trigger:
                1:
                    trigger: "/Yes/ I accept the quest"
                    script:
                    - if <player.has_flag[kill_zombie_quest]>:
                        - stop
                    - flag player npc_engaged
                    # - engage
                    - narrate format:cchat "Okay great!"
                    - wait 5t
                    - narrate "[<&e>Kill 5 Sand Ghouls]"
                    - flag player kill_zombie_quest
                    - flag player kill_zombie_quest_count:0
                    - flag player npc_engage:!
                    # - disengage
                2:
                    trigger: "/No/ I don't"
                    script:
                    - if <player.has_flag[kill_zombie_quest]>:
                        - stop
                    - random:
                        - narrate format:cchat "Okay screw off!"
                        - narrate format:cchat "Okay then."
                        - narrate format:cchat "Screw you then!"

killquest_zombie_world:
    type: world
    events:
        on player kills husk:
        - if !<player.has_flag[kill_zombie_quest]>:
            - stop
        - flag player kill_zombie_quest_count:++
        - if <player.flag[kill_zombie_quest_count]> == 5:
            - narrate "[Return to the Captain.Hark]"
            - flag player kill_zombie_quest:!