#Inventory click= event happening

1 messages · Page 1 of 1 (latest)

manic bridge
#

command /customitems:
trigger:
open chest inventory with 6 rows named "{@b}" to player
set slot 0 of player's current inventory to stone of unbreaking 1 named "{@a}" with lore "&a1k" with nbt "{HideFlags:61}"

I don't know how to use gui but
So, when you make a gui and click on your own inventory (slot 0 in this case) the effects will happen, idk how to fix it

gloomy latch
#

Any errors?

red minnow
#

i can help

#
    trigger:
        set {_gui} to a new chest inventory with 4 rows with name "Name Here"
        set slot 0 of {_gui} to stone of unbreaking 1 with all flag hidden named "{@a}" with lore "&a1k"
        open {_gui} to player

#on click do effects
on inventory click:
    if name of event-inventory is "Name Here":
        if index of event-slot = 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 20 or 22 or 24 or 25 or 26 or 27 or 28 or 29 or 30 or 31 or 32 or 33 or 34 or 35: 
            cancel event #this makes it so when the player clicks on theese slots they cant take it (remove numbers of slots used)
        if index of event-slot = 0:
            give player 1 stone #do effects here. there might be a better way but this is how i do it```