Aller au contenu
Jeremylo1

Impossible de give et d'enchanter un trident

Messages recommandés

Bonjour, je suis actuellement en développement d'un Skript  et tout va bien, sauf pour une chose ... le give des tridents enchante, les commandes:

execute console command "minecraft:give %player% minecraft:trident{Unbreakable:1,Enchantments:[{id:"minecraft:loyalty",lvl:3}]} 1"

execute console command "/minecraft:give %player% minecraft:trident{Unbreakable:1,Enchantments:[{id:"minecraft:loyalty",lvl:3}]} 1"

execute console command "give %player% minecraft:trident{Unbreakable:1,Enchantments:[{id:"minecraft:loyalty",lvl:3}]} 1"

ne fonctionne pas, en revanche la commande:

execute console command "minecraft:give %player% minecraft:trident{Unbreakable:1} 1"

fonctionne. Je pense que cela vient des " ici "minecraft:loyalty", que faire ?

Modifié par Jeremylo1

Partager ce message


Lien à poster
Partager sur d’autres sites

Et bien revérifie le nom de tes enchantements sinon va falloir passer par des NBT ... 

Partager ce message


Lien à poster
Partager sur d’autres sites
il y a 1 minute, lazerda456 a dit :

Et bien revérifie le nom de tes enchantements sinon va falloir passer par des NBT ... 

La commande fonctionne si je la fait directement sur le serveur mais impossible avec Skript.

Partager ce message


Lien à poster
Partager sur d’autres sites
options:
    prefix: &7[&3Arene&7]

    colorcode: &c

    highlightcolor: &6

    permisionmessage: {@prefix} {@colorcode}You are not allowed to do that.

variables:
	{player} = 0

command /join Arene Zeus:
    permission: "inv.save"
    permission message: "{@permisionmessage}"
    aliases: setinventory
    trigger:
        if {player} is less than 0:
            set {player} to 0
        if player is in world "world":
            add 1 to {player}
            set {number.%player%} to {player}
            set {_count} to 0
            loop 45 times:
                set {inv.%player%.%{_count}%.Zeus} to slot {_count} of player's inventory
                add 1 to {_count}
            set {inv.%player%.helmet.Zeus} to player's helmet
            set {inv.%player%.chest.Zeus} to player's chestplate
            set {inv.%player%.legs.Zeus} to player's leggings
            set {inv.%player%.feet.Zeus} to player's boots
            set {inv.%player%.health.Zeus} to the player's health
            set {inv.%player%.hunger.Zeus} to the player's hunger bar
            set {inv.%player%.level.Zeus} to the player's level
            message "{@prefix} {@colorcode}Inventory set to Zeus %{player}% and %{number.%player%}%"
            wait a tick
            clear player' inventory
            execute console command "/gamemode survival %player%"
            execute console command "/heal %player%"
            execute console command "minecraft:give %player% minecraft:trident{Unbreakable:1]} 1"
            wait a tick
            if {number.%player%} is 3:
                set {_l} to location (345.5, 21, 1.5) in world "Arenes"  
                set yaw of {_l} to 90
                set pitch of {_l} to -1.5
                teleport player to {_l}
            if {number.%player%} is 2:
                set {_l} to location (328.5, 20, 1.5) in world "Arenes"  
                set yaw of {_l} to 90
                set pitch of {_l} to -1.5
                teleport player to {_l}
            if {number.%player%} is 1:
                set {_l} to location (337.5, 12, -5.5) in world "Arenes"  
                set yaw of {_l} to 90
                set pitch of {_l} to -1.5
                teleport player to {_l}
            if {number.%player%} is 4:
                set {_l} to location (328.5, 12, 13.5) in world "Arenes"  
                set yaw of {_l} to 90
                set pitch of {_l} to -1.5
                teleport player to {_l}
        else:
            message "{@prefix} {@colorcode}Tu es deja dans l'arene Zeus"
        
command /leave Arene Zeus:
    permission: "inv.recall"
    permission message: "{@permisionmessage}"
    aliases: inventory
    trigger:
        add -1 to {player}
        set {_l} to location (-24.5, 74, -0.5) in world "world"  
        set yaw of {_l} to 0.0
        set pitch of {_l} to 0.0
        teleport player to {_l}
        wait 2 tick
        set {_count} to 0
        loop 45 times:
            set slot {_count} of player's inventory to {inv.%player%.%{_count}%.Zeus}
            add 1 to {_count}
        set the helmet of player to {inv.%player%.helmet.Zeus}
        set the chestplate of player to {inv.%player%.chest.Zeus}
        set the leggings of player to {inv.%player%.legs.Zeus}
        set the boots of player to {inv.%player%.feet.Zeus}
        set the health of player to {inv.%player%.health.Zeus}
        set the hunger of player to {inv.%player%.hunger.Zeus}
        set the level of player to {inv.%player%.level.Zeus}
        wait a tick
        clear {Inventory.%player%::*}
        clear {Inventory.%player%::Zeus}
        clear {Inventory.%player%::zeus}
        message "{@prefix} {@colorcode}Your inventory has been changed to Zeus."
        stop

command /delinv [<text>]:
    permission: "inv.delete"
    permission message: "{@permisionmessage}"
    aliases: deleteinventory
    trigger:
        if argument 1 is not set:
            make player execute command "inv help"
            stop
        if argument 1 is "all":
            clear {inv.%player%::Zeus}
            message "{@prefix} {@colorcode}All inventories removed"
            stop
        remove argument 1 from {inv.%player%::Zeus}
        message "{@prefix} {@colorcode}Inventory %arg 1% removed"
        stop

Voila, la commande en question est dans le "/join arene zeus"

Ah et si il y a plusieurs clear inventory c'est parce que je trouve pas la commande qui clear la variable inventaire du joueur et que je fais des tests x) 

Modifié par Jeremylo1

Partager ce message


Lien à poster
Partager sur d’autres sites

Ok pas de problème, je pense que ça bien du fait qu'il y est des " dans les premiers "

Partager ce message


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

give 1 trident Unbreakable 1 to player

 

Ok mais pour le loyalty comme ici ?

execute console command "give %player% minecraft:trident{Unbreakable:1,Enchantments:[{id:"minecraft:loyalty",lvl:3}]} 1"

 

Modifié par Jeremylo1

Partager ce message


Lien à poster
Partager sur d’autres sites

Je viens de trouver la solution, cela vient bien des "en fait il faut mettre: 

execute console command "/minecraft:give Jeremylo1 minecraft:trident{Unbreakable:1,Enchantments:[{id:""minecraft:loyalty"",lvl:3}]} 1"

au lieu de:

execute console command "/minecraft:give Jeremylo1 minecraft:trident{Unbreakable:1,Enchantments:[{id:"minecraft:loyalty",lvl:3}]} 1"

il faut doubler les guillemets de "minecraft:loyalty" comme cela ""minecraft:loyalty""

Partager ce message


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

×

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.