Aller au contenu
  • 0

Probleme de Duplication dans les GUI


Question

Posté(e)

Bonjour,

Si je suis la c'est par ce que une de mes GUI ne fonctionne pas.

Je suis en 1.8 et j'ai Skript, + quelque addons (demandez moi pour plus d'info).

Donc quand j'ouvre la GUI je peux récupérer (certaine fois) les items qu'elle contient, alors qu'avec mes autres GUI, aucun problème. Pourtant le skript est le même dans les deux cas...

 

on rightclick on 120:
    set {_locheal} to location of event-block
    remove 1 from y-coordinate of {_locheal}
    set {table.open.%player%} to "on"
    if block at {_locheal} is emerald block:
        open chest with 1 rows named "&aRune Table" to player
        wait a tick
        format slot 1 of player with a diamond sword named "&aSword Enchant" to run [make player execute command "/sword.enchant"]
        format slot 4 of player with a diamond pickaxe named "&aPickaxe Enchant" to run [make player execute command "/pickaxe.enchant"]
        format slot 7 of player with a diamond chestplate named "&aArmor Enchant" to run [make player execute command "/armor.enchant"]

command /sword.enchant:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aSword Enchant" to player
            wait a tick
            format slot 1 of player with a 377 named "&aFire Aspect" to run [make player execute command "/sword.fire"]
            format slot 4 of player with a string named "&aSharpness" to run [make player execute command "/sword.sharpness"]
            format slot 7 of player with a iron block named "&aUnbreaking" to run [make player execute command "/sword.unbreaking"]

command /sword.sharpness:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aSharpness Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aSharpness 5" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/sh.01"]
            format slot 3 of player with 2 emerald named "&aSharpness 6" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/sh.02"]
            format slot 4 of player with 3 emerald named "&aSharpness 7" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/sh.03"]
            format slot 5 of player with 4 emerald named "&aSharpness 8" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/sh.04"]
            format slot 6 of player with 5 emerald named "&aSharpness 10" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/sh.05"]

command /sh.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with sharpness 5
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sh.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with sharpness 6
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sh.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with sharpness 7
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sh.04:
    trigger:
        if {table.open.%player%} is "on":
            if player has 192 emeralds:
                remove 192 emeralds from player
                enchant tool of player with sharpness 8
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sh.05:
    trigger:
        if {table.open.%player%} is "on":
            if player has 320 emeralds:
                remove 320 emeralds from player
                enchant tool of player with sharpness 10
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sword.unbreaking:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aUnbreaking Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aUnbreking 3" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/un.01"]
            format slot 3 of player with 2 emerald named "&aUnbreking 4" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/un.02"]
            format slot 4 of player with 3 emerald named "&aUnbreking 5" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/un.03"]
            format slot 5 of player with 4 emerald named "&aUnbreking 6" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/un.04"]
            format slot 6 of player with 5 emerald named "&aUnbreking 8" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/un.05"]

command /un.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with unbreaking 3
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /un.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with unbreaking 4
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /un.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with unbreaking 5
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /un.04:
    trigger:
        if {table.open.%player%} is "on":
            if player has 192 emeralds:
                remove 192 emeralds from player
                enchant tool of player with unbreaking 6
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /un.05:
    trigger:
        if {table.open.%player%} is "on":
            if player has 320 emeralds:
                remove 320 emeralds from player
                enchant tool of player with unbreaking 8
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /sword.fire:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aUnbreaking Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aFire Aspect 1" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/fa.01"]
            format slot 4 of player with 2 emerald named "&aFire Aspect 2" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/fa.02"]
            format slot 6 of player with 3 emerald named "&aFire Aspect 3" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/fa.03"]

command /fa.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with fire aspect 1
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /fa.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with fire aspect 2
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /fa.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with fire aspect 3
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /pickaxe.enchant:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aSword Enchant" to player
            wait a tick
            format slot 1 of player with a string named "&aEfficiency" to run [make player execute command "/pickaxe.efficiency"]
            format slot 4 of player with a diamond named "&aFortune" to run [make player execute command "/pickaxe.fortune"]
            format slot 7 of player with a iron block named "&aUnbreaking" to run [make player execute command "/pickaxe.unbreaking"]

command /pickaxe.efficiency:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aSharpness Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aEfficiency 5" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/ef.01"]
            format slot 3 of player with 2 emerald named "&aEfficiency 6" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/ef.02"]
            format slot 4 of player with 3 emerald named "&aEfficiency 7" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/ef.03"]
            format slot 5 of player with 4 emerald named "&aEfficiency 8" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/ef.04"]
            format slot 6 of player with 5 emerald named "&aEfficiency 10" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/ef.05"]

command /ef.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with efficiency 5
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /ef.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with efficiency 6
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /ef.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with efficiency 7
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /ef.04:
    trigger:
        if {table.open.%player%} is "on":
            if player has 192 emeralds:
                remove 192 emeralds from player
                enchant tool of player with efficiency 8
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /ef.05:
    trigger:
        if {table.open.%player%} is "on":
            if player has 320 emeralds:
                remove 320 emeralds from player
                enchant tool of player with efficiency 10
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /pickaxe.unbreaking:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aUnbreaking Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aUnbreking 3" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/un.01"]
            format slot 3 of player with 2 emerald named "&aUnbreking 4" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/un.02"]
            format slot 4 of player with 3 emerald named "&aUnbreking 5" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/un.03"]
            format slot 5 of player with 4 emerald named "&aUnbreking 6" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/un.04"]
            format slot 6 of player with 5 emerald named "&aUnbreking 8" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/un.05"]

command /pickaxe.fortune:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aUnbreaking Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aFortunte 3" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/fo.01"]
            format slot 4 of player with 2 emerald named "&aFortunte 4" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/fo.02"]
            format slot 6 of player with 3 emerald named "&aFortunte 5" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/fo.03"]

command /fo.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with fortune 3
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /fo.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with fortune 4
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /fo.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with fortune 5
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /armor.enchant:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aSword Enchant" to player
            wait a tick
            format slot 2 of player with a string named "&aProtection" to run [make player execute command "/armor.pro"]
            format slot 6 of player with a iron block named "&aUnbreaking" to run [make player execute command "/armor.unbreaking"]

command /armor.pro:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aProtection Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aProtection 4" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/po.01"]
            format slot 3 of player with 2 emerald named "&aProtection 5" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/po.02"]
            format slot 4 of player with 3 emerald named "&aProtection 6" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/po.03"]
            format slot 5 of player with 4 emerald named "&aProtection 7" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/po.04"]
            format slot 6 of player with 5 emerald named "&aProtection 10" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/po.05"]

command /po.01:
    trigger:
        if {table.open.%player%} is "on":
            if player has 32 emeralds:
                remove 32 emeralds from player
                enchant tool of player with sharpness 4
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /po.02:
    trigger:
        if {table.open.%player%} is "on":
            if player has 64 emeralds:
                remove 64 emeralds from player
                enchant tool of player with Protection 5
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /po.03:
    trigger:
        if {table.open.%player%} is "on":
            if player has 128 emeralds:
                remove 128 emeralds from player
                enchant tool of player with Protection 6
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /po.04:
    trigger:
        if {table.open.%player%} is "on":
            if player has 192 emeralds:
                remove 192 emeralds from player
                enchant tool of player with Protection 7
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /po.05:
    trigger:
        if {table.open.%player%} is "on":
            if player has 320 emeralds:
                remove 320 emeralds from player
                enchant tool of player with Protection 10
                send "&aEnchantement réussi !"
                set {table.open.%player%} to "off"
            else:
                send "&cVous n'avez pas assez d'emeraudes !"
                set {table.open.%player%} to "off"

command /armor.unbreaking:
    trigger:
        if {table.open.%player%} is "on":
            open chest with 1 rows named "&aUnbreaking Enchant" to player
            wait a tick
            format slot 2 of player with 1 emerald named "&aUnbreking 3" with lore "&aCout||&a&l32 Emeraudes" to close then run [make player execute command "/un.01"]
            format slot 3 of player with 2 emerald named "&aUnbreking 4" with lore "&aCout||&a&l64 Emeraudes" to close then run [make player execute command "/un.02"]
            format slot 4 of player with 3 emerald named "&aUnbreking 5" with lore "&aCout||&a&l2x64 Emeraudes" to close then run [make player execute command "/un.03"]
            format slot 5 of player with 4 emerald named "&aUnbreking 6" with lore "&aCout||&a&l3x64 Emeraudes" to close then run [make player execute command "/un.04"]
            format slot 6 of player with 5 emerald named "&aUnbreking 8" with lore "&aCout||&a&l5x64 Emeraudes" to close then run [make player execute command "/un.05"]

J'ai aussi essayé de mettre des wait 2 ticks, ça ne marche pas.

Je peux vous envoyer d'autre code de  GUI que j'aurais fait avant si vous le souhaitez.

Merci d'avance.

Milwen

2019-07-04_20.18.53.png

Messages recommandés

  • 0
Posté(e)
il y a 18 minutes, Yghore a dit :

Le problème viens de SkQuery, utilise Tuske pour tes guis. (Il existe un skript pour convertir ces guis skquery en tuske)

Disponible ici: https://skript-mc.fr/forum/files/file/7-skquerytotuske/ (j'avais anticipé ta question hihi, j'étais en train d'aller te chercher le skript ^^')

Tutoriel sur Tuske: https://skript-mc.fr/forum/topic/11141-les-gui-avec-tuske-avec-la-v2/ ou https://forums.skunity.com/threads/gui-manager-tutorial.2349/

Bonne soirée !

  • 0
Posté(e)
il y a 2 minutes, Milwen a dit :

Alors loin de moi l'idée de faire le forceur hein mais j'ai un petit problème ^^'

2019-07-04_20.51.09.png

Est-ce que tu as installé Tuske sur ton serveur? & merci d'utiliser le bouton "Editer", il est là pour ça plutôt que de créer un double poste ! Merci 🙂

Téléchargement de Tuske: https://skripttools.net/addons?q=Tuske

  • 0
Posté(e) (modifié)
il y a 14 minutes, Acenox a dit :

Est-ce que tu as installé Tuske sur ton serveur? & merci d'utiliser le bouton "Editer", il est là pour ça plutôt que de créer un double poste ! Merci 🙂

Téléchargement de Tuske: https://skripttools.net/addons?q=Tuske

 

Malgré avoir installer la dernier version de Tuske, les erreurs persistes 😕
J'y ferais attention ^^

 

2019-07-04_21.06.39.png

Modifié par Milwen
  • 0
Posté(e)

Merci, alors peut-être que le Skript n'est malheureusement pas à jour, alors je t'invite à faire la modification avec les tutoriels ci-dessus pour remplacer tes anciens menus vers ceux de Tuske.

@Olynosi tu passes par là & que tu as un peu de temps, peut-être pourras-tu corriger le Skript? car il est pas mal utilisé 🙂

Bonne soirée 🙂

  • 0
Posté(e)
il y a 26 minutes, Acenox a dit :

un peu de temps

C'est pas un peu de temps qu'il me faudrait mais 1 à 3 heures de travail pour corriger son script, ce que je ne peux pas pour le moment, j'ai bien trop de travail et projets.

  • Triste 1
  • Vraiment triste 1
  • 0
Posté(e)

Bonjour,

J'ai passé tous mes skript de GUI vers des skript supporté par TuSke.

Problème, maintenant AUCUNE de mes nouvelles GUIs ne veulent bien s'ouvrir.

J'ai beau en rajouté de TuSke, de SkQuery, rien n'y fait.

 

Par exemple, pour ce code, ca ne marche pas:

command /essais.GUI:
    trigger:
        open chest with 1 rows named "&eAcheter un grade" to player
        wait a tick
        format slot 2 of player with a gold ingot named "&eVanir" with lore "&eCout: &650000$" to close then run [make player execute command "/buy.vanir"]
        format slot 4 of player with a diamond named "&aLoki" with lore "&eCout: &6150000$" to close then run [make player execute command "/buy.loki"]
        format slot 6 of player with a emerald named "&3Baldur" with lore "&eCout: &61000000$" to close then run [make player execute command "/buy.baldur"]

Alors que pour celui-ci ça fonctionne:

command /grade:
    trigger:
        open chest with 1 rows named "&eAcheter un grade" to player
        wait a tick
        format slot 2 of player with a gold ingot named "&eVanir" with lore "&eCout: &650000$" to close then run [make player execute command "/buy.vanir"]
        format slot 4 of player with a diamond named "&aLoki" with lore "&eCout: &6150000$" to close then run [make player execute command "/buy.loki"]
        format slot 6 of player with a emerald named "&3Baldur" with lore "&eCout: &61000000$" to close then run [make player execute command "/buy.baldur"]

 

Et c'est la même chose pour mes codes de GUI qui utilise TuSke.

Comment doit-je faire ?

Merci d'avance.

  • 0
Posté(e)
il y a 39 minutes, Olyno a dit :

Tout simplement aucune syntaxe que tu utilises provient de tuske, donc normal qu'aucun gui ne s'ouvre correctement.

Sauf que comme je l'ai dit précédemment, j'ai fait d'autre skript dont les syntaxe de la GUI ne proviennent QUE de TuSke.

Exemple:

command /sword.enchant:
    trigger:
        if {table.open.%player%} is "on":
            open virtual chest inventory with size 1 named "&aSword Enchant" to player
            format gui slot 1 of player with a 377 named "&aFire Aspect" to run player command "/sword.fire"
            format gui slot 4 of player with a string named "&aSharpness" to run player command "/sword.sharpness"
            format gui slot 7 of player with a iron block named "&aUnbreaking" to run player command "/sword.unbreaking"

Celui ci marche, maintenant si je prend celui-ci:

command /sword.fire:
    trigger:
        if {table.open.%player%} is "on":
            open virtual chest inventory with size 1 named "&aUnbreaking Enchant" to player
            wait 2 tick
            format gui slot 2 of player with 1 emerald named "&aFire Aspect 1" with lore "&aCout||&a&l32 Emeraudes" to run player command "/fa.01"
            format gui slot 4 of player with 2 emerald named "&aFire Aspect 2" with lore "&aCout||&a&l64 Emeraudes" to run player command "/fa.02"
            format gui slot 6 of player with 3 emerald named "&aFire Aspect 3" with lore "&aCout||&a&l2x64 Emeraudes" to run player command "/fa.03"

Cela ne marche pas.

Et je précise que cela ne viens pas de la variable {table.open.%player%}, on a déjà essayé de l'enlever rien n'y fait.

  • 0
Posté(e) (modifié)

Alors on a cherché, on a refait toutes les gui avec TuSke et... bah toujours rien. Ça ne marche pas.

Ha et aussi je précise qu'il n'y a aucune erreur hein, ça ne veux juste pas marcher.

Pas même de "an internal error...", non non! Rien !

Modifié par Milwen
  • 0
Posté(e) (modifié)
il y a 17 minutes, Yghore a dit :

Même code que la dernier message envoyé ?

Bonjour ! Je suis un ami de Milwen, je lui es refait le code et toujours le même problème voici le code:

 

options:
	PM: &2[&aEnchant Table&2]
	PR: &4[&cEnchant Table&4]

on rightclick on ender portal frame:
	set {_locheal} to location of event-block
	remove 1 from y-coordinate of {_locheal}
	if block at {_locheal} is emerald block:
		wait 2 ticks
		open virtual chest inventory with size 1 named "&aRune Table" to player
		wait a tick
		format gui slot 1 of player with a diamond sword named "&a&lSword Enchant" to run player command "/§sword.enchant"
		format gui slot 4 of player with a diamond pickaxe named "&a&lPickaxe Enchant" to run player command "/§pickaxe.enchant"
		format gui slot 7 of player with a diamond chestplate named "&a&lArmor Enchant" to run player command "/§armor.enchant"

command /§sword.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aSword Enchant" to player
		wait a tick
		format gui slot 2 of player with a blaze powder named "&aFire Aspect" to run player command "/§sword.fire"
		format gui slot 4 of player with a string named "&aSharpness" to run player command "/§sword.sharpness"
		format gui slot 6 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"


#Enchantement Fire Aspect


command /§sword.fire:
	trigger:
		open virtual chest inventory with size 1 named "&aFire Aspect Enchant" to player
		wait a tick
		format gui slot 2 of player with a emerald named "&aFire Aspect &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§fire.01"
		format gui slot 4 of player with a emerald named "&aFire Aspect &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§fire.02"
		format gui slot 6 of player with a emerald named "&aFire Aspect &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§fire.03"
command /§fire.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 1
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fire.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 2
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fire.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 3
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player


#Enchantement Sharpness


command /§sword.sharpness:
	trigger:
		open virtual chest inventory with size 1 named "&aSharpness Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aSharpness &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§sh.05"
		format gui slot 2 of player with a emerald named "&aSharpness &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§sh.06"
		format gui slot 3 of player with a emerald named "&aSharpness &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§sh.07"
		format gui slot 5 of player with a emerald named "&aSharpness &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§sh.08"
		format gui slot 6 of player with a emerald named "&aSharpness &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§sh.09"
		format gui slot 7 of player with a emerald named "&aSharpness &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§sh.10"

command /§sh.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 5
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 6
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 7
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 8
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 6
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 10
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player



#Unbreaking Enchant



command /§all.unbreaking:
	trigger:
		open virtual chest inventory with size 1 named "&aUnbreaking Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aUnbreaking &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§un.01"
		format gui slot 2 of player with a emerald named "&aUnbreaking &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§un.02"
		format gui slot 4 of player with a emerald named "&aUnbreaking &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§un.03"
		format gui slot 6 of player with a emerald named "&aUnbreaking &n4" with lore "&aCoût: &a512 Emeraudes" to run player command "/§un.04"
		format gui slot 7 of player with a emerald named "&aUnbreaking &n5" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§un.05"

command /§un.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 1
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 2
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 3
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.04:
	trigger:
		if player has 512 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 4
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n4&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.05:
	trigger:
		if player has 1024 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 5
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n5&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			
			
#Pickaxe Enchant


command /§pickaxe.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aPickaxe Enchant" to player
		wait a tick
		format gui slot 2 of player with a string named "&aEfficiency" to run player command "/§pickaxe.efficiency"
		format gui slot 4 of player with a diamond named "&aFortune" to run player command "/§pickaxe.fortune"
		format gui slot 6 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"
		
		
		
#Efficiency Enchant



command /§pickaxe.efficiency:
	trigger:
		open virtual chest inventory with size 1 named "&aEfficiency Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aEfficiency &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§ef.05"
		format gui slot 2 of player with a emerald named "&aEfficiency &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§ef.06"
		format gui slot 3 of player with a emerald named "&aEfficiency &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§ef.07"
		format gui slot 5 of player with a emerald named "&aEfficiency &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§ef.08"
		format gui slot 6 of player with a emerald named "&aEfficiency &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§ef.09"
		format gui slot 7 of player with a emerald named "&aEfficiency &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§ef.10"
command /§ef.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 5
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 6
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 7
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 8
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 9
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 10
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			


#Fortune Enchant



command /§pickaxe.fortune:
	trigger:
		open virtual chest inventory with size 1 named "&aFortune Enchant" to player
		wait a tick
		format gui slot 2 of player with a emerald named "&aFortune &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§fo.01"
		format gui slot 4 of player with a emerald named "&aFortune &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§fo.02"
		format gui slot 6 of player with a emerald named "&aFortune &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§fo.03"
		
		
command /§fo.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 1
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fo.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 2
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fo.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 3
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			
			
#Armor Enchant



command /§armor.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aArmor Enchant" to player
		wait a tick
		format gui slot 3 of player with a string named "&aProtection" to run player command "/§armor.pro"
		format gui slot 5 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"
		
#Protection Enchant


command /§armor.pro:
	trigger:
		open virtual chest inventory with size 1 named "&aProtection Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aProtection &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§po.05"
		format gui slot 2 of player with a emerald named "&aProtection &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§po.06"
		format gui slot 3 of player with a emerald named "&aProtection &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§po.07"
		format gui slot 5 of player with a emerald named "&aProtection &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§po.08"
		format gui slot 6 of player with a emerald named "&aProtection &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§po.09"
		format gui slot 7 of player with a emerald named "&aProtection &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§po.10"
		
		
command /§po.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 5
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 6
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 7
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 8
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 9
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 10
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player

Sur nos serveur local tout marche, cependant sur notre machine non... Avez-vous une idée ? Merci à vous !

 

EDIT: Seul les menus des prixs des enchantements: fire aspect, fortune, efficiency ne marchent pas le reste marche ! 

Modifié par Darkmariosan
  • 0
Posté(e)

Vous avez une idée ?! 😥

Le 07/07/2019 à 14:36, Darkmariosan a dit :

Bonjour ! Je suis un ami de Milwen, je lui es refait le code et toujours le même problème voici le code:

 


options:
	PM: &2[&aEnchant Table&2]
	PR: &4[&cEnchant Table&4]

on rightclick on ender portal frame:
	set {_locheal} to location of event-block
	remove 1 from y-coordinate of {_locheal}
	if block at {_locheal} is emerald block:
		wait 2 ticks
		open virtual chest inventory with size 1 named "&aRune Table" to player
		wait a tick
		format gui slot 1 of player with a diamond sword named "&a&lSword Enchant" to run player command "/§sword.enchant"
		format gui slot 4 of player with a diamond pickaxe named "&a&lPickaxe Enchant" to run player command "/§pickaxe.enchant"
		format gui slot 7 of player with a diamond chestplate named "&a&lArmor Enchant" to run player command "/§armor.enchant"

command /§sword.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aSword Enchant" to player
		wait a tick
		format gui slot 2 of player with a blaze powder named "&aFire Aspect" to run player command "/§sword.fire"
		format gui slot 4 of player with a string named "&aSharpness" to run player command "/§sword.sharpness"
		format gui slot 6 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"


#Enchantement Fire Aspect


command /§sword.fire:
	trigger:
		open virtual chest inventory with size 1 named "&aFire Aspect Enchant" to player
		wait a tick
		format gui slot 2 of player with a emerald named "&aFire Aspect &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§fire.01"
		format gui slot 4 of player with a emerald named "&aFire Aspect &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§fire.02"
		format gui slot 6 of player with a emerald named "&aFire Aspect &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§fire.03"
command /§fire.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 1
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fire.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 2
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fire.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with fire aspect 3
				send "{@PM} &aVotre épée a désormais l'enchantement &nFire&r &a&nAspect&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player


#Enchantement Sharpness


command /§sword.sharpness:
	trigger:
		open virtual chest inventory with size 1 named "&aSharpness Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aSharpness &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§sh.05"
		format gui slot 2 of player with a emerald named "&aSharpness &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§sh.06"
		format gui slot 3 of player with a emerald named "&aSharpness &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§sh.07"
		format gui slot 5 of player with a emerald named "&aSharpness &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§sh.08"
		format gui slot 6 of player with a emerald named "&aSharpness &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§sh.09"
		format gui slot 7 of player with a emerald named "&aSharpness &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§sh.10"

command /§sh.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 5
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 6
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 7
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 8
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 6
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§sh.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword:
				enchant player's tool with sharpness 10
				send "{@PM} &aVotre épée a désormais l'enchantement &nSharpness&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'épée en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player



#Unbreaking Enchant



command /§all.unbreaking:
	trigger:
		open virtual chest inventory with size 1 named "&aUnbreaking Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aUnbreaking &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§un.01"
		format gui slot 2 of player with a emerald named "&aUnbreaking &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§un.02"
		format gui slot 4 of player with a emerald named "&aUnbreaking &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§un.03"
		format gui slot 6 of player with a emerald named "&aUnbreaking &n4" with lore "&aCoût: &a512 Emeraudes" to run player command "/§un.04"
		format gui slot 7 of player with a emerald named "&aUnbreaking &n5" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§un.05"

command /§un.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 1
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 2
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 3
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.04:
	trigger:
		if player has 512 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 4
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n4&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§un.05:
	trigger:
		if player has 1024 emerald:
			if player's tool is a diamond sword or a golden sword or a wooden sword or a stone sword or a iron sword or wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe or fishing rod or flint and steel or leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with unbreaking 5
				send "{@PM} &aVotre item a désormais l'enchantement &nUnbreaking&r &a&n5&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			
			
#Pickaxe Enchant


command /§pickaxe.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aPickaxe Enchant" to player
		wait a tick
		format gui slot 2 of player with a string named "&aEfficiency" to run player command "/§pickaxe.efficiency"
		format gui slot 4 of player with a diamond named "&aFortune" to run player command "/§pickaxe.fortune"
		format gui slot 6 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"
		
		
		
#Efficiency Enchant



command /§pickaxe.efficiency:
	trigger:
		open virtual chest inventory with size 1 named "&aEfficiency Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aEfficiency &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§ef.05"
		format gui slot 2 of player with a emerald named "&aEfficiency &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§ef.06"
		format gui slot 3 of player with a emerald named "&aEfficiency &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§ef.07"
		format gui slot 5 of player with a emerald named "&aEfficiency &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§ef.08"
		format gui slot 6 of player with a emerald named "&aEfficiency &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§ef.09"
		format gui slot 7 of player with a emerald named "&aEfficiency &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§ef.10"
command /§ef.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 5
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 6
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 7
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 8
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 9
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§ef.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with efficiency 10
				send "{@PM} &aVotre item a désormais l'enchantement &nEfficiency&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			


#Fortune Enchant



command /§pickaxe.fortune:
	trigger:
		open virtual chest inventory with size 1 named "&aFortune Enchant" to player
		wait a tick
		format gui slot 2 of player with a emerald named "&aFortune &n1" with lore "&aCoût: &a64 Emeraudes" to run player command "/§fo.01"
		format gui slot 4 of player with a emerald named "&aFortune &n2" with lore "&aCoût: &a128 Emeraudes" to run player command "/§fo.02"
		format gui slot 6 of player with a emerald named "&aFortune &n3" with lore "&aCoût: &a256 Emeraudes" to run player command "/§fo.03"
		
		
command /§fo.01:
	trigger:
		if player has 64 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 1
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n1&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fo.02:
	trigger:
		if player has 128 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 2
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n2&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§fo.03:
	trigger:
		if player has 256 emerald:
			if player's tool is a wooden axe or stone axe or golden axe or iron axe or diamond axe or wooden pickaxe or stone pickaxe or golden pickaxe or iron pickaxe or diamond pickaxe or wooden shovel or stone shovel or golden shovel or iron shovel or diamond shovel or wooden hoe or stone hoe or golden hoe or iron hoe or diamond hoe:
				enchant player's tool with fortune 3
				send "{@PM} &aVotre item a désormais l'enchantement &nFortune&r &a&n3&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
			
			
#Armor Enchant



command /§armor.enchant:
	trigger:
		open virtual chest inventory with size 1 named "&aArmor Enchant" to player
		wait a tick
		format gui slot 3 of player with a string named "&aProtection" to run player command "/§armor.pro"
		format gui slot 5 of player with a iron block named "&aUnbreaking" to run player command "/§all.unbreaking"
		
#Protection Enchant


command /§armor.pro:
	trigger:
		open virtual chest inventory with size 1 named "&aProtection Enchant" to player
		wait a tick
		format gui slot 1 of player with a emerald named "&aProtection &n5" with lore "&aCoût: &a64 Emeraudes" to run player command "/§po.05"
		format gui slot 2 of player with a emerald named "&aProtection &n6" with lore "&aCoût: &a128 Emeraudes" to run player command "/§po.06"
		format gui slot 3 of player with a emerald named "&aProtection &n7" with lore "&aCoût: &a256 Emeraudes" to run player command "/§po.07"
		format gui slot 5 of player with a emerald named "&aProtection &n8" with lore "&aCoût: &a512 Emeraudes" to run player command "/§po.08"
		format gui slot 6 of player with a emerald named "&aProtection &n9" with lore "&aCoût: &a1024 Emeraudes" to run player command "/§po.09"
		format gui slot 7 of player with a emerald named "&aProtection &n10" with lore "&aCoût: &a2048 Emeraudes" to run player command "/§po.10"
		
		
command /§po.05:
	trigger:
		if player has 64 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 5
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n5&a !" to player
				remove 64 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 64 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.06:
	trigger:
		if player has 128 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 6
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n6&a !" to player
				remove 128 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 128 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.07:
	trigger:
		if player has 256 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 7
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n7&a !" to player
				remove 256 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 256 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.08:
	trigger:
		if player has 512 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 8
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n8&a !" to player
				remove 512 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 512 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.09:
	trigger:
		if player has 1024 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 9
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n9&a !" to player
				remove 1024 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 1024 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player
command /§po.10:
	trigger:
		if player has 2048 emerald:
			if player's tool is a leather helmet or leather chestplate or leather leggings or leather boots or iron helmet or iron chestplate or iron leggings or iron boots or diamond helmet or diamond chestplate or diamond leggings or diamond boots or golden helmet or golden chestplate or golden leggings or golden boots:
				enchant player's tool with protection 10
				send "{@PM} &aVotre item a désormais l'enchantement &nProtection&r &a&n10&a !" to player
				remove 2048 emerald from player
			else:
				send "{@PR} &cTu dois tenir l'item en question dans tes mains !" to player
		else:
			set {_emerald} to amount of emerald in player's inventory
			set {_calcul} to 2048 - {_emerald}
			send "{@PR} &cIl te manque %{_calcul}% &cémeraudes &c!" to player

Sur nos serveur local tout marche, cependant sur notre machine non... Avez-vous une idée ? Merci à vous !

 

EDIT: Seul les menus des prixs des enchantements: fire aspect, fortune, efficiency ne marchent pas le reste marche ! 

 

  • 0
Posté(e)

Je pense que le skript est trop long. Faudrait comme dit précédemment que tu fasses la transaction manuellement des syntaxes SkQuery vers Tuske. En passant, utilisez des spoilers si les codes sont trop long ^^

  • 0
Posté(e)
Le 10/07/2019 à 19:01, Milwen a dit :

Bonjour,

Malgré quelque recherche toujours aucune issues.

Une idée ?

Bonjour,


Le problème étant que la syntaxe a été refaite manuellement ^^'

En outre, j'ai déjà tenté de séparé le skript en plusieurs partis en vint. Darkmariosan l'a aussi séparé de A à Z.

 

Merci d'avance.

  • 0
Posté(e)
à l’instant, KneaXy a dit :

Tu devrais refaire tout tes menus avec l'add-on TuSKe.
open virtual chest to player...
gui slot... 

etc 😉 

C'est exactement ce que l'on a déjà fait  3 fois... ^^'

  • 0
Posté(e)

Si c'est ça le problème c'est effectivement un bug de SkQuery et faut basculer sur Tuske. le soucis c'est qu'il faut vraiment tout mettre sous tuske et le faire manuellement, check si on a pas foiré une syntaxe, des espaces, des : etc...

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.