Paste #3850: Farm quest

Date: 2014/04/29 18:55:43 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


FarmWheat:
    type: assignment
    interact scripts:
    - 10 WheatQuest
WheatQuest:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - engage
                - chat "Hello again, <player.name>!"
                - wait 1
                - chat "I don't know about you, but we're all getting pretty hungry."
                - wait 1
                - chat "Our food supplies are running low. Could you help us?"
                - zap step:2
                - disengage
        2:
            chat trigger:
                1:
                    trigger: /Yes/, how can I help?
                    script:
                    - engage
                    - chat "Good! Grow us some wheat!"
                    - wait 1
                    - chat "Use some of that wood you have left over to make yourself a hoe"
                    - wait 1
                    - chat "After you make a hoe, cut some grass down to get some seeds!"
                    - wait 1
                    - chat "Then use your hoe to plant those seeds. Make sure to plant near some water!"
                    - wait 1
                    - chat "Plant about 10 of them. Harvest 10 Wheat and come back!"
                    - wait 1
                    - chat "Good luck <player.name>!"
                    - zap step:3
                    - disengage
                2:
                    trigger: /no/, go farm yourself!
                    script:
                    - chat "Fine then!"
        3:
            click trigger:
                script:
                - engage
                - if <player.inventory.contains[Wheat].qty[10]> {
                    - take Wheat qty:10
                    - chat "Mighty fine job of farming there <player.name>!"
                    - wait 1
                    - chat "Here's your reward!"
                    - give money:100
                    - give exp:300
                    - narrate "You obtained $100 and 300 exp!"
                    } else {
                    - chat "That's not enough Wheat! Come back when you have 10!"
                    - narrate "<npc.name>Holds his rumbling stomach and frowns."
                    }
                - disengage
        4:
            click trigger:
                script:
                - engage
                - chat "Thanks for gathering all that wheat <player.name>!"
                - wait 1
                - chat "Come back soon for another job!"
                - disengage
                - finish