Aller au contenu
  • 0

Cométences


Question

Posté(e)

Bonjour voila alors j'aimerais que ce script me rajoute 0.05 hp a chaque fois que le joueur clique sur le slot 0 en plus de la vie qu'il a suivant sa classe !

Voici mon skript :

on inventory click:
   if inventory name of player's current inventory contains "&3Compétences:":
       cancel event
       if clicked slot is 22:
           close player's inventory
       if clicked slot is 0:
           add 0.05 to {health.%player%}
       if clicked slot is 1:
           add 0.20 to {resistance.%player%}
       if clicked slot is 2:
           add 0.20 to {mana.%player%}
       if clicked slot is 3:
           add 0.20 to {regene.%player%}
       if clicked slot is 4:
           add 0.15 to {degats.%player%}
       if clicked slot is 5:
           add 0.15 to {magiquedamage.%player%}
       if clicked slot is 6:
           add 0.05 to {discression.%player%}
       if clicked slot is 7:
           add 0.10 to {bowporte.%player%}
       if clicked slot is 8:
           add 0.05 to {vitesse.%player%}
       if clicked slot is 9:
           add 0.10 to {arcknockback.%player%}
       if clicked slot is 10:
           add 0.005 to {arrowspeed.%player%}
   if inventory name of player's current inventory contains "&5Montures:":
       cancel event

# Caracteristique :

on command "/enfer":
   set the maximum health of the player to 20 + {health.%player%}

on command "/terre":
   set the maximum health of the player to 20 + {health.%player%}

on command "/paradis":
   set the maximum health of the player to 20 + {health.%player%}

on command "/archer":
   set the maximum health of the player to 7.5 + {health.%player%}

on command "/tank":
   set the maximum health of the player to 15 + {health.%player%}

on command "/guerrier":
   set the maximum health of the player to 12.5 + {health.%player%}

on command "/paladin":
   set the maximum health of the player to 12.5 + {health.%player%}

 

Merci d'avance pour vos réponses !

9 réponses à cette question

Messages recommandés

  • 0
Posté(e)
The maximum health je crois que ça ne fonctionne pas (en regardant dans les ressources de skript-mc)

Mets ton code dans la balise code ^^

  • 0
Posté(e)
Bonjour voila alors j'aimerais que ce script me rajoute 0.05 hp a chaque fois que le joueur clique sur le slot 0 en plus de la vie qu'il a suivant sa classe !

Voici mon skript :

on inventory click:
   if inventory name of player's current inventory contains "&3Compétences:":
       cancel event
       if clicked slot is 22:
           close player's inventory
       if clicked slot is 0:
           add 0.05 to {health.%player%}
       if clicked slot is 1:
           add 0.20 to {resistance.%player%}
       if clicked slot is 2:
           add 0.20 to {mana.%player%}
       if clicked slot is 3:
           add 0.20 to {regene.%player%}
       if clicked slot is 4:
           add 0.15 to {degats.%player%}
       if clicked slot is 5:
           add 0.15 to {magiquedamage.%player%}
       if clicked slot is 6:
           add 0.05 to {discression.%player%}
       if clicked slot is 7:
           add 0.10 to {bowporte.%player%}
       if clicked slot is 8:
           add 0.05 to {vitesse.%player%}
       if clicked slot is 9:
           add 0.10 to {arcknockback.%player%}
       if clicked slot is 10:
           add 0.005 to {arrowspeed.%player%}
   if inventory name of player's current inventory contains "&5Montures:":
       cancel event

# Caracteristique :

on command "/enfer":
   set the maximum health of the player to 20 + {health.%player%}

on command "/terre":
   set the maximum health of the player to 20 + {health.%player%}

on command "/paradis":
   set the maximum health of the player to 20 + {health.%player%}

on command "/archer":
   set the maximum health of the player to 7.5 + {health.%player%}

on command "/tank":
   set the maximum health of the player to 15 + {health.%player%}

on command "/guerrier":
   set the maximum health of the player to 12.5 + {health.%player%}

on command "/paladin":
   set the maximum health of the player to 12.5 + {health.%player%}

 

Merci d'avance pour vos réponses !

Essayes ça:

 

on inventory click:
   if inventory name of player's current inventory contains "&3Compétences:":
       cancel event
       if clicked slot is 22:
           close player's inventory
       if clicked slot is 0:
           add 0.05 to {health.%player%}
       if clicked slot is 1:
           add 0.20 to {resistance.%player%}
       if clicked slot is 2:
           add 0.20 to {mana.%player%}
       if clicked slot is 3:
           add 0.20 to {regene.%player%}
       if clicked slot is 4:
           add 0.15 to {degats.%player%}
       if clicked slot is 5:
           add 0.15 to {magiquedamage.%player%}
       if clicked slot is 6:
           add 0.05 to {discression.%player%}
       if clicked slot is 7:
           add 0.10 to {bowporte.%player%}
       if clicked slot is 8:
           add 0.05 to {vitesse.%player%}
       if clicked slot is 9:
           add 0.10 to {arcknockback.%player%}
       if clicked slot is 10:
           add 0.005 to {arrowspeed.%player%}
       stop
   if inventory name of player's current inventory contains "&5Montures:":
       cancel event
       stop

on command "/enfer":
   set rf max hp of player to 20 + {health.%player%}
   stop
on command "/terre":
   set rf max hp of player to 20 + {health.%player%}
   stop
on command "/paradis":
   set rf max hp of player to 20 + {health.%player%}
   stop
on command "/archer":
   set rf max hp of player to 7.5 + {health.%player%}
   stop
on command "/tank":
   set rf max hp of player to 15 + {health.%player%}
   stop
on command "/guerrier":
   set rf max hp of player to 12.5 + {health.%player%}
   stop
on command "/paladin":
   set rf max hp of player to 12.5 + {health.%player%}
   stop

 

Je n'ai pas testé mais je l'utilise de temps en temps le "set rf max hp" donc si ça ne marche pas désolé :/

  • 0
Posté(e)
Les valeurs que tu veux utiliser n'existe pas en skript car ils n'existe pas en vanilla.

 

Les hp ce compte en 1

1 = demi coeur

20 = tous les coeurs plein

Tu parles à moi ? xD désolé mais tu n'as pas mis de [quote} donc je sais pas à qui tu parles

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