Paste #3949: Edit of P#3948 - Edit of P#3947 - Edit of P#3913 - Fishing quest

Date: 2014/05/01 22:25:35 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 "He's a 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
                    - 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 the Master Baiter's Island!"
                    - listen travel type:tonpc "target:n@34" 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:
                - chat "Have you even seen the Master Baiter yet!? Get going!"
        5:
            click trigger:
                script:
                - engage
                - if <player.inventory.contains[349].qty[5]> {
                    - take 349 qty:5
                    - chat "Wow, nice catch <player.name>!"
                    - wait 1
                    - chat "Here's your reward!"
                    - narrate "You earned $100 and 100 exp!"
                    - zap step:6
                    } else {
                    - chat "Where's the fish!? Did you even find Master Baiter!?"
                    }
                - disengage
        6:
            click trigger:
                script:
                - engage
                - chat "Thanks for all the fish <player.name>!"
                - wait 1
                - chat "Come back later for another job!"
        7:
            click trigger:
                script:
                - engage
                - chat "Welcome back <player.name>!"
                - wait 1
                - chat "We desperately need your help <player.name>! Can you help us!?"
                - zap step:8
                - disengage
        8:
            chat trigger:
                1:
                    trigger: /Yes/, I'm up for it!
                    script:
                    - engage
                    - chat "I've heard that the Zombies have a base near by!"
                    - wait 1
                    - chat "We're not warriors like yourself, <player.name>!"
                    - wait 1
                    - chat "We can not possibly fight them! However, I am a brilliant strategist!"
                    - wait 1
                    - chat "Just follow my instructions <player.nname>, and together..."
                    - wait 1
                    - chat "We can defeat these Zombies!"
                    - wait 1
                    - chat "Your first task, is to find their base! Don't adventure too far in!"
                    - wait 1
                    - chat "We don't know how dangerous it is yet! Just find it, and report back!"
                    - wait 1
                    - chat "I am told it is close by, just NORTH of our village!"
                    - wait
                    - chat "Good luck <player.name>!"
                    - listen travel type:tolocation location:346,64,7,World radius:5 script:ZombieBase
                    - zap step:9
                    - disengage
                2:
                    trigger: /No/, that sounds far too scary!
                    script:
                    - engage
                    - chat "Fine then, coward! Let the Zombies take over the world!"
        9:
            click trigger:
                script:
                - chat "Did you find their base yet!? There's no time to waste!"
        10:
            click trigger:
                script:
                - engage
                - chat "Nice job of intel <player.name>!"
                - wait 1
                - chat "We're one step closer to defeating the Zombies now!"

ZombieBase:
    type: task
    script:
    - give xp qty:50
    - narrate "You have found the Zombie's Base!"
    - wait 1
    - narrate "You earned 50 exp!"
    - zap step:10 script:FishingQuest

BoatQuest:
    type: task
    script:
    - give xp qty:50
    - narrate "You made a boat!"
    - wait 1
    - narrate "You earned 50 exp!"
    - zap step:3 script:FishingQuest
MasterBaiter:
    type: task
    script:
    - give xp qty:50
    - narrate "You found Master Baiter!"
    - wait 1
    - narrate "You earned 50 exp!"
    - listen item type:fish item:fish qty:1 script:FishingQuestCheck
    - flag player FishCount:0
FishingQuestCheck:
    type: task
    script:
    - flag player FishCount:++
    - narrate "You have caught <player.flag[FishCount].asint>/5 fish!"
    - if <player.flag[FishCount].asint> >= 5 run FishQuestReward
      else run FishQuestContinue
FishQuestContinue:
    type: task
    script:
    - listen item type:fish item:fish qty:1 script:FishingQuestCheck

FishQuestReward:
    type: task
    script:
    - narrate "You have caught <player.flag[FishCount].asint>/5 fish! Return to Zombie Hater!"
    - zap step:5 script:FishingQuest