Paste #42876: ParadiddlePride 4thOfJuly Event Script

Date: 2017/06/30 19:28:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


4thOfJulyFred:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 4 FredSteakComplete
    - 3 FredMelonComplete
    - 2 FredPotatoSaladComplete
    - 1 FredEventQuest

fredchat:
    type: format
    format: "<npc.name> <&7>says<&co> <&c><text>"

FredEventQuest:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[npc_engaged]> queue clear
                - if <player.has_flag[fred_event_cooldown]> {
                    - narrate format:fredchat "I think we have enough food for now. Why don't you check back tomorrow?"
                    - wait 1s
                    - narrate "<&7><&o>You can repeat this quest in <player.flag[fred_event_cooldown].expiration.formatted>."
                    - wait 1t
                    - queue clear
                    }
                - if <player.has_flag[fred_potato_quest]> zap 2
                - if <player.has_flag[fred_melon_quest]> zap 2
                - if <player.has_flag[fred_steak_quest]> zap 2
                - flag player npc_engaged
                - engage
                - narrate format:fredchat "Hello, <player.name>! Are you enjoying the Independance Day festivities?"
                - wait 2s
                - narrate format:fredchat "Truth be told, we have a bit of a problem. The fireworks are going to start soon, and we don't have any food!"
                - wait 3s
                - narrate format:fredchat "We can't have a proper party without picnic supplies! Do you think you could help gather up some ingredients so I can make more? I'm sure I can find a way to reward you if you do."
                - wait 3s
                - narrate "<&7>[<&e><&o>To accept, type Yes. To decline, type No.<&7>]"
                - disengage
                - flag player npc_engaged:!
            chat trigger:
                1:
                    trigger: /Yes/, I can gather supplies.
                    script:
                    - engage
                    - wait 2s
                    - narrate format:fredchat "Great! Why don't we start with the potato salad? We'll need plenty of bowls, and of course potatoes!"
                    - wait 2s
                    - narrate "<&7>[<&6><&l>New Quest! <&e>Gather 32 bowls and 64 potatoes. Return to Fred with the items!<&7>]"
                    - flag player fred_potato_quest
                    - disengage
                2:
                    trigger: /No/, I'm not interested.
                    script:
                    - wait 2s
                    - narrate format:fredchat "Well, come back if you change your mind. We've got a lot of bellies to fill!"
        2:
            click trigger:
                script:
                - narrate format:fredchat "Looks like you're missing some items. Come back when you have them all."


FredPotatoSaladComplete:
    type: interact
    requirements:
        mode: all
        list:
        - flagged fred_potato_quest
        - item 281 'qty:32'
        - item 392 'qty:64'
    steps:
        1:
            click trigger:
                script:
                - engage
                - narrate format:fredchat "You got the potato salad!"
                - take i@281 qty:32
                - take i@392 qty:64
                - flag player fred_potato_quest:!
                - wait 2s
                - narrate format:fredchat "Next up, the most important part of a picnic. Watermelon! We'll need a lot of slices, so be sure to grab extra."
                - wait 3s
                - narrate "<&7>[<&6><&l>New Quest! <&e>Gather 2 stacks of Melon Slices. Return to Fred with the items!<&7>]"
                - flag player fred_melon_quest
                - disengage
                - queue clear

FredMelonComplete:
    type: interact
    requirements:
        mode: all
        list:
        - flagged fred_melon_quest
        - item 360 'qty:128'
    steps:
        1:
            click trigger:
                script:
                - engage
                - narrate format:fredchat "Whoa, that's a lot of melons. Good work!"
                - take i@360 qty:128
                - flag player fred_melon_quest:!
                - wait 2s
                - narrate format:fredchat "I think we might be d- wait! I can't believe I almost forgot the most important part. Steaks on the grill!"
                - wait 3s
                - narrate format:fredchat "We're going to need a lot, and you should probably grab some buns while you're at it. This is the last request, I promise!"
                - wait 3s
                - narrate "<&7>[<&6><&l>New Quest! <&e>Gather 64 Steaks and 64 Bread. Return to Fred with the items!<&7>]"
                - flag player fred_steak_quest
                - disengage
                - queue clear

FredSteakComplete:
    type: interact
    requirements:
        mode: all
        list:
        - flagged fred_steak_quest
        - item 364 'qty:64'
        - item 297 'qty:64'
    steps:
        1:
            click trigger:
                script:
                - engage
                - narrate format:fredchat "Look at all those steaks! Guess this makes you the grill-master, huh?"
                - take i@364 qty:64
                - take i@297 qty:64
                - flag player fred_steak_quest:!
                - wait 2s
                - narrate format:fredchat "Here's your reward for helping out. I heard the Prize Pig collects them, you should see what you can trade it in for. Enjoy!"
                - give i@FredRewardItem qty:1
                - wait 3s
                - narrate "<&7>[<&6><&l>Quest Complete! <&e>Come back tomorrow for more rewards.<&7>]"
                - flag player fred_event_cooldown duration:24h
                - disengage
                - queue clear

FredRewardItem:
    type: item
    material: i@351
    display name: <&9>I<&3>n<&b>d<&f>e<&b>p<&3>e<&9>n<&3>d<&b>a<&f>n<&b>c<&3>e <&8>Ink
    enchantments:
    - Durability:0
    lore: 
    - Important documents are written with this!