Paste #30109: Diff note for paste #30108

Date: 2016/02/10 17:31:40 UTC-08:00
Type: Diff Report

View Raw Paste Download This Paste
Copy Link


-
 CapturePoints:
-    type: world
-    events:
-        on player breaks block:
-        - note cu@-647,50,263,world|-633,76,250,world as:CapturePoint1
-        on player enters CapturePoint1:
-        - narrate "<&c><&l>[Conquest] <&6>You've entered a capture point!"
-        - flag player InConquest
-        on player exits CapturePoint1:
-        - narrate "<&c><&l>[Conquest] <&6>You've left a capture point!"
-        - flag player InConquest:!
+  type: world
+  events:
+    on player breaks block:
+    - note cu@-647,50,263,world|-633,76,250,world as:CapturePoint1
+    on player enters CapturePoint1:
+    - narrate "<&c><&l>[Conquest] <&6>You've entered a capture point!"
+    - flag player InConquest
+    on player exits CapturePoint1:
+    - narrate "<&c><&l>[Conquest] <&6>You've left a capture point!"
+    - flag player InConquest:!
 
 Capturing_Process:
-    type: task
-    script:
-    
-    - foreach <server.get_online_players_flagged[Aloreh]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global AlorehCount:+:1
-         }
-     }
-    - foreach <server.get_online_players_flagged[Roreg]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global RoregCount:+:1
-         }
-     }
-    - foreach <server.get_online_players_flagged[Vrovona]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global VrovonaCount:+:1
-         }
-     }
-    - foreach <server.get_online_players_flagged[ArSelukk]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global ArSelukkCount:+:1
-         }
-     }
+  type: task
+  script:
+  - foreach <server.list_players.filter[location.is_within[CapturePoint1]]> {
+    - if <player.has_flag[Aloreh]> {
+      - flag server AlorehCount:++
+    }
+    else if <player.has_flag[Roreg]> {
+      - flag server RoregCount:++
+    }
+    else if <player.has_flag[Vrovona]> {
+      - flag server VrovonaCount:++
+    }
+    else if <player.has_flag[ArSelukk]> {
+      - flag server ArSelukkCount:++
+    }
+    else if <player.has_flag[Daggerlands]> {
+      - flag server DaggerlandsCount:++
+    }
+    else if <player.has_flag[Ithero]> {
+      - flag server ItheroCount:++
+    }
+  }
+  - narrate "Test"
-    - foreach <server.get_online_players_flagged[Daggerlands]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global DaggerlandsCount:+:1
-         }
-     }
-    - foreach <server.get_online_players_flagged[Ithero]> {
-         - if <def[value].location.is_within[CapturePoint1]> == true {
-             - flag global ItheroCount:+:1
-         }
-     }
-     - narrate "Test"
 
 Capturing_Result:
-    type: task
-    script:
-    - 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
+  type: task
+  script:
+  - 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