Aller au contenu
  • 0

Pourquoi sa n’exécute pas la commande ?


Question

Posté(e)

Bonjour à tous !

 

Donc je suis entrain de faire un petit skript pour mon utilisation personnel, mais j'ai un soucis.

 

Jvous explique et je vous donne le skript juste après:

 

Donc j'ai fait en sorte que quand un joueur "op" fait clic droit sur un joueur sa lui ouvre un gui:

 

1494590345-noelshark-1.png

Ensuite on sélection l'item correspondant à la plainte du joueur. sa nous ouvre un autre gui:

 

1494590343-noelshark-2.png

On sélection soit le "light green dye" pour bannir ou le "gray dye" pour ne pas bannir (gui de confirmation)

 

mais quand je clic sur n'importe quelle item du gui(2) rien ne se passe ni le "to be unstealable" sur les vitre :c

 

pourquoi ? Voila le skript en lui même:

 

options:
   clear: true #false = pas de clear d'inventaire lors du give.
   itemgive: diamond sword #Change "diamond sword" par un item de ton choix ex: "iron sword".
   noperm: &4Erreur:&c Tu n'as pas accès a cette commande ! #Message lors que le joueur essayera de faire la commande sans avoir la permission.
   nom: &4Bannissement #Nom de l'épée (customisable)
   lore: &7Fait un clique gauche ou||&7droit pour bannir le joueur à vie ! #message marqué sous l'épée (customisable)

command /epee:
   trigger:
       if player is op:
           if {@clear} is true:
               clear player's inventory
           wait 1 second
           give player 1 {@itemgive} named "{@nom}" with lore "{@lore}"
       else:
           send "{@noperm}"
           stop

on rightclick on a player: 
   if player's tool is a {@itemgive}:
       if name of player's tool is "{@nom}":
           open chest with 3 rows named "         &4Bannissement &6%clicked player%" to player
           wait 1 ticks
           set {_vitre::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 10 of player with diamond sword named "&7Cheat" to run [Make player execute command "/ban:cheat %clicked player%"]
               format slot 11 of player with paper named "&7Insulte grave" to run [Make player execute command "/ban:insulte_grave %clicked player%"]
               format slot 12 of player with 416 named "&7Skin incorrect" to run [Make player execute command "/ban:skin_incorrect %clicked player%"]
               format slot 13 of player with stick named "&7Pseado incorrect" to run [Make player execute command "/ban:pseado %clicked player%"]
               format slot 14 of player with ender pearl named "&7Use-Bug" to run [Make player execute command "/ban:use-bug %clicked player%"]
               format slot 15 of player with diamond named "&7Incitation à triché" to run [Make player execute command "/ban:incitation_à_triché %clicked player%"]

command /ban:cheat <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/say a"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !"
command /ban:insulte_grave <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/ban %arg 1% &7Insulte grave"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !"     
command /ban:skin_incorrect <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/ban %arg 1% &7Skin incorrect"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !"     
command /ban:pseado <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/ban %arg 1% &7Pseado incorrect"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !" 
command /ban:use-bug <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/ban %arg 1% &7Use-Bug"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !"     
command /ban:incitation_à_triché <player>:
   trigger:
       if player is op:
           wait 1 second
           open chest with 3 rows named "         &4Bannissement &6%arg 1%" to player
           set {_vitre::*} to 0, 1, 2, 3, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26
           loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
               format slot 4 of player with 1 388 named "&6Bannir ?" to be unstealable
               format slot 11 of player with light green dye named "&2Bannir" to close then run [Make player execute command "/ban %arg 1% &7Incitation à triché"]
               format slot 15 of player with gray dye named "&2Ne pas bannir" to close
       else:
           send "&4Erreur: &cVous n'avez pas la permission de exécuté cette commande !"

1494590345-noelshark-1.pngje suis sur spigot 1.10

 

J'ai un autre petit soucis aussi mon:

 

command /reportdel [<player>] [<text>]:
   trigger:
       if player is op:
           if arg 1 or arg 2 is not set:
               send "&fUsage: /reportdel <joueur> <report à enlevé>"
           else:
               if {list.report.%arg 1%::*} contains arg 2:
                   remove arg 2 from {list.report.%arg 1%::*}
                   send "&4[REPORT] &2Le report &e%arg 2% &2 du joueur &6%arg 1% &2à était delete !"
               else:
                   send "&4[REPORT] &2Le joueur &e%arg 1% &2n'a pas de report ""&6%arg 2%&2"""
                   stop
       else:
           send "{@noperm}"

Marche mais quand je fait /report <joueur> Cheat sa ajoute "Cheat" dans la liste des reports du <joueur> mais quand je fait /reportdel <joueur> Cheat sa me dit que le joueur "<joueur>" n'a pas de report "Cheat"

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Mets un waits 2 ticks après l'open du chest c'est très important

comme ça quoi:

open chest with 3 rows named " &4Bannissement &6%arg 1%" to player

wait 1 ticks

LA SUITE

  • 0
Posté(e)
Salut,

Mets des "" à true ("if {@clear} is "true" ")

Sans sa marche aussi mais sans les guillements sa peut bug ?

Mets un waits 2 ticks après l'open du chest c'est très important

comme ça quoi:

open chest with 3 rows named " &4Bannissement &6%arg 1%" to player

wait 1 ticks

LA SUITE

Merci ! jgo tester

 

Sinon pour le desième soucis vous avez une idée ?

  • 0
Posté(e)

Pour la 2eme

Remplace

if {list.report.%arg 1%::*} contains arg 2:

Par

if {list.report.%arg 1%::*} where [arg 2 is object input] is set:

 

Pour la 1er :

Télécharge TuSKe et remplace tout les format slot etc par cette exemple:

format slot 1 of player with stone to be unstealable
# tu remplaces par
make gui slot 1 of player with stone to nothing

format slot 1 of player with stone to [close then ]run [make player execute "commande"]
# remplace par
make gui slot 1 of player with stone to [close then ]run player command "command"

Tutoriel : https://skript-mc.fr/forum/threads/«-gestion-avancée-des-guis-avec-tuske-».9050/

Merci SwiKZiiK pour le tuto :)

Ah oui aussi quand tu loop {vitre::*} enlève 1 tab aux lignes format slot mais qu'il n'est pas loop-value jsp si ta comprend car c'est chiant à expliquer mais voilà un exemple :

            loop {_vitre::*}:
               format slot loop-value of player with 1 white glass named " " to be unstealable
           format slot 10 of player with diamond sword named "&7Cheat" to run [Make player execute command "/ban:cheat %clicked player%"]
           format slot 11 of player with paper named "&7Insulte grave" to run [Make player execute command "/ban:insulte_grave %clicked player%"]
           format slot 12 of player with 416 named "&7Skin incorrect" to run [Make player execute command "/ban:skin_incorrect %clicked player%"]
           format slot 13 of player with stick named "&7Pseado incorrect" to run [Make player execute command "/ban:pseado %clicked player%"]
           format slot 14 of player with ender pearl named "&7Use-Bug" to run [Make player execute command "/ban:use-bug %clicked player%"]
           format slot 15 of player with diamond named "&7Incitation à triché" to run [Make player execute command "/ban:incitation_à_triché %clicked player%"]

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