Paste #18362: sco2

Date: 2015/07/19 03:41:21 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Scoreboard:
  type: world
  events:
    on server start:
    - if <global.flag[activscore]> == true run looping_scoreboard instantly
    on server reload:
    - if <global.flag[activscore]> == true flag global activscore:!
activate_scoreboard:
    type: task
    script:
    - if <global.flag[activscore]> == true {
      - flag global activscore:false
      - narrate "<&c>Desactivation Manuelle<&f> de l'Affichage Dynamique..."
      - announce to_console "<&c>Desactivation<&f> de l'Affichage Dynamique..." }
      else {
      - flag global activscore:true
      - narrate "<&a>Activation Manuelle<&f> de l'Affichage Dynamique..."
      - announce to_console "<&a>Activation<&f> de l'Affichage Dynamique..."
      - run looping_scoreboard instantly }
looping_scoreboard:
    type: task
    script:
    - if <global.flag[activscore]> == true {
      - foreach <server.list_online_players> {
        - run player_scoreboard player:<def[value]> instantly
        }
      - run looping_scoreboard instantly delay:40t
      }
player_scoreboard:
    type: task
    script:
    - if p@<player.name> MATCHES onlineplayer {
      - define ID <player.name><server.current_time_millis>
      - flag garde:!
      - scoreboard add id:<def[ID]>
#il manque peut etre les scores, mais c'est pas beau sinon.... A TROUVER SOLUTION ! (score:14) -> TROUVE
#      - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Genre <&co>" 
      - if <global.flag[<player.name>_QuestH]> > 0 {
        - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e>Humain" score:<global.flag[QuestH].as_int> }
      - if <global.flag[<player.name>_QuestD]> > 0 {
        - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e>Demon" score:<global.flag[QuestD].as_int> }
      - if <global.flag[<player.name>_QuestB]> > 0 {
        - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e>Exile" score:<global.flag[QuestB].as_int> }
      - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Karma <&co>" score:<global.flag[<player.name>_karma].as_int>
#      - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><global.flag[<player.name>_karma]>" 
      - if <player.flag[rech]> > 0 && <player.flag[rech]> != null {
        - if <cu@Karcharias.list_players> CONTAINS <player.name> && <global.flag[<player.name>_gardekar]> == true {
          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Indice de Recherche <&co>" score:<player.flag[rech].as_int> }
#          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><player.flag[rech].as_int>" }
        - if <cu@Elbnaris.list_players> CONTAINS <player.name> == true && <global.flag[<player.name>_gardelb]> == true {
          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Indice de Recherche <&co>" score:<player.flag[rech].as_int> }
#          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><player.flag[rech].as_int>" }
        - if <cu@Elinat.list_players> CONTAINS <player.name> == true && <global.flag[<player.name>_gardeli]> == true {
          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Indice de Recherche <&co>" score:<player.flag[rech].as_int> }
#          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><player.flag[rech].as_int>" }
        - if <cu@Sheotemp.list_players> CONTAINS <player.name> == true && <global.flag[<player.name>_gardeshe]> == true {
          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Indice de Recherche <&co>" score:<player.flag[rech].as_int> }
#          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><player.flag[rech].as_int>" }
        - if <cu@Domuel.list_players> CONTAINS <player.name> == true && <global.flag[<player.name>_gardedom]> == true {
          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Indice de Recherche <&co>" score:<player.flag[rech].as_int> }
#          - scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&e><player.flag[rech].as_int>" }
        - if <player.flag[rech]> == 10 flag scoreboard add id:<def[ID]> "objective:<&6>Stats" "lines:<&c>Recherche toute Ville" }
      - scoreboard add id:<def[ID]> viewers:<player>
      - wait 2s
      - scoreboard remove id:<def[ID]>
      }