Aller au contenu
  • 0

kit custom


Question

Posté(e)

Bonjour,

Je veux faire un kit custom pour mon uhc sauf que je n'y arrive pas :

Code :

on command "/uhcrandomlol":
   wait 1 tick
   clear inventory of the player
   give a book named "&bKit UHC Default" to the slot 0 of player
   give a book named "&bKit UHC Custom" to the slot 2 of player

command /edit:
   trigger:
       set gamemode of player to survival
       clear inventory of the player
       make console execute command "/feed %player%"
       equip player with a diamond helmet
       equip player with a diamond chestplate
       equip player with a diamond leggings
       equip player with a diamond boots
       set slot 0 of player to a diamond sword of sharpness 2 named ""
       give a fishing rod to the slot 1 of player
       give a lava bucket to the slot 32 of player
       give 64 steak to the slot 3 of player
       give 64 arrow to the slot 27 of player
       set slot 6 of player to a bow of power 3 named ""
       give 64 oak wood planks to the slot 7 of player
       give golden apple item to the slot 4 of player
       give golden apple item to the slot 4 of player
       give golden apple item to the slot 4 of player
       give golden apple item to the slot 4 of player
       give golden apple item to the slot 4 of player
       give golden apple item to the slot 4 of player
       give 64 cobblestone to the slot 28 of player
       give a water bucket to the slot 8 of player
       give a water bucket to the slot 30 of player
       give a lava bucket to the slot 2 of player
       give a golden apple item named "&6Golden Head" to the slot 5 of player
       give a golden apple item named "&6Golden Head" to the slot 5 of player
       give a golden apple item named "&6Golden Head" to the slot 5 of player
       send "&4&oLes teams sont interdites !"
       give player compass named "&6Tracker"
       send "&eUne fois votre kit créer, faites /save"
       set {save.%player%} to true

command /save:
   trigger:
       if {save.%player%} is false:
           send "&eVous devez d'abbord faire /edit"
       else:
           set {kit.uhc.custom.%player%} to player's inventory
           set {save.%player%} to false
           send "&aVotre kit custom uhc à bien été créer !"
           clear inventory of the player
           give a clock named "&7&oWarps" to the slot 0 of player
           give a chest named "&bTéléportation au UHC FFA &7(Clique Droit)" to the slot 4 of player

on rightclick with book:
   if name of player's tool is "&bKit UHC Default":
       make player execute command "/4598uhc"
       send "&2Kit UHC Default reçu."
   else if name of player's tool is "&bKit UHC Custom":
       if {kit.uhc.custom.%player%} is not set:
           send "&eVous devez d'abbord créer votre kit !"
           cancel event
       else:
           give {inv.uhc.%player%}
           send "&2Kit Custom reçu !"

 

Je veux sauvegarder mon kit dans une variable sauf que skript me dis que c'est impossible :

https://gyazo.com/198cf32754cadb2898e4d0cc6e5b3017

Merci de votre aide !

  • J'aime 1

4 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Merci

Voici ce que j'ai fais :

on command "/uhcrandomlol":
   wait 1 tick
   clear inventory of the player
   give a book named "&bKit UHC Default" to the slot 0 of player
   give a book named "&bKit UHC Custom" to the slot 2 of player

command /edit:
   trigger:
       if player is in world "spawn":
           set gamemode of player to survival
           clear inventory of the player
           make console execute command "/feed %player%"
           equip player with a diamond helmet
           equip player with a diamond chestplate
           equip player with a diamond leggings
           equip player with a diamond boots
           set slot 0 of player to a diamond sword of sharpness 2 named ""
           give a fishing rod to the slot 1 of player
           give a lava bucket to the slot 32 of player
           give 64 steak to the slot 3 of player
           give 64 arrow to the slot 27 of player
           set slot 6 of player to a bow of power 3 named ""
           give 64 oak wood planks to the slot 7 of player
           give golden apple item to the slot 4 of player
           give golden apple item to the slot 4 of player
           give golden apple item to the slot 4 of player
           give golden apple item to the slot 4 of player
           give golden apple item to the slot 4 of player
           give golden apple item to the slot 4 of player
           give 64 cobblestone to the slot 28 of player
           give a water bucket to the slot 8 of player
           give a water bucket to the slot 30 of player
           give a lava bucket to the slot 2 of player
           give a golden apple item named "&6Golden Head" to the slot 5 of player
           give a golden apple item named "&6Golden Head" to the slot 5 of player
           give a golden apple item named "&6Golden Head" to the slot 5 of player
           send "&4&oLes teams sont interdites !"
           give player compass named "&6Tracker"
           send "&eUne fois votre kit créer, faites /save"
           set {save.%player%} to true
       else:
           cancel event
           send "&eVous devez être au spawn pour effectuez cette commande."

command /save:
   trigger:
       if {save.%player%} is false:
           send "&eVous devez d'abbord faire /edit"
       else:
           set {_count} to 0
           loop 36 times :
               set {inv.%player%.%{_count}%.main} to slot {_count} of player's inventory
               add 1 to {_count}
               set {inv.%player%.helmet main} to player's helmet
               set {inv.%player%.chest.main} to player's chestplate
               set {inv.%player%.legs.main} to player's leggings
               set {inv.%player%.feet.main} to player's boots
               set {save.%player%} to false
               send "&aVotre kit custom uhc à bien été créer !"
               clear inventory of the player
               give a clock named "&7&oWarps" to the slot 0 of player
               give a chest named "&bTéléportation au UHC FFA &7(Clique Droit)" to the slot 4 of player

on rightclick with book:
   if name of player's tool is "&bKit UHC Default":
       make player execute command "/4598uhc"
       send "&2Kit UHC Default reçu."
   else if name of player's tool is "&bKit UHC Custom":
       if {kit.uhc.custom.%player%} is not set:
           send "&eVous devez d'abbord créer votre kit !"
           cancel event
       else:
           loop 36 times:
               set slot {_count} of player's inventory to {inv.%player%.%{_count}%.main}
               add 1 to {_count}
               set the helmet of player to {inv.%player%.helmet.main}
               set the chestplate of player to {inv.%player%.chest.main}
               set the leggings of player to {inv.%player%.legs.main}
               set the boots of player to {inv.%player%.feet.main}

 

Mais ça ne marche pas pourtant ça me dis aucune erreur :/

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