Paste #27553: just trying to use the script from the video

Date: 2015/12/29 10:09:01 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


NPCKillQuest:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 10 npc_killquest_intearct

cchat:
    type: format
    format: "<&b><npc.name> <&f>to you<&co> <&t><text>"

npc_killquest_intearct:
    type: interact
    steps:
        1:
            click tirgger:
                script:
                - if <player.has_flag[npc_engaged]> queue clear
                - if <player.flag[kill_zombie_quest_quest_cooldown]> {
                    - narrate "You can repeat this quest in <player.flag[kill_zombie_quest_cooldown].expiration.formatted>"
                        -qeueue clear
                        }
                       - flag player npc_engaged
                - if <player.flag[kill_zombie_quest_count]> == 5 {
                    - narrate:cchat "Great job! Here's your reward!"
                    - give i@emerald
                    - flag player kill_zombie_quest_count:!
                    - flag player kill_zombie_quest_cooldown duration:1s
                    - disengage
                    - flag player npc_engaged:!
                    - queue clear
                    }
                - engage
                - narrate format:cchat "Hello there, do you want to make some money?"
                - wait 5t
                - narrate format:cchat "If you do, then go kill 5 zombies for me"
                - wait 5t
                - narrate format:cchat "So what do you say?"
                - wait 5t
                - narrate "[<&o>Type <&b><&o>Yes<f><&o> or <&b><&o>No<&7>]"
                - disengage
                - flag player npc_engaged:!
            chat trigger:
                1:
                    trigger: /Yes/ ye
                    script:
                    - if <player.flag[kill_zombie_quest_quest_cooldown]> {
                        -qeueue clear
                        }
                    - if <player.has_flag[kill_zombie_quest]> queue clear
                    - engage
                    - narrate "Okay thanks!" format:cchat
                    - wait 5t
                    - narrate "[Kill 5 zombies!]"
                    - flag player kill_zombie_quest
                    - flag player kill_zombie_quest_count:0
                    - disengage
                2:
                    trigger: /No/ Nigga tf do u think I am
                    script:
                    - random {
                        - narrate format:cchat "Oi then fuck off m8"
                        - narrate format:cchat "Okay then"
                        - narrate format:cchat "Screw you then"
                        }

killquest_zombie_world:
    type: world
    events:
        on player kills zombie:
        - if !<player.has_flag[kill_zombie_quest]> queue clear
        - flag player kill_zombie_quest_count:++
        - if <player.flag[kill_zombie_quest_count]> == 5 {
            - narrate "[Return to the NPC]"
            - flag player kill_zombie_quest:!
            }