Paste #12352: crafting

Date: 2014/12/29 09:30:27 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Heavyassign:
    type: assignment
    actions:
    interact scripts:
    - 1 Heavyinteract
Heavyinteract:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "Hello <player.name>, would you like me to craft some"
                - chat "<green>Hardened Steel<white> for you?"
                - zap step:2
        2:
            chat trigger:
                1:
                    trigger: /yes/, I would love that!
                    script:
                    - chat "Excellent! How many should i make?"
                    - wait 1 
                    - chat "1, 16, or 32?"
                    - wait 1
                    - narrate "<red>Remember! It takes two iron ingots to make one <green>Hardened Steel<red>."
                    - zap step:3
                2:
                    trigger: /no/, Not right now...
                    script:
                    - chat "Oh that's a shame..."
                    - chat "Come back when you need an expert Blacksmith!"
        3:
            chat trigger:
                1:
                    trigger: /1/, Just the one for now!
                    script:
                    - if <player.inventory.contains[i@iron_ingot].gty[2]> {
                      - take iron_ingot qty:2
                      - chat "One <green>Hardened Steel<white>coming right up!"
                      - wait 2
                      - give i@Hardenedsteel qty:1
                      - chat "All finished for ye!"
                      - zap step:1
                      } else {
                      - chat "Hey! You don't have enough Iron!"
                      - wait 1
                      - chat "Come back later when you have some more..."
                      - zap step:1
                      }
                2:
                    trigger: /16/, Make me a bunch!
                    script:
                    - if <player.inventory.contains[i@iron_ingot].gty[32]> {
                      - take iron_ingot qty:32
                      - chat "Just wait a little bit while i whip this up!"
                      - wait 5
                      - give i@Hardenedsteel qty:16
                      - chat "Check out that handy work!"
                      - zap 1
                      } else {
                      - chat "What? You think I work for free?!"
                      - wait 1
                      - chat "Why don't you check out the market and get some if your in a hurry..."
                      - zap step:1
                      }
                3:
                    trigger: /32/, So much iron!
                    script:
                    - if <player.inventory.contains[i@iron_ingot].gty[64]> {
                      - take iron_ingot qty:64
                      - chat "Oh Yeah! I love large orders!"
                      - wait 1
                      - chat "This will just take a moment."
                      - wait 5
                      - give i@Hardenedsteel qty:32
                      - chat "HAH! Thats some fine Steel I made for you!"
                      - zap step:1
                      } else {
                      - chat "You know I am good...but i can't make Steel out of nothing..."
                      - wait 1
                      - chat "Maybe you should check with the Alchemists..."
                      - zap step:1
                      }