Paste #13801: Merchant Script 1

Date: 2015/02/10 19:51:35 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"SM1":
  Type: Assignment
  Interact Scripts:
  - 1 ShopMerchant1
"ShopMerchant1":
  Type: interact
  Requirements:
    Mode: All
    List:
    - TIME Day
  Steps:
    1:
      Click Trigger:
        Script:
        - chat "Welcome, <player.name>."
        - wait 1
        - chat "Is there something you'd like to buy?"
        - zap step:2
    2:
      Chat Trigger:
         1:
           trigger: '/Yes/ please'
           script:
           - chat "Of course."
           - wait 1
           - chat "Would you like to browse armor, or weapons?"
           - zap step:3
         2:
           trigger: '/No/ thank you'
           script:
           - chat "Disappointing. I hope you'll consider returning in the future."
           - finish
    3:
      Chat Trigger:
        1:
          trigger: '/armor/ please'
          script:
          - chat "We have only leather armor in stock today,I'm afraid."
          - wait 1
          - chat "A helmet is $50, a chestplate is $80, the leggings are $70, and boots are $40."
          - wait 1
          - chat "Alternatively, you could buy the whole set for a cool $200. Of course you can always return at another time."
          - wait 1
          - chat "So what will it be?"
          - zap step:4
        2:
          trigger: '/weapons/ please'
          script:
          - chat "We have a wooden swords, stone swords, and a few bows in stock today."
          - wait 1
          - chat "A wooden sword is $30, a stone sword is $60, and a bow is $50."
          - wait .5
          - chat "Arrows are $25 for 32."
          - wait 1
          - chat "Which would you prefer?"
          - zap step:5
    4:
      Chat Trigger:
        1:
          trigger: '/helmet/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a leather helmet.'
          - give item: minecraft:leather_helmet
          - money: -50
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        2:
          trigger: '/chestplate/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a leather chestplate'
          - give item: minecraft:leather_chestplate
          - money: -80
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        3:
          trigger: '/leggings/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a pair of leather leggings.'
          - give item: minecraft:leather_leggings
          - money: -70
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        4:
          trigger: '/boots/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a pair of leather boots.'
          - give item: minecraft:leather_boots
          - money: -40
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        5:
          trigger: '/all/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a full set of leather armor.'
          - give item: minecraft:leather_helmet
          - give item: minecraft:leather_chestplate
          - give item: minecraft:leather_leggings
          - give item: minecraft:leather_boots
          - money: -200
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1

    5:
      Chat Trigger:
        1:
          trigger: '/wooden sword/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a wooden sword.'
          - give: minecraft:wooden_sword
          - money: -30
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        2:
          trigger: '/stone sword/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a stone sword.'
          - give: minecraft:stone_sword
          - money: -60
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        3:
          trigger: '/bow/ please'
          script:
          - chat "Of course."
          - narrate '<npc.name> sold you a bow.'
          - give: minecraft:bow
          - money: -50
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1
        4:
          trigger: '/arrows/ please'
          script:
          - chat "Of course"
          - narrate '<npc.name> sold you a halfstack of arrows.'
          - give: minecraft:arrow 32
          - money: -25
          - wait 1
          - chat "Thank you for your patronage. I look forward to your return."
          - zap step:1