Paste #30172: CapturingResult

Date: 2016/02/11 17:41:08 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


CapturingResult:
    type: task
    script:
    - foreach li@AlorehCount|VrovonaCount|ItheroCount|DaggerlandsCount|ArSelukkCount|RoregCount {
      - if <server.flag[<def[value]>]||0> >= <server.flag[<def[highest]||<def[value]>>]||0> {
        - define highest <def[value]>
        }
    }
    - choose "<def[highest]>":
        - case "VrovonaCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>Vrovona wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>Vrovona has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14
        - case "ItheroCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>Ithero wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>Ithero has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14
        - case "AlorehCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>Aloreh wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>Aloreh has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14
        - case "ArSelukkCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>Ar-Selukk wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>Ar-Selukk has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14
         - case "DaggerlandsCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>The Daggerlands wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>The Daggerlands has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14
        - case "RoregCount":
            - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
                - title "title:<&c><&l>Roreg Logh wins!" "subtitle:<&6>The capture point will unlock in 60 minutes"
            }
         - announce "<&c><&l>[Conquest] <&6>Roreg Logh has captured Baile!"
         - modifyblock <l@-640,63,256,world> minecraft:stained_glass:14