Date: 2017/10/11 10:35:50 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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!!!"
- repeat 3:
- define player <def[winners].get[<def[value]>]||null>
- define place <def[value]>
- if <def[player]> != null {
- announce "<&a><&l><li@1st|2nd|3rd.get[<def[value]>]> place<&7><&co> <&b><def[player].name||-->"
- run s@Postgame_Winners d:<def[player]>|<def[place]>
}
- 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>"
*** THEN MORE STUFF ***
Postgame_Winners:
type: task
debug: true
script:
- define tpoints <s@Config.yaml_key[TournamentPointValues.<def[2]>].as_int>
- flag <def[1]> tournamentpoints:+:<def[tpoints]>
- narrate "<&b>You placed <li@1st|2nd|3rd.get[<def[2]>]> and have been awarded <&a><def[tpoints]> <&b>Tournament Points!" targets:<def[1]>
- flag <def[1]> top3
- if <def[2]> != 1 {
- firework <def[1].location.add[0,2,0]> power:1.2 ball primary:yellow fade:red flicker trail
- queue clear
}
- flag <def[1]> winner
- flag <def[1]> solowins:+:1
- flag <def[1]> xp:+:<s@Config.yaml_key[XPValues.win]>
- flag <def[1]> alltimewins:+:1
- repeat 10:
- firework <def[1].as_player.location.add[0,2,0]> power:1.2 star primary:blue fade:green flicker trail
- wait 2t