Paste #43871: Untitled Paste

Date: 2017/08/27 17:36:27 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


farmerquest:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - 10 farmerquestinteract

farmerquestinteract:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[frankiedone]> {
                    - if <player.inventory.contains_any[raw_fish].quantity[30]> {
                        - chat "Wha-? What are you... Oh, are those my fish?"
                        - wait 2
                        - chat "Tell Frankie I said thanks. I heard he was feeling under the weather. I had some other things for him to do..."
                        - ^take raw_fish qty:30
                        - wait 2
                        - chat "Since you're here and Frankie is indisposed, maybe you could help me out."
                        - wait 2
                        - chat "I need someone to gather some hay for my barn and bring it in. I'll make it worth your while."
                        - wait 2
                        - narrate "<&o>Type <&a><&o>Yes<&f><&o> or <&c><&o>No<&7>"
                        - disengage
                        - flag player npc_engaged:!
                        - flag player frankiedone:!
                        - flag player farmerfishdone
                        - queue clear
                        }
                - if <player.has_flag[get_hay_quest]> {
                    - if <player.inventory.contains_any[hay_block].quantity[3]> {
                        - chat "Alriiight! Nothin' like some hard work, amirite?"
                        - take hay_block qty.3
                        - wait 2
                        - chat "Okay, then! One more task and then I'll pay you for your time!"
                        - wait 2
                        - chat "I need you to collect me 25 apples from my orchard. I want my apples before CarlyAnn and the rest of those crooks steal them all!"
                        - flag player farmerhaydone
                        - flag player get_hay_quest:!
                        }
                        }
                - if <player.has_flag[get_farmerapple_quest]> {
                    - if <player.inventory.contains_any[apples].quantity[2]> {
                        - chat "Oh, look at all those delicious apples!"
                        - take apples qty.2
                        - wait 2
                        - chat "Now I'll be able to keep them inside and away from that CarlyAnn!"
                        - wait 2
                        - chat "Alright, as promised. Here's your payment for all that hard work!"
                        - give diamond sword
                        - wait 2
                        - chat "If you're ever lookin' for more work, come back and talk to me!"
                        - flag player farmerappledone
                        }
                        }
                - engage
                - chat "Hi there, stranger! Say, you haven't seen anyone in my apple field, have you?"
                - wait 2
                - chat "I swear that CarlyAnn and her friends are stealing my apples, I just haven't caught them..."
                - wait 2
                - chat "...Yet."
                - disengage
                - flag player npc_engaged:!
            chat trigger:
                1:
                    trigger: /Yes/, I don't mind helping out since Frankie is down.
                    script:
                     - engage
                     - wait 1
                     - chat "Thank you, I can always use a strong hand around here."
                     - wait 1
                     - chat "Grab that hay and bring it back in here, I'll help you haul it up."
                     - narrate "<&b>[Collect hay for the Farmer]"
                     - flag player get_hay_quest
                     - flag player get_hay_quest_count:0
                     - disengage
                2:
                    trigger: /No/, not a chance! I got better things to do with my time!
                    script:
                    - random {
                        - chat "That's what's wrong with you kids today, scared of hard work!"
                        - chat "I better not catch you stealing my apples...!"
                        - chat "How rude! Maybe I should teach my cats to eat rude young lazy people instead of fish..."
                    }
get_farmerapples_world:
    type: world
    events:
        on player takes hay_block:
        - flag player get_hay_quest_count:++
        - if <player.inventory.contains_any[hay_block].quantity[3]> {
            - if <player.flag[get_hay_quest_count]> == 3 {
                - narrate "<&b>[Return to the Farmer with his hay!]"
                - flag player get_hay_quest
                }
                }
        on player takes apple:
        - flag player get_apples_quest_count:++
        - if <player.inventory.contains_any[apple].quantity[2]> {
            - if <player.flag[get_apples_quest_count]> == 2 {
                - narrate "<&b>[Return to the Farmer with his apples!]"
                - flag player get_farmerapple_quest    
                }
                }