Paste #14434: Untitled Paste

Date: 2015/03/12 07:38:11 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


quest:
type: assignment
actions:
on assignment:
        - trigger name: click state: true
        - trigger name: chat state: true
interact scripts:
    - 10 quest_interact

cchat:
    type: format
    format: "Miner: <text>"


quest_interact:
    type: interact
steps:
    1:
click trigger:
script:
        - if <player.has_flag[npc_engaged]> queue clear
        - flag player npc_engaged
        - if <player.has_flag[kill_zombie_count]> == 1 {
        - narrate format:cchat "Many thanks to you <player.name>! Here's your share from the coal supplies."
        - give i@diamond
        - flag player kill_zombie_count:!
        - disengage
        - queue clear
        }
        - engage
        - narrate format:cchat "Hello, <player.name>. Could you please help me?"
        - wait 5t
        - narrate format:cchat "We were attacked by some zombies when we extracted our last coal crates from mineshaft"
        - wait 5t
        - narrate format:cchat "That coal supply was really valuable, Would you help us in retrieval of these crates?"
        - wait 5t
        - narrate "<gold>Would you like to accept this quest? (yes/no)"
        - disengage
        - flag player npc_engaged:!
chat trigger:
        1:
trigger: /yes/ I accept the quest
script:
            - if <player.has_flag[kill_zombie]> queue clear
            - engage
            - narrate format:cchat "Thank you, <player.name>! Please head to the west, You should see the mine there."
            - wait 5t
            - narrate "<gold>You have started the quest: Minor trouble."
            - narrate "<gold>Head west to the mineshaft and kill [1] Bandit."
            - flag player kill_zombie
            - flag player kill_zombie_count: 0
            - disengage
        2:
            trigger: /no/ I don't want to do it
script:
            - narrate format:cchat "I hope you change your mind, <player.name>."

kill_bandit_world:
type: world
    events:
    on player kills zombie:
    - if !<player.has_flag[kill_zombie]> queue clear
    - flag player kill_zombie_count:++
    - if <player.has_flag[kill_zombie_count]> == 1 {
    - narrate "<gold>Your quest progress has been updated. Return to the miner."
    - flag player_kill_zombie:!
    }