Paste #36775: Untitled Paste

Date: 2016/10/09 05:56:36 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


BakerNPC:
    type: assignment
    interact scripts:
    - 10 Bakerquest

BakerQuest:
    type: interact
    steps:
        1:
            clicktrigger:
                script:
                - ^zap step:2
                - narrate "<&6> <&l> Baker: <&f>Hello There!"
                - wait 2
                - narrate "<&6> <&l> Baker: <&f> Would you mind bringing me 3 wheat, please? I can give you a freshly made bread then."
                - wait 2
                - zap step:3      
        2:
            clicktrigger:
                script:
                - narrate "You can't do that right now."
                - wait 5
        3:
            clicktrigger:
                script:
                - zap step:2
                - if <player.inventory.contains[Wheat].qty[3]> {
                - narrate "<&6> <&l> Baker: <&f> Great, you got the wheat for me!"
                    - ^take i@Wheat qty:3
                    - wait 2
                    - narrate "<&o> The baker turns and starts finishing the bread."
                    - wait 2
                    - narrate "<&6> <&1> Baker: <&f> There you go. A freshly made bread"
                    - give i@FreshBread
                    - flag player FreshBread:1
                    - wait 3 
                    - zap step:4
                    }   else {
                    - zap step:2
                    - narrate "<&6> <&1> Baker: <&f> Sorry, but I first need the wheat to finish baking the bread."
                    - wait 4
                    - zap step:3
                    }

        4:
            clicktrigger:
                script:
                - zap step:2
                - random {
                    - narrate "<&6> <&1> Baker: <&f> Enjoy your meal!"
                    - narrate "<&6> <&1> Baker: <&f> Sorry, but I am out of bread now"
                    - narrate "<&6> <&1> Baker: <&f> May the bread be with you"
                    }
                - wait 3
                - zap step:4

FreshBread:
    type: item
    material: bread
    display name: <&6> <&l>Fresh Bread
    lore:
    - <&8>consumable
    - <&7><&o>Fresh, healthy bread,
    - <&7><&o>most likely to cure diseases.
    - <&f>
    - <&2>Use: <&a> Restores 5 Health.


FreshBreadEat:
    type: world
    events:
        on player right clicks with i@FreshBread:
        - determine passively cancelled
        - ^take i@FreshBread qty:1
        - ^heal 5 <context.player>
        - ^narrate "You restore 5 Health."


BakersDaughterNPC:
    type: assignment
    interact scripts:
    - 10 Bakersdaughterquest

BakersDaugherQuest:
    type: interact
    steps:
        1:
            clicktrigger:
                script:
                - ^zap step:2
                - narrate "<&6> <&l> Daughter: <&f> Hello there!"
                - wait 2
                - narrate "<&6> <&l> Daughter: <&f> If you help my father, I can give you a cake."
                - wait 2
                - zap step:3           
        2:
            clicktrigger:
                script:
                 - narrate "<&6> <&l> Daughter: <&f>You can't do that right now."
                 - wait 4              
        3:
            clicktrigger:
                script:
                - zap step:2
                - if <player.flag[FreshBread]> == 1 && <player.inventory.contains[i@FreshBread].qty[1]> [
                - narrate: "<&6> <&l> Daughter: <&f> Great, you have his bread, which means that you must've helped him."
                - narrate: "<&6> <&l> Daughter: As a sign of grattidute, here, take this selfmade cake."
                - give i@SpecialCake
                - flag player SelfmadeCake:1
                - wait 3
                - zap step:4
                } else {
                - zap step:2 
                - narrate: "<&6> <&l> Daughter: <&f> Please go and help my father. If you aid him, I will reward you!"}
                - wait 4
                - zap step:3
                ]         
        4:
            clicktrigger
                script:
                - zap step:2
                - random {
                    - narrate "<&6> <&1> Daughter: <&f> Enjoy your meal!
                    - narrate "<&6> <&1> Daughter: <&f> Sorry, but I am out of cake now"
                    - narrate "<&6> <&1> Daughter: <&f> May the cake be with you"
                    }
                - wait 3
                - zap step:4

SpecialCake:
    type: item
    material: cake
    display name: <&6> <&l>Special Cake
    lore:
    - <&8>consumable
    - <&7><&o>Fresh, selfmade cake,
    - <&7><&o>most likely to cure diseases.
    - <&f>
    - <&2>Use: <&a> Restores 20 Health.

SpecialCakeEat:
    type: world
    events:
    on player right clicks with i@SpecialCake:
    - determine passively cancelled
    - ^take i@SpecialCake qty:1
    - ^heal 20 <context.player>
    - ^narrate "You restore 20 Health."