Paste #22796: FishyTom

Date: 2015/11/18 20:40:09 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


FishyTom:
    type: assignment
    interact scripts:
    - 10 FishyStart

FishyStart:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "Hello <player.name>, I seem to have lost my Lucky Lure, but I am too old to find it myself."
                - wait 3
                - chat "Please help me find it?"
            chat trigger:
                1:
                    trigger: /Yes/, I will help you!
                    script: 
                    - chat "Great to hear! I know I lost it around here some place..!"
                    - wait 3
                    - chat "Please, come back when you have it."
                    - zap step:2
                2:
                    trigger: /No/, I am to busy.
                    script:
                    - chat "Oh darn, come back if you have spare time.."
        2:
            click trigger:
                script:
                - if "<player.inventory.contains.display[Lucky Lure].qty[1]>" {
                  - ^take "bydisplay:Lucky Lure"
                  - chat "Oh great you have my Lucky Lure!!"
                  - wait 2
                  - chat "Thank you so much! Here, take this fishing rod as a symbol of my gratitude."
                  - give i@TomsRod qty:1
                  - zap step:3
                  } else {
                  - chat "Oh, it doesn't seem like you have my Lucky Lure.."
                  - wait 2
                  - narrate "<npc.name> frowns at you."
                  - wait 2
                  - chat "Hopefully I'm not too much of a pain!"
                  }
        3:
            click trigger:
                script:
                - chat "Thank you so much for your help earlier!"
                - wait 3
                - chat "I hope you enjoy your fishing rod. Thanks!"
TomsRod:
    type: item
    material: fishing_rod
    display name: <blue>Tom's Rod
    lore:
    - <blue>A token of gratitude
    enchantments:
    - UNBREAKING: 2
    - LURE: 4
    - LUCK_OF_SEA: 5