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)

Bonsoir,

Le topic est inactif depuis plus de 7 jours. Je lock.

Merci de me contacter en message privé, si tu souhaites rouvrir le topic.

Bonne soirée 🙂 !

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.