#wont set item in the function

1 messages · Page 1 of 1 (latest)

royal elm
#
    set metadata tag "enchantingGUI" of {_p} to chest inventory with 6 rows named "&0&lEnchanting"
    set {_x} to 0
    #set background of enchantingGUI
    loop 54 times:
        set slot {_x} of metadata tag "enchantingGUI" of {_p} to black stained glass pane named " "
        add 1 to {_x}
    if {enchantSlot::%{_p}'s uuid%} is false:    
        set slot 13 of metadata tag "enchantingGUI" of {_p} to white stained glass pane named "&fEmpty Enchanting Slot" with lore "&7Left Click a enchantable item to enchant"
    set slot 20,21,22,23, and 24 of metadata tag "enchantingGUI" of {_p} to magenta stained glass pane named " "
    set slot 28 of metadata tag "enchantingGUI" of {_p} to enchanted book named "&fFortune" with lore "&7Level: 1"
    
    open (metadata tag "enchantingGUI" of {_p}) to {_p}
    
on inventory click:
    if event-inventory = (metadata tag "enchantingGUI" of player):
        cancel event
        if index of event-slot is 1:
            send "test" to player
            
            
on inventory click: 
    cancel event
    if event-item is {customItem::tool::woodenPickaxe}:
        send "test" to player
        set {enchantSlot::%player's uuid%} to true
        send "%{enchantSlot::%player's uuid%}%"
        set slot 13 of metadata tag "enchantingGUI" of player to {customItem::tool::woodenPickaxe}
        close inventory of player
        enchantingGUI(player)```
#

so basically on inventory click it wont set slot 13 of metadatat tag "enchantingGUI" of player to the item

fleet hill
#

Well, it does, its just your function reverts it