Paste #31356: Untitled Paste

Date: 2016/03/07 17:56:27 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


endguideassign:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 10 endguide1interact

guidechat:
    type: format
    format: "<&b><npc.name> <&f>to you<&co> <&2><text>"

endguide1interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - narrate format:guidechat "Ah, so the old priest sent you aye?  Yes, of course I can help you get to the end."
                - wait 2
                - narrate format:guidechat "But of course nothing is free, first you must do a simple task for me."
                - wait 2
                - narrate format:guidechat "Living out in the mesa biome, supplies can be hard to come by."
                - wait 2
                - narrate format:guidechat "It isn't always easy getting to town to buy them either, even with Telly here the trip can be quite exhausting."
                - wait 2
                - narrate format:guidechat "So if you will get me some things I need I will be happy to take you to the end.  Will you do it?"
                - narrate "[Say Yes or No]"
            chat trigger:
                1:
                    trigger: /Yes/, I suppose I will do it for you, even though the world is about to end I suppose I can find the time.
                    script:
                    - narrate format:guidechat "Oh great, what a relief!  Fetch these supplies and then return to me so that I may take you to the portal."
                    - narrate "[List: 1 Water Bucket, 64 Wheat, 64 Sugar, 5 Apples, 10 Steak, and 64 Oak logs]"
                    - flag player guidelist
                    - zap step:2
                2:  
                    trigger: /No/, I am not your errand boy!
                    script:
                    - narrate format:guidechat "Fine then, but good luck getting to the End without me, even if you find the portal you do not have the necessary key to get there."
                    - narrate "[You must complete this quest to progress with the End quest for the priest]"

        2:
            click trigger:
                script:
                - if <player.inventory.contains[i@stone].qty[1]> {}
                  - if <player.inventory.contains[i@wheat].qty[64]> {}
                      - if <player.inventory.contains[i@sugar].qty[64]> {}
                          - if <player.inventory.contains[i@apple].qty[5]> {}
                              - if <player.inventory.contains[i@cooked_beef].qty[10]> {}
                                  - if <player.inventory.contains[i@log].qty[64]> {
                                  - take <water_bucket> quantity:1 from:<inventory>
                                  - take <wheat> quantity:64 from:<inventory>
                                  - take <sugar> quantity:64 from:<inventory>
                                  - take <apple> quantity:5 from:<inventory
                                  - take <cooked_beef> quantity:10 from:<inventory>
                                  - take <log> quantity:64 from:<inventory>
                                  - give bucket quantity:1
                                  - narrate format:guidechat "Thank you so much for the supplies!"
                                  - wait 2
                                  - narrate format:guidechat "I guess it's time for my side of the bargain.  Meet me inside the temple in the dead city."
                                  - narrate format:guidechat "Just follow the torches and you'll find it.  Telly and I will meet you there."
                                  - wait 3
                                  - narrate format:guidechat "Telly away!"
                                  - playeffect [6452,75,6542,newwold][effect:huge_explosion]
                                  - adjust <player> hide_entity:<npc>
                                  - flag player guidecomplete
                                  - flag player guide1cooldown duration:7d
                                  - zap step:3
                                  - queue clear
                                  }
                - narrate format:guidechat "Dont forget, I need 1 bucket of water, 64 wheat, 64 sugar, 5 apples, 10 steak, and 64 OAK logs."