Paste #57247: Untitled Paste

Date: 2019/08/23 05:41:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Fisherman:
    type: assignment
    actions:
        on assigment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
        - fisherman_interact
fisherman_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[fisherman_cooldown]>:
                    - chat "Hey! You did a really great job, come back in <player.flag[fisherman_cooldown].expiration.formatted> and I'll give you more work" targets:<player>
                    - disengage
                    - stop
                - if <player.has_flag[fisherman_job]>:
                    - chat "You're doing a great job, keep it up!"
                    - queue clear
                - chat "Hi! are you looking for work?"
                - wait 5t
                - chat "I need some fish catching for me, it'll only take a day?"
                - wait 5t
                - chat "Yes, you'd like to, or No, not this time?"
                - wait 5t
            chat trigger:
                1:
                    trigger: /Yes/
                    script: 
                    - engage
                    - wait 10t
                    - chat "Excellent, for the next 24hours you'll earn money catching fish!"
                    - wait 5t
                    - actionbar "<green> Catching fish will earn you money for the next 24 hours."
                    - flag <player> fisherman_job duration:24h
                    - disengage
                2:
                    trigger: /No/
                    script: 
                    - engage
                    - random:
                      - chat "Next time then"
                      - chat "Aww, that sucks!"
                      - chat "Ok then, cya."
                    - disengage
fisherman_job:
    type: world
    events:
        on player fishes *fish :
        - if <player.has_flag[fisherman_job>:
            - actionbar "<green> you have earned 50p."
            - give money quantity:0.5 
            - stop
expires:
    type: world
    events:
        on player flag fisherman_job expires:
        - flag <player> fisherman_cooldown duration:48h