Aller au contenu
  • 0

Création d'un sign qui donne tout le temps des potions de heal 2


Question

Posté(e)

Bonjour,

Je créer cette discussion pour vous demander comme je pourrais faire un système, quand une personne clique droit ou gauche pas important un menu gui s'ouvre et dedans il y a des potions de heal 2, ils peuvent les prendrent et quand il ferme ce menu et qu'il le réouvre il y an à encore.

 

Merci de votre réponce.

 

Venez sur mon serveur minecraft pour m'aider je suis tout le temp co.

Messages recommandés

  • 0
Posté(e)

Voilà, Alors pour que sa fonctionne il te faut la perm heal.sk et mettre la ligne 1 de ton panneau en "Heal" rien de plus, apres clique droit, clique gauche sa fonctionne !

 

on sign change:
   if line 1 is "Heal":
       if player has permission "heal.sk":
           set line 1 to "&5HEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "
on click on a sign:
   if line 1 is "&5HEAL":
       give 1 water_bottle:8229 to player

 

Like si je t'ai aidé ;)

  • J'aime 1
  • 0
Posté(e)
on sign change: if line 1 is "Heal": if player has permission "heal.sk": set line 1 to "&5HEAL" set line 2 to " " set line 3 to "&8Clique-droit" set line 4 to " " on click on a sign: if line 1 is "&5HEAL": give 1 water_bottle:8229 to player

Je ne comprends il y a cette erreur et je ne comprends pas car quand je suis OP personne ne peut prendre de potion via le sign mais quand je suis deop tout le monde peut en prendre

  • 0
Posté(e)

J'ai repris tout son skript en le modifiant. (@Alexy)

 

Déjà pour commencer, tu tape "[HEAL]" dans un panneau pour le définir et puis mets mon skript.

Il faut aussi avoir la permission admin.heal pour mettre ces panneaux.

 

on sign change:
   if line 1 is "[HEAL]":
       if player has permission "admin.heal":
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "
on right-click on a sign:
   if line 1 is "&cHEAL":
       give 1 373:8229 to player

 

EDIT: Le skript a été testé.

  • 0
Posté(e)
J'ai repris tout son skript en le modifiant. (@Alexy)

 

Déjà pour commencer, tu tape "[HEAL]" dans un panneau pour le définir et puis mets mon skript.

Il faut aussi avoir la permission admin.heal pour mettre ces panneaux.

 

on sign change:
   if line 1 is "[HEAL]":
       if player has permission "admin.heal":
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "
on right-click on a sign:
   if line 1 is "&cHEAL":
       give 1 373:8229 to player

 

EDIT: Le skript a été testé.

 

C'est cool, ducoup si il n'y a pas d'erreur, tant mieu, surement un manque d'addons car moi je l'ai testé et pas de problèmes like et passe en résolu si c'est ok :)

  • J'aime 1
  • 0
Posté(e)

C'est long mais c'est faisable.

Le truc c'est qu'il faut faire c'est un truc genre:

on click on Sign:
    open chest with 6 rows named "&5Refill" to player
    format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
    format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
    Flem :p

  • 0
Posté(e)
C'est cool, ducoup si il n'y a pas d'erreur, tant mieu, surement un manque d'addons car moi je l'ai testé et pas de problèmes like et passe en résolu si c'est ok :)

Par contre si le joueur n'est pas OP il ne peut pas avoir de potion.

  • 0
Posté(e)

Je ne sais pas trop quoi faire donc j'ai fais en sorte de détecter si le joueur est op et s'il l'est, il peut ouvrir puis avec le else (donc s'il ne peut pas) les joueurs non op aussi.

 

Même si mon code c'est beaucoup de copier-coller.

 

on sign change:
   if line 1 is "[HEAL]":
       if player is op:
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "
on right-click on a sign:
   if line 1 is "&cHEAL":
       if player is op:
           open chest with 3 rows named "&cHeal" to player
           format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 16 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 25 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 26 of player with 1 of 373:8229 named "&5Heal Potion"
       else:
           open chest with 3 rows named "&cHeal" to player
           format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 16 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 25 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 26 of player with 1 of 373:8229 named "&5Heal Potion"

  • 0
Posté(e)
Je ne sais pas trop quoi faire donc j'ai fais en sorte de détecter si le joueur est op et s'il l'est, il peut ouvrir puis avec le else (donc s'il ne peut pas) les joueurs non op aussi.

 

Même si mon code c'est beaucoup de copier-coller.

 

on sign change:
   if line 1 is "[HEAL]":
       if player is op:
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "
on right-click on a sign:
   if line 1 is "&cHEAL":
       if player is op:
           open chest with 3 rows named "&cHeal" to player
           format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 16 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 25 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 26 of player with 1 of 373:8229 named "&5Heal Potion"
       else:
           open chest with 3 rows named "&cHeal" to player
           format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 16 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 25 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 26 of player with 1 of 373:8229 named "&5Heal Potion"

Il ressemble enormement au mieux :p

  • 0
Posté(e)
Je me suis rendu compte que les items à l'intérieur doivent forcément effectuer une action donc je cherche pour qu'ils ne doivent rien faire.

Oui moi aussi j'ai remarquer mais l'auteur de cette discussion ne repond pas :p

  • 0
Posté(e)

Autrement si le l'auteur le veut bien, un gui qui give une potion directement. en cliquant sur la potion car j'ai fais un autre code mais il est un peu buggé pour l'instant. (les potions personnalisées ne fonctionne pas et quelques slots avec des problèmes pour pick)

 

EDIT: pour les slots c'est que ça prend les slots bloqués de mon inventaire c'est juste ça mais les potions ne se donnent pas sous forme de heal mais d'eau toujours.

 

mon code au cas où

on sign change:
   if line 1 is "[HEAL]":
       if player has permission "admin.heal":
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "

on right-click on a sign:
   if line 1 is "&cHEAL":
       if player is op:
           open chest with 3 rows named "&cPotions" to player
           wait 1 tick
           loop 36 times:
               {_slot.%player%} is not set:
                   set {_slot.%player%} to 0
               else:
                   set slot {_slot.%player%} of player's current inventory to potion:8229 named "&cPotion de heal"
                   add 1 to {_slot.%player%}

  • 0
Posté(e)

on rightclick on sign:
   if player is not op:
       if line 1 is "[Heal]":
           op player
           open chest with 1 rows named "&aMenu des potions" to player
           wait 1 tick
           format slot etc
           deop player
   else:
       open chest with 1 rows named "&aMenu des potions" to player
       format slot ...

Vous n'avez qu'à op le joueur un court moment non ?

  • 0
Posté(e)
on rightclick on sign:
   if player is not op:
       if line 1 is "[Heal]":
           op player
           open chest with 1 rows named "&aMenu des potions" to player
           wait 1 tick
           format slot etc
           deop player
   else:
       open chest with 1 rows named "&aMenu des potions" to player
       format slot ...

Vous n'avez qu'à op le joueur un court moment non ?

Mais pourquoi l'op? Pourquoi mettre " if player is op "? Mettre une perm ok mais la...

Non il faut toujours mettre un "s".

https://www.skunity.com/search?search=open+inventory

Regarde l'exemple si je te convaincs pas

Un 's' ou pas cela ne change pas, peut être mettre sans 's' si c'est "1 row" et un 's' si c'est "4828 rows"

 

Kriiista.

  • 0
Posté(e)

On peut aussi mettre une perm,mais si le joueur n'a pas de plugin de perm,la ça marchera quand même si le joueur n'es pas op.De toute façon l'auteur est inactif donc je crois qu'il a abandonné ...

  • 0
Posté(e)
Bonjour,

Je créer cette discussion pour vous demander comme je pourrais faire un système, quand une personne clique droit ou gauche pas important un menu gui s'ouvre et dedans il y a des potions de heal 2, ils peuvent les prendrent et quand il ferme ce menu et qu'il le réouvre il y an à encore.

 

Merci de votre réponce.

 

Venez sur mon serveur minecraft pour m'aider je suis tout le temp co.

on rightclick on sign:
   if line 2 is "Heal":
           open chest with 3 rows named "&cHeal" to player
           wait 1 tick
           format slot 0 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 1 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 2 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 3 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 4 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 5 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 6 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 7 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 8 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 9 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 10 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 11 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 12 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 13 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 14 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 15 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 16 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 17 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 18 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 19 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 20 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 21 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 22 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 23 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 24 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 25 of player with 1 of 373:8229 named "&5Heal Potion"
           format slot 26 of player with 1 of 373:8229 named "&5Heal Potion"

  • 0
Posté(e)

Le problème avec ton skript @UnWazoVer c'est que les objets n'apparaissent pas car tu n'as pas terminé tout correctement et dans toutes les options il n'y a rien de bien pour ça. Il y a to run, to close then run et to close.

 

Mais bon, j'ai trouvé avec mon skript le moyen de bien faire tout ça et de set l'item directement en jeu avec la commande "/heal set".

 

on sign change:
   if line 1 is "[HEAL]":
       if player is op:
           set line 1 to "&cHEAL"
           set line 2 to " "
           set line 3 to "&8Clique-droit"
           set line 4 to " "

on right-click on a sign:
   if line 1 is "&cHEAL":
       if player is op:
           open chest with 3 rows named "&cPotions" to player
           wait 1 tick
           loop 36 times:
               {_slot.%player%} is not set:
                   set {_slot.%player%} to 0
               else:
                   set slot {_slot.%player%} of player's current inventory to {heal.item} named "&cPotion de heal"
                   add 1 to {_slot.%player%}
command /heal <text>:
   trigger:
       if player is op:
           if arg 1 is "set":
               set {heal.item} to tool of player
               send "&6L'item a été set avec succès!" to player 
           else if arg 1 is not set:
               send "&6Il faut ajouter le mot 'set' après ta commande!" to player
       else:
           stop
           send "&cTu n'as pas la permission de faire ça!" to player

 

J'ai pu tester le skript et il fonctionne très bien comparé aux autres du début, j'ai enfin trouvé pour les bonnes potions.(enfin normalement)

 

EDIT: aussi to be unstealable pour les options

  • J'aime 1
×
×
  • 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.