Paste #3864: Fishing quest

Date: 2014/04/29 22:23:55 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Fishing:
    type: assignment
    interact scripts:
    - 10 FishingQuest
FishingQuest:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - engage
                - chat "Hello there <player.name>!"
                - wait 1
                - chat "We appreciate all the wheat, but you know what's missin?"
                - wait 1
                - chat "That's right! Meat! Could you help us?"
                - zap step:2
                - disengage
        2:
            chat trigger:
                1:
                    trigger: /Yes/, how can I help?
                    script:
                    - engage
                    - chat "Wonderful! I know a guy, not far from here, who can help!"
                    - wait 1
                    - chat "His name is Master Baiter. He sells fishing poles."
                    - wait 1
                    - chat "See if you can catch some fish around his island"
                    - wait 1
                    - chat "About 5 fish will do. Come back when you have them!"
                    - wait 1
                    - chat "What? How can you get to the island? Well, by boat of course!"
                    - wait 1
                    - chat "Make some wood planks, throw them together to make a boat!"
                    - wait 1
                    - chat "Come back when you've made your boat!"
                    - listen item type:craft item:boat qty:1 script:BoatQuest
                    - listen travel type:tonpc "target:NPC.Master Baiter" radius:5 script:MasterBaiter
                    - zap step:3
                    - disengage
                2:
                    trigger: /No/, grab your own meat!
                    script:
                    - chat "Well, ok then..."
        3:
            click trigger:
                script:
                - engage
                - if <player.inventory.contains[boat]> {
                    - chat "That's a fine ship you made there!"
                    - wait 1
                    - chat "Now then, set sail NORTH EAST to find Master Baiter's Island!"
                    - listen travel type:tonpc "target:NPC.Master Baiter" radius:5 script:MasterBaiter
                    - zap step:4
                    } else {
                    - chat "You call that a boat!? You might as well swim there!"
                    - narrate "<npc.name> Shakes his head at you."
                    }
                - disengage    

        4:
            click trigger:
                script:
                - engage
                - if <player.inventory.contains[fish].qty[5]> {
                    - take item fish qty:5
                    - chat "Wow, nice catch <player.name>!"
                    - wait 1
                    - chat "Here's your reward!"
                    - narrate "You earned $100 and 100 exp!"
                    - zap step:5
                    } else {
                    - chat "Where's the fish!?"
                    }
                - disengage

BoatQuest:
    type: task
    script:
    - give xp qty:50
    - narrate "You made a boat!"
    - wait 1
    - narrate "You earned 50 exp!"
    - zap step:4
MasterBaiter:
    type: task
    script:
    - give xp qty:50
    - narrate "You found Master Baiter!"
    - wait 1
    - narrate "You earned 50 exp!"
    - zap step:4