Paste #4368: MinerSmith

Date: 2014/05/14 14:03:46 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


minersmith:
    Type: Assignment
    Interact Scripts:
    - 100 MinerSmithScript


MinerSmithScript:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "Hello <player.name>, I am <npc.name>."
                - wait 1
                - chat "I need 32 cobblestone, can you help me?"
            chat trigger:
                1:
                    trigger: /Yes/, I will help you!
                    script:
                    - chat "Smashing! For your help i will give you $25!"
                    - zap step:2
                2:
                    trigger: /No/, I am too busy.
                    script:
                    - chat "Awe, Come back later if you change your mind!"
        2:
            click trigger:
                script:
                - if <player.inventory.contains[COBBLESTONE].qty[32]> {
                  - ^take COBBLESTONE qty:32
                  - chat "You have the Cobble!"
                  - wait 1
                  - chat "Thank you!"
                  - give money qty:25
                  - zap step:3
                  } else {
                  - chat "Come back when you have 32 cobblestone."
                  }
        3:
             click trigger:
                script:
                - chat "Thank you for your help!"