Aller au contenu
Dark_winsYT

Probleme avec le cooldown des kits

Messages recommandés

Salut , j'ai un gros problème avec mon système de kits enfait genre tout fonctionne sauf un le kit construction vip+ (niveau 3) enfait j'ai exactement le meme code pour le 1 et le 2 j'ai juste modifié certains truc , je vous explique mon kit a un coldown qui normalement du 2 heure mais je l'ai reduit a 2 heures pour vip+ mais le bleme c'est que il me donne jamais les items il me met toujours le message que moi j'ai mis quand il faut attendre et le truc c'est que je comprend pas pourquoi vu que c'est exactement le meme code que le kit construction vip et basique juste que les {cktlvl2.%UUID of player%} le 2 est remplacer par un 3 voila mon code et si quelqu'un peut m'aider je le remercie

 

options:
    Kt: &3Kits &6>>


command /kit:
    trigger:
        open chest with 3 rows named "&3Kits &6>> &bMenu des kits" to player
        wait 2 ticks
        format slot 0 of player with shiny gray glass pane named " " to be unstealable
        format slot 1 of player with shiny gray glass pane named " " to be unstealable
        format slot 2 of player with shiny gray glass pane named " " to be unstealable
        format slot 3 of player with shiny gray glass pane named " " to be unstealable
        format slot 4 of player with shiny gray glass pane named " " to be unstealable
        format slot 5 of player with shiny gray glass pane named " " to be unstealable
        format slot 6 of player with shiny gray glass pane named " " to be unstealable
        format slot 7 of player with shiny gray glass pane named " " to be unstealable
        format slot 8 of player with shiny gray glass pane named " " to be unstealable
        format slot 9 of player with shiny gray glass pane named " " to be unstealable
        format slot 17 of player with shiny gray glass pane named " " to be unstealable
        format slot 18 of player with shiny gray glass pane named " " to be unstealable
        format slot 19 of player with shiny gray glass pane named " " to be unstealable
        format slot 20 of player with shiny gray glass pane named " " to be unstealable
        format slot 21 of player with shiny gray glass pane named " " to be unstealable
        format slot 22 of player with shiny gray glass pane named " " to be unstealable
        format slot 23 of player with shiny gray glass pane named " " to be unstealable
        format slot 24 of player with shiny gray glass pane named " " to be unstealable
        format slot 25 of player with shiny gray glass pane named " " to be unstealable
        format slot 26 of player with shiny gray glass pane named " " to be unstealable
        format slot 11 of player with iron chestplate named "&fKits BASIQUE" to run [make player execute command "/open_basickitgui"]
        format slot 13 of player with diamond chestplate named "&fKits &eVIP" to run [make player execute command "/open_vipkitgui"]
        format slot 15 of player with shiny diamond chestplate named "&fKits &e&lVIP&5&l+" to run [make player execute command "/open_bigvipconstruct"]
        
command /open_basickitgui:
    trigger:
        open chest with 6 rows named "&bKit BASIQUE" to player
        wait 2 ticks
        format slot 0 of player with shiny gray glass pane named " " to be unstealable
        format slot 1 of player with shiny gray glass pane named " " to be unstealable
        format slot 2 of player with shiny gray glass pane named " " to be unstealable
        format slot 3 of player with shiny gray glass pane named " " to be unstealable
        format slot 4 of player with shiny gray glass pane named " " to be unstealable
        format slot 5 of player with shiny gray glass pane named " " to be unstealable
        format slot 6 of player with shiny gray glass pane named " " to be unstealable
        format slot 7 of player with shiny gray glass pane named " " to be unstealable
        format slot 8 of player with shiny gray glass pane named " " to be unstealable
        format slot 9 of player with shiny gray glass pane named " " to be unstealable
        format slot 17 of player with shiny gray glass pane named " " to be unstealable
        format slot 18 of player with shiny gray glass pane named " " to be unstealable
        format slot 19 of player with shiny gray glass pane named " " to be unstealable
        format slot 20 of player with shiny gray glass pane named " " to be unstealable
        format slot 21 of player with shiny gray glass pane named " " to be unstealable
        format slot 22 of player with shiny gray glass pane named " " to be unstealable
        format slot 23 of player with shiny gray glass pane named " " to be unstealable
        format slot 24 of player with shiny gray glass pane named " " to be unstealable
        format slot 25 of player with shiny gray glass pane named " " to be unstealable
        format slot 26 of player with shiny gray glass pane named " " to be unstealable
        format slot 11 of player with iron chestplate named "&fKits BASIQUE" to run [make player execute command "/open_basickitgui"]
        format slot 13 of player with diamond chestplate named "&fKits &eVIP" to run [make player execute command "/open_vipkitgui"]
        format slot 15 of player with shiny diamond chestplate named "&fKits &e&lVIP&5&l+" to run [make player execute command "/open_bigvipconstruct"]
        format slot 49 of player with shiny fence named "&c&lRetour" to run [make player execute command "/kit"]
        format slot 36 of player with grass named "&b&lKit construction basique" to close then run [make player execute command "/kitlvl1construct"]
        
command /open_vipkitgui:
    trigger:
        open chest with 6 rows named "&bKit &eVIP" to player
        wait 2 ticks
        format slot 0 of player with shiny gray glass pane named " " to be unstealable
        format slot 1 of player with shiny gray glass pane named " " to be unstealable
        format slot 2 of player with shiny gray glass pane named " " to be unstealable
        format slot 3 of player with shiny gray glass pane named " " to be unstealable
        format slot 4 of player with shiny gray glass pane named " " to be unstealable
        format slot 5 of player with shiny gray glass pane named " " to be unstealable
        format slot 6 of player with shiny gray glass pane named " " to be unstealable
        format slot 7 of player with shiny gray glass pane named " " to be unstealable
        format slot 8 of player with shiny gray glass pane named " " to be unstealable
        format slot 9 of player with shiny gray glass pane named " " to be unstealable
        format slot 17 of player with shiny gray glass pane named " " to be unstealable
        format slot 18 of player with shiny gray glass pane named " " to be unstealable
        format slot 19 of player with shiny gray glass pane named " " to be unstealable
        format slot 20 of player with shiny gray glass pane named " " to be unstealable
        format slot 21 of player with shiny gray glass pane named " " to be unstealable
        format slot 22 of player with shiny gray glass pane named " " to be unstealable
        format slot 23 of player with shiny gray glass pane named " " to be unstealable
        format slot 24 of player with shiny gray glass pane named " " to be unstealable
        format slot 25 of player with shiny gray glass pane named " " to be unstealable
        format slot 26 of player with shiny gray glass pane named " " to be unstealable
        format slot 11 of player with iron chestplate named "&fKits BASIQUE" to run [make player execute command "/open_basickitgui"]
        format slot 13 of player with diamond chestplate named "&fKits &eVIP" to run [make player execute command "/open_vipkitgui"]
        format slot 15 of player with shiny diamond chestplate named "&fKits &e&lVIP&5&l+" to run [make player execute command "/open_bigvipconstruct"]
        format slot 49 of player with shiny fence named "&c&lRetour" to run [make player execute command "/kit"]
        format slot 11 of player with iron chestplate named "&fKits BASIQUE" to run [make player execute command "/open_basickitgui"]
        format slot 36 of player with sand named "&b&lKit construction &e&lvip" to close then run [make player execute command "/kitlvl2construct"]
        
command /open_vip+kitgui:
    trigger:
        open chest with 6 rows named "&bKits &e&lVIP&5&l+" to player
        wait 2 ticks
        format slot 0 of player with shiny gray glass pane named " " to be unstealable
        format slot 1 of player with shiny gray glass pane named " " to be unstealable
        format slot 2 of player with shiny gray glass pane named " " to be unstealable
        format slot 3 of player with shiny gray glass pane named " " to be unstealable
        format slot 4 of player with shiny gray glass pane named " " to be unstealable
        format slot 5 of player with shiny gray glass pane named " " to be unstealable
        format slot 6 of player with shiny gray glass pane named " " to be unstealable
        format slot 7 of player with shiny gray glass pane named " " to be unstealable
        format slot 8 of player with shiny gray glass pane named " " to be unstealable
        format slot 9 of player with shiny gray glass pane named " " to be unstealable
        format slot 17 of player with shiny gray glass pane named " " to be unstealable
        format slot 18 of player with shiny gray glass pane named " " to be unstealable
        format slot 19 of player with shiny gray glass pane named " " to be unstealable
        format slot 20 of player with shiny gray glass pane named " " to be unstealable
        format slot 21 of player with shiny gray glass pane named " " to be unstealable
        format slot 22 of player with shiny gray glass pane named " " to be unstealable
        format slot 23 of player with shiny gray glass pane named " " to be unstealable
        format slot 24 of player with shiny gray glass pane named " " to be unstealable
        format slot 25 of player with shiny gray glass pane named " " to be unstealable
        format slot 26 of player with shiny gray glass pane named " " to be unstealable
        format slot 11 of player with iron chestplate named "&fKits BASIQUE" to run [make player execute command "/open_basickitgui"]
        format slot 13 of player with diamond chestplate named "&fKits &eVIP" to run [make player execute command "/open_vipkitgui"]
        format slot 15 of player with shiny diamond chestplate named "&fKits &e&lVIP&5&l+" to run [make player execute command "/open_vip+kitgui"]
        format slot 49 of player with shiny fence named "&c&lRetour" to run [make player execute command "/kit"]
        format slot 36 of player with obsidian named "&b&lKit construction &e&lvip&5&l+" to close then run [make player execute command "/open_bigvipconstruct"]

command /kitlvl1construct:
    aliases: cktlvl1
    trigger:
        if {cktlvl1.%UUID of player%} is not set:
            set {cktlvl1.%UUID of player%} to 1
        if {cktlvl1.%UUID of player%} is 1:
            give 8 oak wood to player
            give 4 obsidian to player
            give 12 grass to player
            give 8 sand to player
            give 4 glass to player
            give 4 bookshelf to player
            send "{@Kt} &b&lKit construction basique reçu !"
            set {cktlvl1.%UUID of player%} to 2
            wait 10 seconds
            set {cktlvl1.%UUID of player%} to 1
            stop trigger
        if {cktlvl1.%UUID of player%} is 2:
            message "{@Kt} &4Erreur : &c&lMerci de patitenté 1 heure !" to player
            stop trigger
            
command /kitlvl2construct:
    aliases: cktlvl2
    trigger:
        if {cktlvl2.%UUID of player%} is not set:
            set {cktlvl2.%UUID of player%} to 1
        if {cktlvl2.%UUID of player%} is 1:
            give 16 oak wood to player
            give 8 obsidian to player
            give 24 grass to player
            give 16 sand to player
            give 8 glass to player
            give 6 bookshelf to player
            send "{@Kt} &b&lKit construction &e&lvip &b&lreçu !"
            set {cktlvl2.%UUID of player%} to 2
            wait 15 seconds
            set {cktlvl2.%UUID of player%} to 1
            stop trigger
        if {cktlvl2.%UUID of player%} is 2:
            message "{@Kt} &4Erreur : &c&lMerci de patitenté 1 heure 30 !" to player
            stop trigger
        
command /open_bigvipconstruct:
    aliases: cktlvl3
    trigger:
        if {cktlvl3.%UUID of player%} is not set:
            set {cktlvl3.%UUID of player%} to 1
        if {cktlvl3.%UUID of player%} is 1:
            give 32 oak wood to player
            give 16 obsidian to player
            give 48 grass to player
            give 32 sand to player
            give 16 glass to player
            give 8 bookshelf to player
            message "{@Kt} &b&lKit construction &e&lvip&5&l+ &b&lreçu"
            set {cktlvl3.%UUID of player%} to 2
            wait 10 seconds
            set {cktlvl3.%UUID of player%} to 1
            stop trigger
        if {cktlvl3.%UUID of player%} is 2:
            message "{@Kt} &4Erreur : &c&lMerci de patitenté 2 heures !" to player
            stop trigger

Partager ce message


Lien à poster
Partager sur d’autres sites

image.png.4efec08aee3956752d2e4b591b5ca2c7.png

Salut clic ici pour mettre ton code ensuite ya des truc que je comprend pas bien : "mon kit a un coldown qui normalement du 2 heure mais je l'ai reduit a 2 heures pour vip+" donc tu n'a pas réduit le cooldown ?

En parlant du cooldown tu l'initialise ou car je ne comprend rien la ? je mis penche pas plus j'attend que tu mettent ton code plus proprement puis j'ai un peux la flemme 

Partager ce message


Lien à poster
Partager sur d’autres sites

Bah je t'explique sur mon système j'ai le lvl1 , lvl2 et lvl3 sont les même code avec 2-3 modif et enfait quand tu fait /kit sa t'ouvre le menu et tout tu clique sur vip+ sa t'ouvre le gui mais quand tu clique sur le kit construction au lieu de te le donné les items  et activé le coldown pour ne pas l'avoir a l'infini et mettre un message quand tu réexécute la commande sans attendre pour dire qu'il faut attendre un certain temps bah moi quand je clique dessus (sur le kit construction) au lieu de me donné le kit sa me met tout de suite le message d'erreur ou il faut attendre

 et pour l'histoire du 2 heure 2 heure bah c'est que je me suis trompé en ecrivant je voulais dire j'ai reduit 2 heures a 15 secondes pour les test  

Partager ce message


Lien à poster
Partager sur d’autres sites
il y a 11 minutes, Dark_winsYT a dit :

Je viens de comprendre pourquoi il m'a gardé des ancienne ligne de code je vais refaire tout le skript et je dit si c'est bon

Je te conseil de passer par tuske pour ton skript ainsi que si possible utiliser des function au lieu de commande pour ouvrir les autres GUI ça vaut mieux pour l'optimisation, la qualité du code et enfin on peut te fournir plus facilement une aide ^^ 

Voici plus d'info : 

 

Partager ce message


Lien à poster
Partager sur d’autres sites
Il y a 2 heures, Dark_winsYT a dit :

Je viens de comprendre pourquoi il m'a gardé des ancienne ligne de code je vais refaire tout le skript et je dit si c'est bon

Salut, oui je pense que ta variable de cooldown doit être la même dans les deux cas donc il t'affiche le cooldown quand tu test je t'invite pour être plus autonome a te faire un petite commande qui reset tes propres variable afin de mieux tester ton skript car attendre 2-3H pour refaire un teste c'est pas génial ? 

Partager ce message


Lien à poster
Partager sur d’autres sites

Quand je reload un skript avec tuske il me met an internal error occurred je pense que c'est a cause de sa version il est en 1.8.2 et mon serv en 1.8.8 mais il n'a pas été upgrade depuis comment je fait j'ai déjà fait /tuske update check il met dit que il est bien en derniere maj je met mon serv en 1.8.2 ? 

Partager ce message


Lien à poster
Partager sur d’autres sites

J'ai cherché mais je comprend pas voila les erreur dans la console 

[14:17:13 INFO]: Dark_wins issued server command: /sk reload OpCommands
[14:17:13 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'sk' in plugin Skript v2.2-SNAPSHOT
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_171]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_171]
        at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.lang.IllegalAccessError: tried to access method ch.njol.skript.SkriptEventHandler.addSelfRegisteringTrigger(Lch/njol/skript/lang/Trigger;)V from class com.github.tukenuke.tuske.manager.gui.v2.TriggerUnregisterListener
        at com.github.tukenuke.tuske.manager.gui.v2.TriggerUnregisterListener.register(TriggerUnregisterListener.java:29) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.register(SkriptGUIEvent.java:50) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.<init>(SkriptGUIEvent.java:32) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.getInstance(SkriptGUIEvent.java:24) ~[?:?]
        at com.github.tukenuke.tuske.sections.gui.EffFormatGUI.init(EffFormatGUI.java:106) ~[?:?]
        at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:244) ~[?:?]
        at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:171) ~[?:?]
        at ch.njol.skript.lang.Statement.parse(Statement.java:60) ~[?:?]
        at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:650) ~[?:?]
        at ch.njol.skript.command.Commands.loadCommand(Commands.java:466) ~[?:?]
        at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:469) ~[?:?]
        at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:268) ~[?:?]
        at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:155) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
        ... 15 more

Partager ce message


Lien à poster
Partager sur d’autres sites
Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.

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