Paste #39794: Untitled Paste

Date: 2017/02/09 13:46:09 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Profishing:
  type: world
  events:
    on server start:
    - note cu@737,124,-988,world|797,60,-1049,world as:ProfishingArea
    on player enters ProfishingArea:
    - flag player IsProfishing
    on player exits ProfishingArea:
    - flag player IsProfishing:!
    on player fishes:
    - if <context.state> == caught_fish {
        - if <player.flag[IsProfishing]> {
            - if <server.has_flag[ProfishingTournament]> {
                - ^random 20
                - ^run ProtournamentMicro
                - ^run ProtournamentMicro
                - ^run ProtournamentTiny
                - ^run ProtournamentTiny
                - ^run ProtournamentTiny
                - ^run ProtournamentSmall
                - ^run ProtournamentSmall
                - ^run ProtournamentSmall
                - ^run ProtournamentSmall
                - ^run ProtournamentSmall
                - ^run ProtournamentMedium
                - ^run ProtournamentMedium
                - ^run ProtournamentMedium
                - ^run ProtournamentMedium
                - ^run ProtournamentLarge
                - ^run ProtournamentLarge
                - ^run ProtournamentLarge
                - ^run ProtournamentVeryLarge
                - ^run ProtournamentVeryLarge
                - ^run ProtournamentGigantic
                } else {
                - ^random 20
                - ^run ProfishMicro
                - ^run ProfishMicro
                - ^run ProfishTiny
                - ^run ProfishTiny
                - ^run ProfishTiny
                - ^run ProfishSmall
                - ^run ProfishSmall
                - ^run ProfishSmall
                - ^run ProfishSmall
                - ^run ProfishSmall
                - ^run ProfishMedium
                - ^run ProfishMedium
                - ^run ProfishMedium
                - ^run ProfishMedium
                - ^run ProfishLarge
                - ^run ProfishLarge
                - ^run ProfishLarge
                - ^run ProfishVeryLarge
                - ^run ProfishVeryLarge
                - ^run ProfishGigantic
                }
            }
        }
    on profishingreset command:
    - flag server ProfishingWinnerScore:0
    - ^foreach <server.list_players> {
        - flag <def[value]> ProtournamentCoins:0
        }
    - narrate "Scores have been reset"
    - determine fulfilled
    on profishingstart command:
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 5 minutes!"
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 4 minutes!"
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 3 minutes!"
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 2 minutes!"
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 1 minute!"
#    - wait 30
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 30 seconds!"
#    - wait 20
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament starts in 10 seconds!"
    - wait 10
    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament has started! Get fishing!"
    - flag server ProfishingTournament
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Nine minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Eight minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Seven minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Six minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Five minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Four minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Three minutes remaining."
#    - wait 60
#    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Two minutes remaining."
#    - wait 60
    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>One minute remaining."
    - wait 50
    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>Ten seconds remaining."
    - wait 10
    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The extreme profishing tournament has ended!"
    - flag server ProfishingTournament:!
    - ^foreach <server.list_online_players> {
        - if <player.flag[ProtournamentCoins].as_int||0> > <server.flag[ProfishingWinnerScore].as_int||0> {
            - flag server ProfishingWinner:<def[value]>
            - flag server ProfishingWinnerScore:<<def[value]>.flag[ProtournamentCoins]||0>
            }
        }
    - announce "<gray>[<blue>P<white>r<blue>o<white>f<blue>i<white>s<blue>h<white>i<blue>n<white>g<gray>] <blue>The player <white><server.flag[ProfishingWinner]><blue> has won with <white><server.flag[ProfishingWinnerScore].as_int||0> <blue>points!"

ProfishMicro:
  type: task
  script:
    - narrate "<blue>You just caught a <white>microscopic <blue>fish! <gray>[<white>1 Profishing Coin<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_NO pitch:0.8
    - ^flag player ProfishingCoins:+:1

ProfishTiny:
  type: task
  script:
    - narrate "<blue>You just caught a <white>tiny <blue>fish! <gray>[<white>2 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_NO pitch:0.8
    - ^flag player ProfishingCoins:+:2

ProfishSmall:
  type: task
  script:
    - narrate "<blue>You just caught a <white>small <blue>fish! <gray>[<white>3 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_AMBIENT pitch:0.8
    - ^flag player ProfishingCoins:+:3

ProfishMedium:
  type: task
  script:
    - narrate "<blue>You just caught a <white>medium <blue>fish! <gray>[<white>5 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_AMBIENT pitch:0.8
    - ^flag player ProfishingCoins:+:5

ProfishLarge:
  type: task
  script:
    - narrate "<blue>You just caught a <white>large <blue>fish! <gray>[<white>10 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8
    - ^flag player ProfishingCoins:+:10

ProfishVeryLarge:
  type: task
  script:
    - narrate "<blue>You just caught a <white>very large <blue>fish! <gray>[<white>15 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8
    - ^flag player ProfishingCoins:+:15

ProfishGigantic:
  type: task
  script:
    - narrate "<blue>You just caught a <white>gigantic <blue>fish! <gray>[<white>25 Profishing Coins<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8
    - ^flag player ProfishingCoins:+:25

ProtournamentMicro:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:1
    - narrate "<blue>You just caught a <white>microscopic <blue>fish! <gray>[<white>1 Profishing point, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_NO pitch:0.8

ProtournamentTiny:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:2
    - narrate "<blue>You just caught a <white>tiny <blue>fish! <gray>[<white>2 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_NO pitch:0.8

ProtournamentSmall:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:3
    - narrate "<blue>You just caught a <white>small <blue>fish! <gray>[<white>3 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_AMBIENT pitch:0.8

ProtournamentMedium:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:5
    - narrate "<blue>You just caught a <white>medium <blue>fish! <gray>[<white>5 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_AMBIENT pitch:0.8

ProtournamentLarge:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:10
    - narrate "<blue>You just caught a <white>large <blue>fish! <gray>[<white>10 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8

ProtournamentVeryLarge:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:15
    - narrate "<blue>You just caught a <white>very large <blue>fish! <gray>[<white>15 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8

ProtournamentGigantic:
  type: task
  script:
    - ^flag player ProtournamentCoins:+:25
    - narrate "<blue>You just caught a <white>gigantic <blue>fish! <gray>[<white>25 Profishing points, <player.flag[ProtournamentCoins].asint> total.<gray>]"
    - playsound location:<player.location> sound:ENTITY_VILLAGER_YES pitch:0.8