Bug GUI

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

XerioTW

Member
Mar 8, 2025
1
0
1
make gui slot 9 with coal ore named "Test" with lore "&7Quantité: %{_count.D}%":
add 1 to {_count.D}
update the player's inventory

I'm trying to update my menu that I created, what I want is when I left-click on the item I can select a number and see that quantity in the item description. Simply, I'm a beginner in skript and I haven't found how to do it, the only clue I found is this but I have an error "inventory of the player is not a blockstate".
 
If I understand, you can do something like this:
Code:
set metadata tag "Menu" of player to chest inventory with 1 row named "&l&7Menu"
set slot 0 of metadata tag "Menu" of player to coal name "Test" with lore "Count: {count::coal::%uuid of player%}"
open metadata tag "Menu" of player to player

on inventory click:
    if event-inventory = (metadata tag "Menu" of player):
        if index of event-slot = 0:
            close inventory of player
            send "Pick a number" to player
            set {nmpicking::%uuid of player%} to true
           
on chat:
    if {nmpicking::%uuid of player%} = true:
        cancel event
        set {count::coal::%uuid of player%} to message
        send "You picked number %message%" to player
        set {nmpicking::%uuid of player%} to false
Its just raw code i just made in 2 minutes, you can inspire and change it.
Hope it helps.