Aller au contenu

KoTH / Problème de capture


Messages recommandés

Posté(e)

Je viens de découvrir ce KoTH https://skript-mc.fr/forum/index.php?threads/♦-koth-♦-gratuit-•.777/

Il est incomplet mais je le modifierais par la suite.

Quand je créer les zones et lance le KoTH il m'indique les coordonnées et m'informe que le KoTH est activé. Quand je fais /koth info il m'indique aussi que le KoTH est en cours.

Le problème arrive au moment où j'essaye de capturer la zone. rien ne s'affiche et sur le /koth info il m'indique que le Koth n'est pas en train de se faire capturer.

J'ai besoin de vous pour savoir d'où provient le bug.

 

Ps: j'ai tous les Addons et le skript reload ne m'affiche aucune erreur.

Voici les commandes essentielles:

- /koth create <nom>

- /koth setpoint1 <nom>

- /koth setpoint2 <nom>

- /koth start <nom>

 

Commandes temporaires qui manquaient au skript que j'ai ajouté à la dernière minute et que je rendrais plus propre une fois ce problème résolu:

 

- /stopp

- /koth delete

- /koth list

 

 

#
#Interdiction de partager le Skript.#
#Interdiction de revendre le Skript.#
#
options:
   p: &8[&aKoTH&8] #<= Prꧩxe
   bloc: green wool #<= Block de capture
   temps: 300 #<= Nombre de secondes ou le joueur doit rester sur le block
command /koth [<text>] [<text>]:
   trigger:
       if arg 1 is not set:
           send "{@p} &7/koth (list/delete/create/setpoint1/setpoint2/info/cadeau) (nom du koth)"
       if arg 1 is "list":
           send "{@p} &7Voici la liste des KoTHs: &a%{koths::*}%"
       if arg 1 is "delete":
           clear {koths::*}
           send "{@p} &7Vous avez delete tous les KoTH"
       if arg 1 is "create":
           add arg 2 to {koths::*}
           set {koth.%arg 2%} to "crꦲ"
           send "{@p} &7Vous avez crꦲ le KoTH &a%arg 2%"
       if arg 1 is "setpoint1":
           if player has permission "koth.setup":
               if {koth.%arg 2%} is "crꦲ":
                   if arg 2 is set:
                       send "{@p} &7Vous avez set le point 1 du KoTH &a%arg 2%"
                       set {koth.p1.%arg 2%} to location of block under the player
                   else:
                       send "{@p} &7Veuillez donnez le nom du KoTH auquel vous voulez set le point"
               else:
                   send "{@p} &7Veuillez d'abord crꦲ le KoTH"
           else:
               send "{@p} &7Tu n'as pas la permission!"
       if arg 1 is "setpoint2":
           if player has permission "koth.setup":
               if {koth.%arg 2%} is "crꦲ":
                   if arg 2 is set:
                       send "{@p} &7Vous avez set le point 2 du KoTH"
                       set {koth.p2.%arg 2%} to location of block under the player
                   else:
                       send "{@p} &7Veuillez donnez le nom du KoTH auquel vous voulez set le point"
               else:
                   send "{@p} &7Veuillez d'abord crꦲ le KoTH"
           else:
               send "{@p} &7Tu n'as pas la permission!"
       if arg 1 is "info":
           if {koth.actif} is "oui":
               send "{@p} &7KoTH en cours: &a%{koth.actif.nom}%"
               send "{@p} &7Coordonn고du KoTH: &a%{koth.actif.co}%"
               if {koth.actif.capture} is set:
                   send "{@p} &7Capture par: &a%{koth.actif.capture}%"
                   send "{@p} &7Avancement de la capture: &a%{capture.%{koth.actif.capture}%}%&7/{@temps} "
               else:
                   send "{@p} &7Personne ne capture le KoTH"
           else:
               send "{@p} &7Aucun KoTH n'est en cours"
       if arg 1 is "start":
           if player has permission "koth.start":
               if arg 2 is set:
                   if {koth.%arg 2%} is "crꦲ":
                       if {koth.actif.nom} is not set:
                           set {koth.actif.nom} to "%arg 2%"
                           set {koth.actif.co} to "%{koth.p1.%arg 2%}%"
                           clear {koth.actif.capture}
                           set {koth.actif} to "oui"
                           broadcast "{@p} &7Le KoTH &a%arg 2% &7dꣵte!"
                           broadcast "{@p} &7Les coordonn고sont: &a%{koth.actif.co}%!"
                       else:
                           send "{@p} &7Un KoTH est dꫠ en cours.."
                   else:
                       send "{@p} &7Ce KoTH n'existe pas"
               else:
                   send "{@p} &7Veuillez prꤩser quel KoTH dꮡrrer"
           else:
               send "{@} &7Vous n'avez pas la permission"
       if arg 1 is "cadeau":
           if {koth.gagner} is "%{koth.actif.capture}%":
               give 1 diamond helmet to the player
               give 1 diamond chestplate to the player
               give 1 diamond leggings to the player
               give 1 diamond boots to the player
               give 1 diamond sword to the player

on step on {@bloc}:
   if player is within {koth.p1.%{koth.actif.nom}%} to {koth.p2.%{koth.actif.nom}%}:
       if {koth.actif.capture} is set:
           stop
       else:
           set {koth.actif.capture} to "%player%"
           send "{@p} &7Vous capturez le KoTH!"
           broadcast "{@p} &7Le joueur &a%player% &7capture le KoTH %{koth.actif.nom}%"
           add 1 to {capture.%player%}
   else:  
       if {koth.actif.capture} is "%player%":
           broadcast "{@p} &7Le joueur %player% perd la zone du KoTH!"
           clear {koth.actif.capture}
           clear {capture.%player%}
           stop

every 1 second:
   if {koth.actif.capture} is set:
       add 1 to {capture.%{koth.actif.capture}%}
       if {capture.%{koth.actif.capture}%} is equal to {@temps}:
           broadcast "{@p} &7Le KoTH est fini! Bravo ࠦa%{koth.actif.capture}%"
           send "{@p} &7Pour rꤵperer ta r꤯mpense, fait cette commande &a/koth cadeau (Vous avez 5 minutes)"  to {koth.actif.capture}
           clear {koth.capture.%{koth.actif.capture}%}
           clear {koth.actif.nom}
           clear {koth.actif.co}
           clear {koth.actif}
           set {koth.gagner} to "%{koth.actif.capture}%"
           wait 5 minutes
           clear {koth.actif.capture}
           clear {koth.gagner}

every 1 minute:
   if {koth.actif.capture} is set:
       broadcast "{@p} &7Le KoTH est capturer ࠥ{capture.%{koth.actif.capture}%}%/{@temps}."
on quit:
   if {koth.actif.capture} is "%player%":
       clear {koth.actif.capture}
       clear {capture.%player%}

on any move:
   if {koth.actif.capture} is "%player%":
       if block under player is air:
           wait 6 ticks
           if block under player is {@bloc}:
               stop
       else:
           if block under player is {@bloc}:
               stop
           else:
               broadcast "{@p} &7Le joueur %player% perd la zone du KoTH!"
               clear {koth.actif.capture}
               clear {capture.%player%}
               stop


command /stopp:
   trigger:
       clear {koth.capture.%{koth.actif.capture}%}
       clear {koth.actif.nom}
       clear {koth.actif.co}
       clear {koth.actif}
       clear {koth.actif.capture}
       clear {koth.gagner}
       send "&ckoth terminado"




Je vous souhaite bonne chance et merci pour votre aide!

Cordialement, Nivlem

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