Aller au contenu
  • 0

Besoin d'aide (Loop-players)


Question

Posté(e)

Bonjour,

J'ai codé entièrement un skript uhc qui fonctionne mais j'ai juste 1 problème : Le tp des joueurs !

Alors en fait je vais vous mettre le code pour que vous voyez :

loop all players in "uhclobby":

execute console command "/spreadplayers 0 0 75 76 false %loop-player%"

Mais il me dis :

There are multiple loop thats ...

Pouvez vous m'aider ? (Desolé pour les balise de code je suis sur mobile)

13 réponses à cette question

Messages recommandés

  • 0
Posté(e)
#Please don't copy this skript !

variables:
{players} = 0
{ingame.%player%} = 0
{countdown} = 0
{damages} = 0
{pvp} = 0
{pvptime} = 1140
{died.%player%} = 0
{enjeu} = 0
{nether} = 1
{borduretime} = 2400
{starting} = 0
{winner} = "None"
{kills.%player%} = 0
{spawn} = 0

options:

logo: &9[uHC]&6

on load:
set {players} to 0

on place:
if player is in world "uhc1":
cancel event
on break:
if player is in world "uhc1":
cancel event
on rightclick with a wooden door:
if player is in world "uhc1":
wait 0.25 seconds
make player execute command "/hub"
on rightclick with a green wool:
if player is in world "uhc1":
make player execute command "/game start"
wait 1 seconds
set {starting} to 1
loop all players in "uhc1":
execute console command "/execute @a ~ ~ ~ clear %loop-player% green_wool"
on command "/hub":
execute console command "/gamemode 0 %player%"
on quit:
if {ingame.%player%} is equal to 1:
broadcast "{@logo} &e%player% &6a quitte la partie &a(%{players}%/10)" in "uhc1"
broadcast "{@logo} &e%player% &6a quitte la partie &a(%{players}%/10)" in "uhc1"
broadcast "{@logo} &e%player% &6a quitte la partie &a(%{players}%/10)" in "uhc1_nether"
add -1 to {players}
set {ingame.%player%} to 0
on command "/hub":
make player execute command "/game quit"
on command "/lobby":
make player execute command "/game quit"
on command "/warp":
make player execute command "/game quit"
on command "/home":
make player execute command "/game quit"
on damage of player:
if {damages} is equal to 0:
if {ingame.%victim%} is equal to 1:
cancel event
on damage of player:
if {pvp} is equal to 0:
if {ingame.%victim%} is equal to 1:
if attacker is a player:
cancel event
on death of player:
if {ingame.%player%} is equal to 1:
set {died.%player%} to 1
add -1 to {players}
set {ingame.%player%} to 0
if attacker is a player:
broadcast "{@logo} &e%victim% &6was rekt by &e%attacker% &6!" in "uhc1"
broadcast "{@logo} &e%victim% &6was rekt by &e%attacker% &6!" in "uhc1_nether"
else:
broadcast "{@logo} &e%victim% &6est mort !" in "uhc1"
broadcast "{@logo} &e%victim% &6est mort !" in "uhc1_nether"
loop all players in "uhc1":
execute console command "/execute %loop-player% ~ ~ ~ playsound mob.wither.spawn %loop-player% ~ ~ ~ 1 1"
loop all players in "uhc1_nether":
execute console command "/execute %loop-player% ~ ~ ~ playsound mob.wither.spawn %loop-player% ~ ~ ~ 1 1"
if {players} is equal to 1:
if {enjeu} is equal to 1:
loop all players in "uhc1":
if {ingame.%loop-player%} is equal to 1:
broadcast "{@logo} %loop-player% gagne la partie !"
set {ingame.%loop-player%} to 0
set {winner} to loop-player
execute console command "/money give %loop-player% 500"
wait 5 seconds
execute console command "/game restart"
if {players} is equal to 1:
if {enjeu} is equal to 1:
broadcast "{@logo} Il faut retourner dans l'overworld pour gagner la partie !" in "uhc1_nether"
if {players} is equal to 0:
if {enjeu} is equal to 1:
broadcast "{@logo} Fin de la partie ! Il n'y a pas de gagnant !" in "uhc1"
broadcast "{@logo} Fin de la partie ! Il n'y a pas de gagnant !" in "uhc1_nether"
wait 5 seconds
execute console command "/game restart"
on respawn:
if {died.%player%} is equal to 1:
set {died.%player%} to 0
set {ingame.%player%} to 0
wait 0.10 seconds
execute console command "/gamemode 3 %player%"
message "{@logo} Faites /hub pour revenir au hub !"
command /game <text> [<player=%player%>]:
trigger:
if {ingame.%player%} is equal to 0:
if arg 1 is "join":
if {players} is smaller than 10:
if {enjeu} is equal to 0:
heal player-arg
set food bar to 20
apply saturation 2 to player-arg for 999999 seconds
execute console command "/mv tp %player-arg% uhc1"
add 1 to {players}
set {ingame.%player-arg%} to 1
broadcast "{@logo} &e%player-arg% &6a rejoint la partie &a(%{players}%/10)" in "uhc1"
execute console command "/minecraft:clear %player-arg%"
set slot 0 of player-arg to green wool named "&2&lForceStart &5&l(Admin)"
set slot 8 of player-arg to wood door named "&4&lQuitter la Partie"
if {player} is equal to 1:
execute console command "/game startwaitroom"
if {spawn} is equal to 0:
loop all players in "uhc1":
execute console command "/execute %loop-player-1% ~ ~ ~ fill 20 150 20 -20 150 -20 minecraft:glass"
execute console command "/execute %loop-player-1% ~ ~ ~ fill 20 150 20 20 170 -20 minecraft:glass"
execute console command "/execute %loop-player-1% ~ ~ ~ fill 20 150 -20 -20 170 -20 minecraft:glass"
execute console command "/execute %loop-player-1% ~ ~ ~ fill -20 150 -20 -20 170 20 minecraft:glass"
execute console command "/execute %loop-player-1% ~ ~ ~ fill -20 150 20 20 170 20 minecraft:glass"
execute console command "/tp %loop-player-1% 0 152 0"
execute console command "/execute %loop-player-1% ~ ~ ~ mv setspawn"
set {spawn} to 1
if {enjeu} is equal to 1:
message "&aStarting spectating uhc1 !"
execute console command "/mv tp %player-arg% uhc1"
execute console command "/gamemode 3 %player-arg%"
message "{@logo} Faites /hub pour quitter !"
if arg 1 is "startwaitroom":
loop 200000 times:
wait 15 seconds
if {players} is equal to 5:
execute console command "/game start"
exit loop
else if {players} is equal to 0:
exit loop
else:
broadcast "{@logo} Il manque &e%4 - {players}% joueurs &6pour commencer" in "uhc1"
wait 15 seconds
if arg 1 is "start":
if {starting} is equal to 0:

  • 0
Posté(e)
loop all players in "uhc1":
execute console command "/clear %loop-player% greenwool"
set {countdown} to 61
loop 61 times:
wait 1 seconds
add -1 to {countdown}
set {starting} to 1
loop all players in "uhc1":
set level of loop-player to {countdown}
if {countdown} is 60 , 30 , 20 , 15 , 10 , 5 , 4 , 3 , 2 or 1: 
broadcast "{@logo} La partie demarre dans &e%{countdown}% seconde(s) &6!" in "uhc1"
loop all players in "uhc1":
execute console command "/execute %loop-player% ~ ~ ~ playsound note.harp %loop-player% ~ ~ ~ 1 1"
while {countdown} is equal to 1:
set {starting} to 0
wait 1 seconds
set {countdown} to -1
loop all players in "uhc1":
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule sendCommandFeedback false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule logAdminCommands false"
wait 0.25 seconds
execute console command "/time set 12:00 uhc1"
execute console command "/spreadplayers 0 0 750 751 true %loop-player%"
execute console command "/tp %loop-player% ~ 130 ~"
execute console command "/execute %loop-player% ~ ~ ~ worldborder set 2000"
loop all players in "uhc1":
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule naturalRegeneration false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule doDaylightCycle false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule commandBlockOutput false"
execute console command "/execute @a ~ ~ ~ effect %loop-player-1% saturation 60 0 true"
execute console command "/execute @a ~ ~ ~ effect %loop-player-1% regeneration 5 200 true"
set {damages} to 0
set {pvp} to 0
set {enjeu} to 1
broadcast "{@logo} Demarrage de la partie ! Tu es insensible aux degats pendant 60 secondes !" in "uhc1"
wait 60 seconds
set {damages} to 1
broadcast "{@logo} Degats actifs, faites attention !" in "uhc1"
broadcast "{@logo} Degats actifs, faites attention !" in "uhc1_nether"
loop 1140 times:
wait 1 seconds
add -1 to {pvptime}
if {pvptime} is 600 , 300 , 120 , 60 , 10 , 5 , 4 , 3 , 2 or 1:
broadcast "{@logo} PvP actif dans &e%{pvptime}% seconde(s) &6!" in "uhc1"
broadcast "{@logo} PvP actif dans &e%{pvptime}% seconde(s) &6!" in "uhc1_nether"
loop all players in "uhc1":
execute console command "/execute @a ~ ~ ~ playsound note.bass %loop-player-1% ~ ~ ~ 1 1"
loop all players in "uhc1_nether":
execute console command "/execute @a ~ ~ ~ playsound note.bass %loop-player-1% ~ ~ ~ 1 1"
while {pvptime} is equal to 1:
wait 1 seconds
set {pvptime} to -1
set {pvp} to 1
broadcast "{@logo} PvP active, preparez votre epee !" in "uhc1"
broadcast "{@logo} PvP active, preparez votre epee !" in "uhc1_nether"
loop 2400 times:
wait 1 seconds
add -1 to {borduretime}
if {borduretime} is 1800 , 900 , 600 , 300 , 60 , 5 , 4 , 3 , 2 or 1:
broadcast "{@logo} La bordure sera en mouvement dans &e%{borduretime}% seconde(s) &6!" in "uhc1"
broadcast "{@logo} La bordure sera en mouvement dans &e%{borduretime}% seconde(s) &6!" in "uhc1_nether"
loop all players in "uhc1":
execute console command "/execute @a ~ ~ ~ playsound note.bass %loop-player-1% ~ ~ ~ 1 1"
loop all players in "uhc1_nether":
execute console command "/execute @a ~ ~ ~ playsound note.bass %loop-player-1% ~ ~ ~ 1 1"
while {borduretime} is equal to 1:
wait 1 seconds
set {borduretime} to -1
loop all players in "uhc1":
execute console command "/execute %loop-player-1% ~ ~ ~ worldborder set 100 1000"
broadcast "{@logo} La bordure est des maintenant en mouvement !" in "uhc1"
broadcast "{@logo} Le Nether est des maintenant desactive ! Teleportation des joueurs dans l'overworld !"
loop all players in "uhc1_nether":
execute console command "/execute @a ~ ~ ~ mv tp %loop-player-1% uhc1"
wait 0.25 seconds
execute console command "/execute @a ~ ~ ~ spreadplayers 0 0 75 76 true %loop-player-1%"
set {nether} to 0
if arg 1 is "restart":
broadcast "&8[&4Alerte&8] &6La regeneration du monde uhc peut causer des lags pendant 5 seconds environ !"
loop all players in "uhc1":
execute console command "/mv tp %loop-player% Hub"
execute console command "/gamemode 0 %loop-player%"
loop all players in "uhc1_nether":
execute console command "/mv tp %loop-player% Hub"
execute console command "/gamemode 0 %loop-player%"
execute console command "/mv regen uhc1 -s"
wait 1 seconds
execute console command "/mv confirm"
wait 11 seconds
execute console command "/mv regen uhc1_nether"
wait 1 seconds
execute console command "/mv confirm"
wait 11 seconds
execute console command "/resettimer"
set {starting} to 0
set {enjeu} to 0
set {spawn} to 0
set {players} to 0
set {pvp} to 0
set {borduretime} to 2400
set {damages} to 0
set {pvptime} to 1140
set {countdown} to 61
execute console command "/sk reload uhc"
execute console command "/minecraft:worldborder set 2000"
set {nether} to 1
if arg 1 is "quit":
if {ingame.%player-arg%} is equal to 1:
add -1 to {players}
broadcast "{@logo} &e%player-arg% &6a quitte la partie &a(%{players}%/10)" in "uhc1"
broadcast "{@logo} &e%player-arg% &6a quitte la partie &a(%{players}%/10)" in "uhc1"
broadcast "{@logo} &e%player-arg% &6a quitte la partie &a(%{players}%/10)" in "uhc1_nether"
execute console command "/mv tp %player-arg% hub"
set {ingame.%player-arg%} to 0
on player portal:
if {nether} is equal to 1:
if {ingame.%player%} is equal to 1:
loop all players in "uhc1_nether":
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule logAdminCommands false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule sendCommandFeedback false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule naturalRegeneration false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule doDaylightCycle false"
execute console command "/execute %loop-player-1% ~ ~ ~ gamerule commandBlockOutput false"
if {nether} is equal to 0:
cancel event
message "{@logo} Le nether est desactive !"
if {players} is equal to 1:
if {enjeu} is equal to 1:
loop all players in "uhc1":
broadcast "{@logo} %loop-player% gagne la partie !"
set {winner} to loop-player
set {ingame.%loop-player%} to 0
execute console command "/money give %loop-player% 500"
wait 5 seconds
execute console command "/game restart"
command /revive [<player=%player%>]:
permission: admin
trigger:
if {ingame.%player-arg%} is equal to 0:
execute console command "/mv tp %player-arg% uhc1"
execute console command "/gamemode 0 %player-arg%"
execute console command "/minecraft:clear %player-arg%"
add 1 to {players}
set {ingame.%player-arg%} to 1
broadcast "{@logo} &e%player-arg% &6a ete ressucite !" in "uhc1"
on break leaves:
if player is in world "uhc1":
chance of 10%
drop 1 apple
command /pvp on:
permission: admin
trigger:
broadcast "{@logo} Forced enable of pvp !" in "uhc1"
broadcast "{@logo} Forced enable of pvp !" in "uhc1_nether"
set {pvp} to 1
on drop:
if {enjeu} is equal to 0:
if player is in world "uhc1":
cancel event
command /resettimer:
permission: admin
trigger:
set {starting} to 0
set {countdown} to 61
set {enjeu} to 0
message "{@logo} Timer reset !"

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.