Paste #14436: Untitled Paste

Date: 2015/03/12 08:19:16 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"MinorTrouble":
    type assignment
    interact scripts:
    - 10 quest_interact

    actions:
    on assignment:
    - trigger name:click state:true
    - trigger name:chat state:true

"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_bandit_count]> == 3 {
    - narrate "Thank you so much <player.name>! Take this pickaxe as a reward."
    - give i@RedIronPickaxe
    - flag player kill_bandit_count:!
    - disengage
    - queue clear
    }
    - engage
    - narrate "Hello, <player.name>. Could you please help us?"
    - wait 5t
    - narrate "Our work was disturbed by a group of bandits, they have stolen our supplies"
    - wait 5t
    - narrate "They are still in the mine, could you please go teach them a lesson?"
    - wait 3t
    - narrate "<gold>Would you like to accept this quest [yes/no]"
    - disengage
    - flag player npc_engaged:!
    chat trigger:
    1:
    trigger: /yes/
    script:
    - if <player.has_flag[kill_bandit]> queue clear
    - engage
    - wait 5t
    - narrate "Oh thank you, please head west to the mines. Be careful!"
    - wait 5t
    - narrate "<gold>You have started the quest: [Minor Trouble]"
    - narrate "<gold>Head west to the mines and kill [3] Bandits."
    - flag player kill_bandit
    - flag player kill_bandit_count: 0
    - disengage
    2:
    trigger: /no/
    - narrate "I hope you change your mind, <player.name>."

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