SaoRex Posté(e) le 7 juin 2016 Posté(e) le 7 juin 2016 Bonjour, J'aimerais bien avoir un skript permétant d'afficher deux scoreboard, qui tout les 1 à 2 min changent pour voir l'autre scoreboard. Voilà les scorboard que je voudrait : - Un scoreboard affichant le nombre de kills des joueurs et le nombre de personne tué par des mobs (nommé PvE), - Un scoreboard affichant le timer de la partie, compte à rebourd pour l'activation du PvP Je vous remercie d'avance, SaoRex
Maarfum Posté(e) le 9 juin 2016 Posté(e) le 9 juin 2016 Salut, je t'aide un minimum pour pas te laisser dans le vide :x Je te passe un mini-code qui pourrait peut-être t'aider. En espérant que quelqu'un t'aide. Bonne journée Command /score: trigger: display board named "&k-=- &6&l %player%&f &k-=-" to player make score "&f" in board of player to 4 make score "&6>&f> Vos kills : " in board of player 3 make score "&6>&f> %{kills.%player%}%" in board of player 2 make score "&7" in board of player to 1 move display of player to sidebar on death of player: loop all players: make loop-player execute command "/score" add 1 to {kills.%attacker%}
minegomme Posté(e) le 9 juin 2016 Posté(e) le 9 juin 2016 Salut, Je t'ai fait rapidement ça, j'ai testé et je n'ai pas d'erreurs (juste des avertissement comme quoi les variables se ressemblent mais rien de grave). Tu es bien évidemment libre de modifier ce que tu veux, mais je te laisse te débrouiller, comme ça tu pourras comprendre le code ;) J'ai pas trop optimisé par contre mais je n'ai pas eu de chute de TPS, j'imagine donc qu'il n'en nécessite pas. Bonne soirée ;) PS : Voici un aperçu de ce que ça donne : on load: set {min} to 0 set {kills.pve} to 0 loop all players: set {kills.%loop-player%} to 0 on join: if {kills.%player%} is not set: set {kills.%player%} to 0 set name of sidebar of player to "&6&m-----&a UHC &6&m-----" set id based score "&7&m ---&7 Infos &7&m ---" in sidebar of player to 0 with id "uhc1" set id based score "&6Vos kills: &e%{kills.%player%}%" in sidebar of player to -1 with id "uhc2" set id based score "&6Kills du PvE: &e%{kills.pve}%" in sidebar of player to -2 with id "uhc3" set id based score "&7&m ---&7 Temps &7&m ---" in sidebar of player to -3 with id "uhc4" set id based score "&7&m-------------" in sidebar of player to -5 with id "uhc6" on death of a player: if attacker is a player: add 1 to {kills.%attacker%} update score with id "uhc2" to "&6Vos kills: &e%{kills.%player%}%" and -1 else: add 1 to {kills.pve} update score with id "uhc3" to "&6Kills du PvE: &e%{kills.pve}%" and -2 command /score: trigger: if player is op: if {min} is greater than 0: set id based score "&6Meetup: &e%{min}%" in sidebar of player to -4 with id "uhc5" loop {min} times: add -1 to {min} if {min} is greater than 0: update score with id "uhc5" to "&6Meetup: &e%{min}%min" and -4 wait 1 minute else: delete score with id "uhc5" broadcast "Le meetup est arrivé ! Dirigez-vous vers le centre de la carte sans vous arrêter (sauf pour se combattre) !" stop else: send "Le temps avant le meetup n'a pas été défini !" command /meetup <number>: trigger: set {min} to (arg 1 + 1) #On en met un en plus car la décrémentation commence instantanément
SaoRex Posté(e) le 10 juin 2016 Auteur Posté(e) le 10 juin 2016 Coucou, Moi dans ma console ça fait bugger voilà les errors. [16:41:36] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 10: set name of sidebar of player to "&6&m-----&a UHC &6&m-----"') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 11: set id based score "&7&m ---&7 Infos &7&m ---" in sidebar of player to 0 with id "uhc1"') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 12: set id based score "&6Vos kills: &e%{kills.%player%}%" in sidebar of player to -1 with id "uhc2"') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 13: set id based score "&6Kills du PvE: &e%{kills.pve}%" in sidebar of player to -2 with id "uhc3"') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 14: set id based score "&7&m ---&7 Temps &7&m ---" in sidebar of player to -3 with id "uhc4"') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 15: set id based score "&7&m-------------" in sidebar of player to -5 with id "uhc6"') [16:41:37] [server thread/ERROR]: [skript] 'update score with id "uhc2" to "&6Vos kills: &e%{kills.%player%}%" and -1' is not a boolean (yes/no) (Timer.sk, line 20: update score with id "uhc2" to "&6Vos kills: &e%{kills.%player%}%" and -1') [16:41:37] [server thread/ERROR]: [skript] 'update score with id "uhc3" to "&6Kills du PvE: &e%{kills.pve}%" and -2' is not a boolean (yes/no) (Timer.sk, line 23: update score with id "uhc3" to "&6Kills du PvE: &e%{kills.pve}%" and -2') [16:41:37] [server thread/ERROR]: [skript] 'player' is not an item stack (Timer.sk, line 29: set id based score "&6PvP: &e%{min}%" in sidebar of player to -4 with id "uhc5"') [16:41:37] [server thread/ERROR]: [skript] 'update score with id "uhc5" to "&6Meetup: &e%{min}%min" and -4' is not a boolean (yes/no) (Timer.sk, line 33: update score with id "uhc5" to "&6Meetup: &e%{min}%min" and -4') [16:41:37] [server thread/ERROR]: [skript] 'score with id "uhc5"' is not an entity type (Timer.sk, line 36: delete score with id "uhc5"')
minegomme Posté(e) le 10 juin 2016 Posté(e) le 10 juin 2016 As-tu la dernière version de Skript et tous les addons basiques ?
SaoRex Posté(e) le 10 juin 2016 Auteur Posté(e) le 10 juin 2016 Peut être pas, ou est t'elle disponible ?
Messages recommandés