Postgame: type: task debug: true script: - flag server gamestate:Postgame - define winners - 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 - define place - if != null { - announce "<&a><&l>1st place<&7><&co> <&b>" - ^inject s@Postgame_Winners instantly } - 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>" - foreach : - flag server bonuspoints.recordscores:->:.amount]||0>/.player||!> - foreach : - flag server bonuspoints.recordkills:->:.amount]||0>/.player||!> - foreach : - flag server bonuspoints.recordscores:->:/ - flag server bonuspoints.recordkills:->:/ - define killrecord - define scorerecord - repeat 10: - if == 1 { - define scoreplacement li@1 - define killplacement li@1 } else { - if ].is[==].to[]>]>]> { - define scoreplacement ]>]> } else { - define scoreplacement ]> } - if ].is[==].to[]>]>]> { - define killplacement ]>]> } else { - define killplacement ]> } } - foreach : - define player - flag playpoints:+: - define classes - ^inject s@BonusPoints_Postgame instantly - if { - flag bonuspoints.killcount.:++ - flag bonuspoints.current_killcombo:! - flag bonuspoints.latest_killcombo_max:! - foreach { - ^inject s@BonusPoints_KillCount instantly } } - if && { - flag bonuspoints.killstreak.:++ - flag bonuspoints.latest_killstreak_max:! - flag bonuspoints.current_killstreak:! - foreach { - if { - queue clear } else if ]> { - flag bonuspoints.triplekillstreak:++ } else if ]> { - flag bonuspoints.pentakillstreak:++ } else if ]> { - flag bonuspoints.10killstreak:++ } else if ]> { - flag bonuspoints.15killstreak:++ } else if ]> { - flag bonuspoints.20killstreak:++ } else if ]> { - flag bonuspoints.30killstreak:++ } else if ]> { - flag bonuspoints.40killstreak:++ } else if { - flag bonuspoints.50killstreak:++ } } } - if ]||null> != null || ]||null> != null { - ^inject s@BonusPoints_Records instantly } - ^inject s@BonusPoints instantly - ^inject s@YamlUpdate instantly - flag score:0 - flag kills:0 BonusPoints_Records: type: task debug: true script: - choose ]>: - case 1: - flag bonuspoints.1stplacescoresrecord:1 - case 2: - flag bonuspoints.2ndplacescoresrecord:1 - case 3: - flag bonuspoints.3rdplacescoresrecord:1 - case 4: - flag bonuspoints.newscoresrecord:1 - case 5: - flag bonuspoints.newscoresrecord:1 - case 6: - flag bonuspoints.newscoresrecord:1 - case 7: - flag bonuspoints.newscoresrecord:1 - case 8: - flag bonuspoints.newscoresrecord:1 - case 9: - flag bonuspoints.newscoresrecord:1 - case 10: - flag bonuspoints.newscoresrecord:1 - default: - choose ]>: - case 1: - flag bonuspoints.1stplacekillsrecord:1 - case 2: - flag bonuspoints.2ndplacekillsrecord:1 - case 3: - flag bonuspoints.3rdplacekillsrecord:1 - case 4: - flag bonuspoints.newkillsrecord:1 - case 5: - flag bonuspoints.newkillsrecord:1 - case 6: - flag bonuspoints.newkillsrecord:1 - case 7: - flag bonuspoints.newkillsrecord:1 - case 8: - flag bonuspoints.newkillsrecord:1 - case 9: - flag bonuspoints.newkillsrecord:1 - case 10: - flag bonuspoints.newkillsrecord:1 - default: - queue clear