Paste #19567: Richard Commons

Date: 2015/08/20 17:37:41 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


RichardCommons:
  type: interact
  debug: false
  steps:
    1:
      chat trigger:
        request:
          trigger: "/Hello/."
          script:
          - if <player.has_flag[richardtask]> {
            - queue clear
          }
          - wait 2s
          - narrate format:n "Greetings, I am Richard Commons!"
          - wait 2s
          - narrate format:n "You seem native to these parts, traveller. Or perhaps you are stationed close enough to sail here in a reasonable amount of time?"
          - wait 4s
          - narrate format:n "Anyways, if that's the case I have a proposition for you. Of course if that's what you're here for."
          - wait 4s
          - narrate format:n "Currently my people are short of supplies to continue construction; therefore, we need a delivery of materials soon."
          - wait 5s
          - narrate format:n "Here is our list of supplies."
          - wait 2s
          - narrate format:na "Richard hands you a large list."
          - execute as_op "letter Supplies needed for Laverna.\nx64 Oak log\nx256 Cobblestone\nx256 Stone"
          - wait 4s
          - narrate format:n "If you complete this task for me I will give 2,500 coin in return."
          - wait 4s
          - narrate format:na "'Accept' or 'Decline' this offer."
          - queue clear
        accept:
          trigger: "I will /accept/ this offer."
          script:
          - if !<player.has_flag[richardtask]> {
            - queue clear
          }
          - wait 2s
          - narrate format:n "Excellent, what was your name again?"
          - wait 2s
          - narrate format:p "My name is <player.name>."
          - wait 2s
          - narrate format:n "Laverna thanks you, <player.name>. Good luck with your travels!"
          - flag <player> richardtask
          - queue clear
        decline:
          trigger: "I will /decline/ this offer, sorry."
          script:
          - wait 2s
          - narrate format:n "Not a problem. Feel free to come back if you change your mind."
          - queue clear
        delivery:
          trigger: "I am /back/ with your supplies."
          script:
          - if <player.has_flag[richardtask]> {
            - if <player.inventory.contains_any[<i@log.quantity[64]>|<i@cobblestone.quantity[256]>|<i@stone.quantity[256]>]> {
              - wait 2s
              - narrate format:n "Ah excellent, <player.name>!"
              - wait 2s
              - narrate format:na "You hand over the materials."
              - wait 2s
              - narrate format:n "Here you are."
              - wait 1s
              - execute as_server "eco give <player.name> 2500"
              - wait 3s
              - narrate format:n "Thank you for your hard work!"
              - wait 2s
              - narrate format:n "If you are ever looking for more work we have plenty of offers all around. Just ask."
              - wait 4s
              - narrate format:n "Have a good one!"
              - wait 2s
              - narrate format:p "Likewise, Richard."
              - wait 3s
              - narrate format:na "<green>Task completed."
              - narrate format:na "<green>+15 influence credited."
              - flag <player> playerInfluence:+:15
            }
          }