Bonjour depuis 2 jours je bosse sur un Skript qui a pour but de ressemble au SheepWars mais pour mon serveur entre amis mais j'ai un problème avec se si gentil mouton soigneur voici mon code :
on right click with pink wool:
cancel event#au cas ou il le place
make player shoot a pink sheep at speed 0
remove 1 pink wool from player
every 1 second:
if distance between the player and pink sheeps is less than 5:
heal player by 1 heart
loop pink sheeps:
set name of loop-entity to "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|"
set the colour of loop-entity to pink
wait 5 seconds
if name of loop-entity contains "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|":
kill loop-entity
on death of sheep: #Clear drop mouton
if name of sheep contains "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|":
clear drops
mais je n'arrive pas a mettre la regeneration dés qu'un joueur s'approche du mouton j'ai essayer plusieurs code comme :
if distance between the player and loop-entity is less than 5: ou encore donner un effet de regeneration au joueur a proximité mais cela me pose problème.
Voici le code entier si au cas ou il y aura d'autre erreur
on right click with white wool: #Le mouton abordaj
remove 1 white wool from player
shoot a sheep from the player
wait 10 tick
make player ride the last shot sheep
loop white sheeps:
set name of loop-entity to "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|"
set the colour of loop-entity to white
wait 5 seconds
if name of loop-entity contains "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|":
kill loop-entity
on damage: #Annule tout degats chute
if damage type is fall:
cancel event
on death of sheep: #Clear drop mouton
if name of sheep contains "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|":
clear drops
on right click with a red wool:
cancel event
remove 1 red wool from player
make player shoot a red sheep at speed 3
every 1 second:
loop red sheeps:
if name of the loop-entity is not set:
set the name of the loop-entity to "0"
set {_name} to name of the loop-entity parsed as number
if {_name} is 5:
delete the loop-entity
wait 1 tick
create an explosion of force 3 at location of loop-entity
else:
set the name of the loop-entity to "%{_name} + 1%"
on right click with pink wool:
cancel event
make player shoot a pink sheep at speed 0
remove 1 pink wool from player
every 1 second:
if distance between pink sheeps and player is less than 5:
heal player by 1 heart
loop pink sheeps:
set name of loop-entity to "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|"
set the colour of loop-entity to pink
wait 5 seconds
if name of loop-entity contains "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|":
kill loop-entity
on death of sheep: #Clear drop mouton
if name of sheep contains "&a&k|&e&k|&d&k| &b&l REGEN &a&k|&e&k|&d&k|":
clear drops
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.
Question
matheo303
Bonjour depuis 2 jours je bosse sur un Skript qui a pour but de ressemble au SheepWars mais pour mon serveur entre amis mais j'ai un problème avec se si gentil mouton soigneur voici mon code :
mais je n'arrive pas a mettre la regeneration dés qu'un joueur s'approche du mouton j'ai essayer plusieurs code comme :
if distance between the player and loop-entity is less than 5: ou encore donner un effet de regeneration au joueur a proximité mais cela me pose problème.
Voici le code entier si au cas ou il y aura d'autre erreur
on right click with white wool: #Le mouton abordaj
remove 1 white wool from player
shoot a sheep from the player
wait 10 tick
make player ride the last shot sheep
loop white sheeps:
set name of loop-entity to "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|"
set the colour of loop-entity to white
wait 5 seconds
if name of loop-entity contains "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|":
kill loop-entity
on damage: #Annule tout degats chute
if damage type is fall:
cancel event
on death of sheep: #Clear drop mouton
if name of sheep contains "&a&k|&e&k|&d&k| &b&l Abordaaaaj &a&k|&e&k|&d&k|":
clear drops
Voila Merci pour votre aide
18 réponses à cette question
Messages recommandés