Paste #4356: Untitled Paste

Date: 2014/05/13 19:43:21 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


TestQuest:
    type: assignment
    interact scripts:
    - 10 TestStart

TestStart:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "Hello <player.name>!"
                - wait 1
                - chat "Would you be willing to help me? I can only offer you a small reward though.."
            chat trigger:
                1:
                    trigger: /yes/, i will help you!
                    script:
                    - chat "Oh great! If it's not too much to ask I would need 10 gold bars!
                    - wait 1
                    - chat "Please come back to me when you have them!."
                    - zap step:2
                2:
                    trigger: /No/, I am too busy.
                    script:
                    - chat "Oh okay.., then please come back if you have some spare time!"
        2:
            click trigger:
                script:
                - if <player.inventory.contains[GOLD_INGOT].qty[10]> {
                  - ^take gold_ingot qty:10
                  - chat "That's all 10 of them? Perfect! thank you! Please wait a minute!"
                  - wait 1
                  - give item gold_ingot qty:2
                  - zap step:3
                  } else {
                  - chat "You still need a few more gold bars, I need 10 of them.."
                  - narrate "<npc.name> looks at you"
                  - wait 1
                  - narrate "<npc.name> looks at you"                  
                  }
        3.
            click trigger:
                script:
                    - chat "Thank you for helping me earlier!"
                    - wait 1
                    - chat "It was really of great help!"