Delivery Quest - Unrepeatable


Author: jrbudda
Created: 2012-09-18T16:35:59-0400
Edited: 2012-10-01T17:44:43-0400
Denizen Version: 0.76
Views: 103
Downloads: 956
Likes: 0


WGET
Description: Here's a couple scripts for a quick Delivery-type quest involving 2 NPCs. The player can go back and get another item if he loses it. This is quest is not repeatable once completed.

--- assignments.yml ---
  The Mayor: 
    Interact Scripts: 
      - 0 DeliveryEnd
  Smithy: 
    Interact Scripts: 
      - 0 DeliveryStart
      - 1 DeliveryMid
      - 2 DeliveryComplete
 
---DeliveryQuest.yml ---

DeliveryStart: 
  Type: Interact
  Requirements: 
    Mode: All
    List: 
      - -FINISHED DeliveryReward
  Steps: 
    1: 
      Proximity Trigger: #Get the players attention
        Script: 
          - CHAT "Excuse me! I could use some help."
      Click Trigger:  #Explain the quest
        Script: 
          - ENGAGE
          - CHAT "The mayor is waiting for this pair of shears to cut the ribbon on the new schoolhouse"
          - WAIT 2
          - CHAT "I'm too busy to take it to him just now, would you do it for me?"
          - WAIT 2
          - HINT short
          - DISENGAGE
      Chat Trigger: 
        1: 
          Trigger: /Yes/ I can take it to him
          Script:  #Give the player the item and set him on his way. The Zap is used for Smithy, the Flag is what the mayor will look for.
            - ^ENGAGE
            - CHAT "Thanks so much! He's just down the road at the school."
            - GIVE SHEARS
            - NARRATE "<NPC> gives you a pair of shears."
            - ^FINISH
            - ^ZAP
            - ^DISENGAGE
        2: 
          Trigger: /No/ I don't have time either, sorry.
          Script: 
            - CHAT "Let me know if you change your mind, I can make it worth your while!"
    2: 
      Proximity Trigger:   
#Because the 'DeliveryMid' script has higher priority, and checks if the player has SHEARS, this will only run if the player 
#does NOT have the shears anymore, but is still on the quest.
        Script: 
          - CHAT "What happened? did you lose the shears?"
          - HINT short
      Chat Trigger: 
        2: 
          Trigger: /No/ I just temporarily put them elsewhere.
          Script: 
            - CHAT "Hurry and get them to the Mayor!"
        1: 
          Trigger: /Yes/.. they.. um, got lost, sorry.
          Script: 
            - CHAT "Ugh, well I just so happen to have another pair. Don't lose these!"
            - GIVE SHEARS

DeliveryMid:  #This script is just to remind the player what he should be doing, and let the smith know the player hasn't lost the shears.
  Type: Interact
  Requirements: 
    Mode: All
    List:  
      - FINISHED DeliveryStart
      - ITEM SHEARS
  Steps: 
    1: 
      Proximity Trigger: 
        Script: 
          - CHAT "Hurry, the mayor needs those shears!"
      Click Trigger: 
        Script: 
          - CHAT "Please go see the mayor!"

DeliveryEnd:  #This is the mayor's script. you could change this to require the player to be holding this shears, instead of just in inventory.
  Type: Interact
  Requirements: 
    Mode: All
    List: 
      - FINISHED DeliveryStart
      - ITEM SHEARS
      - -FINISHED DeliveryEnd
  Steps: 
    1: 
      Click Trigger: 
        Script: 
          - ENGAGE
          - CHAT "Oh have you come from Smithy with the shears?"
          - WAIT 2
          - CHAT "You're just in time!"
          - ^WAIT 1
          - TAKE SHEARS
          - ^FINISH
          - NARRATE "<NPC> takes the shears."
          - WAIT 1
          - CHAT "Thanks!"
          - DISENGAGE
 
 

DeliveryComplete: #Once the mayor has flagged 'DeliveryEnd' as finished, the player can return to Smithy for his reward.
  Type: Interact
  Requirements: 
    Mode: All
    List: 
      - FINISHED DeliveryEnd
  Steps: 
    1: 
      Click Trigger: 
        Script: 
          - ^ENGAGE
          - CHAT "Thanks, I heard the ribbon-cutting went well!"
          - ^WAIT 1
          - CHAT "Here's something for your trouble."
          - GIVE COMPASS
          - ^ZAP
          - ^DISENGAGE
    2: 
      Click Trigger: 
        Script: 
          - CHAT "Thanks for your help!"
 
 




Comments
No one has posted a comment! Post one below: