Paste #43684: Delivery

Date: 2017/08/20 17:38:54 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


--- assignments.yml ---
TheMayor:
  Interact Scripts: 
      - 0 DeliveryEnd1
Smithy:
  Interact Scripts: 
      - 0 DeliveryStart
      - 1 DeliveryMid
      - 2 DeliveryComplete1

---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 with some letters."
      Click Trigger:  #Explain the quest
        Script: 
          - ENGAGE
          - CHAT "I’m swamped with all these letters."
          - WAIT 2
          - CHAT "First up: A youngster sending a letter to our troops guarding the citadel, how sweet!"
          - 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 "I’m so glad you’re helping me"
            - GIVE @letter1
            - NARRATE "<NPC> gives you the first letter."
            - ^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 letter?"
          - HINT short
      Chat Trigger: 
        2: 
          Trigger: /No/ I just temporarily put them elsewhere.
          Script: 
            - CHAT "Hurry and get them to the troops!"
        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 @letter1

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 @letter1
  Steps: 
    1: 
      Proximity Trigger: 
        Script: 
          - CHAT "Hurry up!"
      Click Trigger: 
        Script: 
          - CHAT "Please go see the troops!"

DeliveryEnd1:  #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 @letter1
      - -FINISHED DeliveryEnd1
  Steps: 
    1: 
      Click Trigger: 
        Script: 
          - ENGAGE
          - CHAT "HEY GUYS! We got a letter!"
          - WAIT 2
          - CHAT "Thank you!"
          - ^WAIT 1
          - TAKE @letter1
          - ^FINISH
          - NARRATE "<NPC> takes the letter."
          - DISENGAGE



DeliveryComplete1: #Once the mayor has flagged 'DeliveryEnd' as finished, the player can return to Smithy for his reward.
  Type: Interact
  Requirements: 
    Mode: All
    List: 
      - FINISHED DeliveryEnd1
  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!"

#####################
## Items           ##
#####################
letter1:
  type: item
  material: i@PAPER
  display Name: '<&9>Letter from a youngster<&r> (1)'
  lore:
  - 'Dear troops of Headdon, You are really badass.'
  - 'I hope someday I'll be as strong as you, guys.'