Paste #42348: Untitled Paste

Date: 2017/06/02 22:05:08 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Postgame:
  type: task
  debug: true
  speed: 0
  script:
    - flag server gamestate:Postgame
    - define winners <server.flag[spawns].as_list.sort_by_number[as_player.flag[kills]].sort_by_number[flag[score]].reverse>
    - announce "<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-" 
    - announce "<&2>"
    - announce "<&c><&l>GAME OVER!!!"
    - announce "<&a><&l>1st place<&7><&co> <&b><def[winners].get[1].name||-->"
    - announce "<&e>2nd place<&7><&co> <&b><def[winners].get[2].name||-->"
    - announce "<&c>3rd place<&7><&co> <&b><def[winners].get[3].name||-->"
    - announce "<&2>"
    - announce "<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-<&2>-<&6>-" 
    - announce "<&2>"
    - announce "<&a><&l>This server will be restarting in <&e><&l>15 seconds<&a><&l>."
    - announce "<&b><&l>Bonus Points<&7><&co>"
    - ^run s@Postgame_Winners d:<def[winners]> instantly



Postgame_Winners:
  type: task
  debug: true
  script:
  - foreach li@<def[2]||null>|<def[3]||null>:
    - flag <def[value]> tournamentpoints:+:<s@Config.yaml_key[TournamentPointValues.<el@1.add[<def[loop_index]>]>]>
    - firework <def[value].location.add[0,2,0]> power:1.2 ball primary:yellow fade:red flicker trail
    - if !<def[value].has_flag[bonuspoints.mundane]> {
      - flag <def[value]> bonuspoints.mundane:1
      }
    - if !<def[value].has_flag[bonuspoints.minimalist]> {
      - flag <def[value]> bonuspoints.minimalist:1
      }