1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I give a Item from GUI to player (SkQuery)

Discussion in 'Skript' started by Daskomiko, Aug 25, 2021.

Thread Status:
Not open for further replies.
  1. Daskomiko

    Daskomiko New Member

    Joined:
    Apr 23, 2021
    Messages:
    6
    Likes Received:
    0
    Hey I have a question:
    I'm trying to open a GUI with random items and the item that you click on should be given to the player. How do I do that? It doesn't work with me. This is my code:


    command /randomitems:
    trigger:
    wait 1 tick
    open chest with 1 rows named "Such dir ein Item aus" to player
    wait 1 tick
    format slot 0 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 1 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 2 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 3 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 4 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 5 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 6 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 7 of player with a random element out of all items to run [execute console command "custom-command"]
    format slot 8 of player with a random element out of all items to run [execute console command "custom-command"]

    on inventory click:
    if inventory name of player's current inventory is "Such dir ein Item aus":
    if event-item is not barrier:
    give event-item to player

    command /custom-command:
    trigger:
    send "" to player
     
  2. barrybtw

    barrybtw Active Member

    Joined:
    Jun 8, 2021
    Messages:
    82
    Likes Received:
    6
    Don't use SkQuery.
     
  3. Daskomiko

    Daskomiko New Member

    Joined:
    Apr 23, 2021
    Messages:
    6
    Likes Received:
    0
  4. barrybtw

    barrybtw Active Member

    Joined:
    Jun 8, 2021
    Messages:
    82
    Likes Received:
    6
    I think all proficient skripters would agree with me, that SkQuery's GUI manager is terrible and buggy and a bad user experience. Right @Runakai :emoji_innocent:
     
    • Agree Agree x 1
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Vanilla GUIs or at least skript-gui for the win!
     
  6. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Did you tag me omg
    --- Double Post Merged, Aug 28, 2021, Original Post Date: Aug 28, 2021 ---
    I like this man
     
    • Winner Winner x 1
  7. barrybtw

    barrybtw Active Member

    Joined:
    Jun 8, 2021
    Messages:
    82
    Likes Received:
    6
    Any day of the week.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...