Version Skript: 2.1.1
Version serveur: cauldron 1.7.10
Bonjours je n'arrive pas a détecté le dernier joueurs en vie dans mon miniijeux ?
je sais qu'il y a déjà un topic sur le sujet voir ici :
Mais je n'arrive pas à l’intégré au mien quelqu'un a une solution? Voici mon skript:
on walk on 159:5:
if player is in "Jeux":
if entity is a player:
if player has 1 40 named "&c1 UP":
add 1 to {Nombre.Joueur}
wait 1 tick
make console execute command "tp %player% 1508 50 1240"
wait 1 tick
remove 1 40 named "&c1 UP" from the player
send "&4&lUne vie en moins!! :("
else:
delete {Join.%player%}
clear player' inventory
make console execute command "tp %player% 1508 67 1240"
send "&4Plus de vie perdu!!!"
broadcast "&4%player% a perdu!!! boo :P"
remove 1 from {Nombre.Joueur}
stop
on walk on 159:3:
if player is in "Jeux":
if entity is a player:
if player has 1 40 named "&c1 UP":
add 1 to {Nombre.Joueur}
wait 1 tick
make console execute command "tp %player% 1488 50 1220"
wait 1 tick
remove 1 40 named "&c1 UP" from the player
send "&4&lUne vie en moins!! :("
else:
delete {Join.%player%}
clear player' inventory
make console execute command "tp %player% 1488 67 1220"
send "&4Plus de vie perdu!!!"
broadcast "&4%player% a perdu!!! boo :P"
remove 1 from {Nombre.Joueur}
stop
on walk on 159:4:
if player is in "Jeux":
if entity is a player:
if player has 1 40 named "&c1 UP":
add 1 to {Nombre.Joueur}
wait 1 tick
make console execute command "tp %player% 1508 50 1200"
wait 1 tick
remove 1 40 named "&c1 UP" from the player
send "&4&lUne vie en moins!! :("
else:
delete {Join.%player%}
clear player' inventory
make console execute command "tp %player% 1508 67 1200"
send "&4Plus de vie perdu!!!"
broadcast "&4%player% a perdu!!! boo :P"
remove 1 from {Nombre.Joueur}
stop
on walk on 159:14:
if player is in "Jeux":
if entity is a player:
if player has 1 40 named "&c1 UP":
add 1 to {Nombre.Joueur}
wait 1 tick
make console execute command "tp %player% 1528 50 1220"
wait 1 tick
remove 1 40 named "&c1 UP" from the player
send "&4&lUne vie en moins!! :("
else:
delete {Join.%player%}
clear player' inventory
make console execute command "tp %player% 1528 67 1220"
send "&4Plus de vie perdu!!!"
broadcast "&4%player% a perdu!!! boo :P"
remove 1 from {Nombre.Joueur}
stop
command /Game1:
trigger:
wait 1 tick
if player's helmet and player's chestplate and player's leggings and player's boots is empty:
if items in player's inventory is not set:
if player is in "Jeux":
open chest with 1 row named "&6&lPoussePousse" to player
format slot 0 of player with 35:14 named "&4&lRouge" to close then run [make player execute command "/Couleur§ 1"]
format slot 1 of player with 35:1 named "&6&lOrange" to close then run [make player execute command "/Couleur§ 2"]
format slot 2 of player with 35:3 named "&bBleu" to close then run [make player execute command "/Couleur§ 3"]
format slot 3 of player with 35:15 named "&0&lNoir" to close then run [make player execute command "/Couleur§ 4"]
format slot 4 of player with 35:5 named "&a&lVert" to close then run [make player execute command "/Couleur§ 5"]
format slot 5 of player with 35:4 named "&e&lJaune" to close then run [make player execute command "/Couleur§ 6"]
format slot 6 of player with 35:2 named "&d&lViolet" to close then run [make player execute command "/Couleur§ 7"]
format slot 7 of player with 35:7 named "&7&lGris" to close then run [make player execute command "/Couleur§ 8"]
format slot 8 of player with 152 named "&4&lSortir" to close
else:
send "&4&lVide ton inventaire"
else:
send "&4&lRetire ton armure"
stop
command /Couleur§ <number>:
trigger:
if arg 1 is 1:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.rouge} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1508 54 1239"
set {Couleur.rouge} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &4rouge"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 2:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.orange} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1521 54 1207"
set {Couleur.orange} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &6orange"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 3:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.bleu} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1489 54 1220"
set {Couleur.bleu} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &bbleu"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 4:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.noir} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1527 54 1220"
set {Couleur.noir} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &0noir"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 5:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.vert} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1521 54 1233"
set {Couleur.vert} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &avert"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 6:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.jaune} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1495 54 1207"
set {Couleur.jaune} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &ejaune"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 7:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.violet} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1508 54 1201"
set {Couleur.violet} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &5violet"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
if arg 1 is 8:
if {PartieOn} is not set:
if player is in "Jeux":
if {Join.%player%} is not set:
if {Couleur.gris} is not set:
add 1 to {Nombre.Joueur}
make console execute command "tp %player% 1495 54 1233"
set {Couleur.gris} to true
set {Join.%player%} to true
give 3 40 named "&c1 UP" to player
give 1 280 of knockback 4 to player
broadcast "&a%player% est dans la cage &7 gris"
else:
send "&4&lLa place est deja prise"
else:
send "&4&lTu a deja choisi ta place"
else:
send "&4La partie a deja commencer merci de patienter"
command /Terminer:
permission: Pousse
trigger:
set {Nombre.Joueur} to 0
delete {PartieOn}
set block at {Block.rouge} to a 20
set block at {Block.orange} to a 20
set block at {Block.bleu} to a 20
set block at {Block.noir} to a 20
set block at {Block.vert} to a 20
set block at {Block.jaune} to a 20
set block at {Block.violet} to a 20
set block at {Block.gris} to a 20
delete {Couleur.rouge}
delete {Couleur.orange}
delete {Couleur.bleu}
delete {Couleur.noir}
delete {Couleur.vert}
delete {Couleur.jaune}
delete {Couleur.violet}
delete {Couleur.gris}
Options:
X1: 1508
Y1: 53
Z1: 1239
X2: 1521
Y2: 53
Z2: 1207
X3: 1489
Y3: 53
Z3: 1220
X4: 1527
Y4: 53
Z4: 1220
X5: 1521
Y5: 53
Z5: 1233
X6: 1495
Y6: 53
Z6: 1207
X7: 1508
Y7: 53
Z7: 1201
X8: 1495
Y8: 53
Z8: 1233
World: Jeux
on script load:
set {Block.rouge} to location at {@X1}, {@Y1}, {@Z1} of the world "{@World}"
set {Block.orange} to location at {@X2}, {@Y2}, {@Z2} of the world "{@World}"
set {Block.bleu} to location at {@X3}, {@Y3}, {@Z3} of the world "{@World}"
set {Block.noir} to location at {@X4}, {@Y4}, {@Z4} of the world "{@World}"
set {Block.vert} to location at {@X5}, {@Y5}, {@Z5} of the world "{@World}"
set {Block.jaune} to location at {@X6}, {@Y6}, {@Z6} of the world "{@World}"
set {Block.violet} to location at {@X7}, {@Y7}, {@Z7} of the world "{@World}"
set {Block.gris} to location at {@X8}, {@Y8}, {@Z8} of the world "{@World}"
command /PousseStart:
permission: Pousse.Start
trigger:
set {PartieOn} to true
wait 15 tick
broadcast "3"
wait 15 tick
broadcast "2"
wait 15 tick
broadcast "1"
wait 15 tick
broadcast "GO!!!"
set block at {Block.rouge} to a 0
set block at {Block.orange} to a 0
set block at {Block.bleu} to a 0
set block at {Block.noir} to a 0
set block at {Block.vert} to a 0
set block at {Block.jaune} to a 0
set block at {Block.violet} to a 0
set block at {Block.gris} to a 0
every 5 seconds:
#if {Nombre.Joueur} is 1:
# loop all players:
# if {Join.%loop-player%} is true:
# broadcast "&a%loop-player% a gagner"
# clear loop-player' inventory
# make console execute command "tp %loop-player% 1508 67 1240"
# set {Nombre.Joueur} to 0
#command /win:
# trigger:
# if {Nombre.Joueur} is 1:
# loop all players:
# if {Join.%loop-player%} is true:
# broadcast "&a%loop-player% a gagner"
# clear loop-player' inventory
# make console execute command "tp %loop-player% 1508 67 1240"
# set {Nombre.Joueur} to 0
[/CODE]
C'est brouillon je c mais je suis pas un chef en skript ?