Paste #48510: Deliver some wheatses

Date: 2018/07/08 14:59:13 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


deliverwheats:
  type: assignment
  actions:
    on assignment:
    - trigger name:proximity state:true radius:3
    on enter proximity:
    - if <player.has_flag[priscillayes]> {
      - narrate "You see a young woman standing in her booth. She's busy decorating some cupcakes and putting them in a display tray. She doesn't notice you at first, so why don't you go and say hello! (Type hello)"
    }
  interact scripts:
  - 3 delivery

delivery:
    type: interact
    steps:
        1:
          chat trigger:
            1:
              trigger: /Hello/
              script:
              - chat "Oh! Hello there! I'm Priscilla, welcome to Get Baked! How can I help you today?"
              - wait 1s
              - narrate "She looks at you with a friendly smile, waiting to see what you want when she eyes the bundle of wheat on your back."
              - wait 1s
              - chat "Oh! Are those wheats from Jeff's farm?! Give them here!"
              - wait 1s
              - if <player.inventory.contains[wheat].quantity[50]> {
                  - take wheat quantity:50
                  - chat "Oh this is absolutely perfect! I'll be able to bake what we need in no time Thanks for doing Jeff and I a huge favor, let me give you something for the trouble!"
                  - give money quantity:50
                  - narrate "Priscilla has given you $50"
                  - give cake quantity:2
                  - narrate "Two delicious mini cakes have been placed into your bag! Eat them wisely!"
                  - give i@peanutbuttercookie:3
                  - narrate "The scent of peanut butter wafts from your bags! Oh goodie!"
                  - give xp:100
                  - narrate "You've earned 100 XP"
                  - flag player wheatdelivered
                  - title "title:<yellow>Quest Completed!!!" "subtitle:<white>You did business!" fadein:2s stay:4s fadeout:2s
              }
              else {
              - chat "Are you sure you brought me enough wheat? This doesn't look like enough for what I need. Come back when you have 50 wheats please."
              - wait 1
              - narrate "<npc.name> turns around to continue setting up her baked goods display."
              - flag player priscillanowheats
              }
              - flag player jeffcomplete
              - zap s@helpjefffarm step:1
        2:
            click trigger:
                script:
                - if <player.has_flag[priscillanowheats]>
                - if <player.inventory.contains[wheat].quantity[50]> {
                  - take wheat quantity: 50
                  - chat "Welcome back! Thanks for bringing me the wheat I needed! Go ahead and give me them and I'll give you something in return!"
                  - wait 1s
                  - give money quantity:50
                  - narrate "Priscilla has given you $50"
                  - give cake quantity:2
                  - narrate "Two delicious mini cakes have been placed into your bag! Eat them wisely!"
                  - give i@peanutbuttercookie:3
                  - narrate "The scent of peanut butter wafts from your bags! Oh goodie!"
                  - give xp:100
                  - narrate "You've earned 100 XP"
                  - flag player wheatdelivered
                }