Aller au contenu
  • 0

On damage


Question

Posté(e)

Bonjour/Bonsoir tous le monde,

Aujourd'hui j'ai besoin d'aide sur du "On damage"

Je suis un skripteur débutant donc je connais pas tous et la , la preuve j'en est besoin :D

J'espere que vous pourrez m'aidé pour résoudre mon probleme

on damage:
   if {SM.%attacker%} is true:
       send "{@prefix}&f&l[&c-&f&l]" to attacker
       cancel event
   else:
       if attacker's tool is stick named "&4TestKB":
           remove 1 heart to the player

15 réponses à cette question

Messages recommandés

  • 0
Posté(e)
C'est sympa, mais tu n'as pas préciser en quoi tu as besoin d'aide.

 

C'est quoi qui ne vas pas/Que tu as besoin ?

En gros j'ai enlevé l'options d'attaqué les autres mobs et joueurs aux "{SM.%player%}" et j'aimerai avec un stick knockback 3 sa fasse le knockback et 0.1 coeur en moins ou 0 si possible

Désolé si je l'ai pas précisé dans mon sujet j'ai oublié :d

  • 0
Posté(e)

Essaye sa ;)

 

on damage:
   if {SM.%attacker%} is true:
       if attacker's tool is not stick named "&4TestKB":
           send "{prefix}&f&l[&c-&f&l]" to attacker
           cancel event

 

si tu a encore un problème fait le savoir ;)

  • 0
Posté(e)

Oui bah c'est ce que j'ai fait , en gros si l'objet avec lequel il tape n'est pas un baton nommé "&4TestKB" sa cancel event donc normalement quand tu le tape avec le baton sa le kb

  • 0
Posté(e)
Oui bah c'est ce que j'ai fait , en gros si l'objet avec lequel il tape n'est pas un baton nommé "&4TestKB" sa cancel event donc normalement quand tu le tape avec le baton sa le kb

Sinon je test sa demain et je te tiens au courant.

  • 0
Posté(e)

Qin

Oui bah c'est ce que j'ai fait , en gros si l'objet avec lequel il tape n'est pas un baton nommé "&4TestKB" sa cancel event donc normalement quand tu le tape avec le baton sa le kb

Sa a l'aire de marché mais sinon tu sais comment give un item renomé et enchanté ?? Sinon merci pour le code !!

  • 0
Posté(e)
Qin

 

Sa a l'aire de marché mais sinon tu sais comment give un item renomé et enchanté ?? Sinon merci pour le code !!

 

Pour give un item enchanter tu met par exemple : give 1 diamond sword of sharpness 1 named "NomQueTuVeut" to player

  • J'aime 1
  • 0
Posté(e)
Pour give un item enchanter tu met par exemple : give 1 diamond sword of sharpness 1 named "NomQueTuVeut" to player

Oui j'ai trouvé. La j'ai une commande de save et de load inventory qui ne fonctionne plus :( pourrai tu y faire quelque chose

Désolé si je t'harcele

Je t'envoie le code dans 2 minutes

 

command /save:
   trigger:
       if {SM.%player%} is true:
           set {save.helm.%player%} to the helmet of the player
           set {save.chestplate.%player%} to the chestplate of the player
           set {save.leggings.%player%} to the leggings of the player
           set {save.boots.%player%} to the boots of the player
           set {save.inv.%player%} to the player's serialized inventory

command /load:
   trigger:
       if {SM.%player%} is true:
           wait 0.2 seconds
           restore inventory of player from {save.inv.%player%}
           set the helmet of the player to {save.helm.%player%}
           set the chestplate of the player to {save.chestplate.%player%}
           set the leggings of the player to {save.leggings.%player%}
           set the boots of the player to {save.boots.%player%}
           delete {save.inv.%player%}
           delete {save.helmt.%player%}
           delete {save.chestplate.%player%}
           delete {save.leggings.%player%}
           delete {save.boots.%player%}

  • 0
Posté(e)
Oui j'ai trouvé. La j'ai une commande de save et de load inventory qui ne fonctionne plus :( pourrai tu y faire quelque chose

Désolé si je t'harcele

Je t'envoie le code dans 2 minutes

 

command /save:
   trigger:
       if {SM.%player%} is true:
           set {save.helm.%player%} to the helmet of the player
           set {save.chestplate.%player%} to the chestplate of the player
           set {save.leggings.%player%} to the leggings of the player
           set {save.boots.%player%} to the boots of the player
           set {save.inv.%player%} to the player's serialized inventory

command /load:
   trigger:
       if {SM.%player%} is true:
           wait 0.2 seconds
           restore inventory of player from {save.inv.%player%}
           set the helmet of the player to {save.helm.%player%}
           set the chestplate of the player to {save.chestplate.%player%}
           set the leggings of the player to {save.leggings.%player%}
           set the boots of the player to {save.boots.%player%}
           delete {save.inv.%player%}
           delete {save.helmt.%player%}
           delete {save.chestplate.%player%}
           delete {save.leggings.%player%}
           delete {save.boots.%player%}

 

Je test ton code et je te le corrige , je pense avoir trouver d'ou sa vient ;)

  • 0
Posté(e)
Oui j'ai trouvé. La j'ai une commande de save et de load inventory qui ne fonctionne plus :( pourrai tu y faire quelque chose

Désolé si je t'harcele

Je t'envoie le code dans 2 minutes

 

command /save:
   trigger:
       if {SM.%player%} is true:
           set {save.helm.%player%} to the helmet of the player
           set {save.chestplate.%player%} to the chestplate of the player
           set {save.leggings.%player%} to the leggings of the player
           set {save.boots.%player%} to the boots of the player
           set {save.inv.%player%} to the player's serialized inventory

command /load:
   trigger:
       if {SM.%player%} is true:
           wait 0.2 seconds
           restore inventory of player from {save.inv.%player%}
           set the helmet of the player to {save.helm.%player%}
           set the chestplate of the player to {save.chestplate.%player%}
           set the leggings of the player to {save.leggings.%player%}
           set the boots of the player to {save.boots.%player%}
           delete {save.inv.%player%}
           delete {save.helmt.%player%}
           delete {save.chestplate.%player%}
           delete {save.leggings.%player%}
           delete {save.boots.%player%}

 

Tu avait juste rajouter un "the" devant le player's ^^ Et le delete a la fin ne sert a rien , j'ai tester sa marche nickel , dit moi si sa te convient :)

 

command /save:
   trigger:
       set {save.inv.%player%} to player's serialized inventory
       set {save.helm.%player%} to the helmet of the player
       set {save.chestplate.%player%} to the chestplate of the player
       set {save.leggings.%player%} to the leggings of the player
       set {save.boots.%player%} to the boots of the player

command /load:
   trigger:
       restore inventory of player from {save.inv.%player%}
       set the helmet of the player to {save.helm.%player%}
       set the chestplate of the player to {save.chestplate.%player%}
       set the leggings of the player to {save.leggings.%player%}
       set the boots of the player to {save.boots.%player%}

  • 0
Posté(e)
Tu avait juste rajouter un "the" devant le player's ^^ Et le delete a la fin ne sert a rien , j'ai tester sa marche nickel , dit moi si sa te convient :)

 

command /save:
   trigger:
       set {save.inv.%player%} to player's serialized inventory
       set {save.helm.%player%} to the helmet of the player
       set {save.chestplate.%player%} to the chestplate of the player
       set {save.leggings.%player%} to the leggings of the player
       set {save.boots.%player%} to the boots of the player

command /load:
   trigger:
       restore inventory of player from {save.inv.%player%}
       set the helmet of the player to {save.helm.%player%}
       set the chestplate of the player to {save.chestplate.%player%}
       set the leggings of the player to {save.leggings.%player%}
       set the boots of the player to {save.boots.%player%}

Le delete est utile il permet aux joueurs de ne pas refaire la commande et donc dupliqué son stuff

sinon sa marche du feu de Dieu xD

Merci pour toutes tes aides!

×
×
  • 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.