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.

Closing a Menu and running a command

Discussion in 'Skript' started by SlackPlaysMC, Jan 22, 2018.

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

    SlackPlaysMC Member

    Joined:
    Jul 18, 2017
    Messages:
    20
    Likes Received:
    0
    So I have recently started coding skript, and i just made a gui where I can choose kits, and I wanted to make many different pages for it, so I coded this.

    Code (Skript):
    1. on right click:
    2.     if held item is iron sword named "&eKit Selector &7(Right Click)":
    3.         open chest with 3 rows named "&eKit Selector" to player
    4.         wait 1 tick
    5.        
    6.         format slot 2 of player with iron helmet named "&eKit &aPvP" to close then run [execute the player command "/kitPvP"]
    7.         format slot 4 of player with diamond chestplate named "&eKit &cTank" to close then run [execute the player command "/kitTank"]
    8.         format slot 6 of player with bow named "&eKit &bArcher" to close then run [execute the player command "/kitArcher"]
    9.         format slot 11 of player with iron sword named "&eKit &6Combo" to close then run [execute the player command "/kitCombo"]
    10.         format slot 13 of player with diamond helmet named "&eKit &dDonator" to close then run [execute the player command "/kitDonor"]
    11.        
    12.        
    13.         format slot 17 of player with green stained glass named "&aNext Page" to close then run [execute the player command "/KitsPageTwo"]
    14.  
    15.        
    16. command /KitsPageTwo:
    17.     trigger:
    18.         open chest with 3 rows named "&eKit Selector" to player
    19.         wait 1 tick
    20.        
    21.         format slot 2 of player with diamond helmet named "&eKit &dDonator" to close then run [execute the player command "/kitMaster"]
    But when I open it in-game using the kit selector, I click the Next Page button but it just closes the menu and does nothing.
     
  2. Syst3ms

    Addon Developer

    Joined:
    Jan 24, 2017
    Messages:
    191
    Likes Received:
    22
    Use TuSKe for GUIs please, skQuery's are horrendously bugged.
     
  3. SlackPlaysMC

    SlackPlaysMC Member

    Joined:
    Jul 18, 2017
    Messages:
    20
    Likes Received:
    0
    Is it the same code as skript or is it different? if its different I have no idea how to use it because ive never heard of it in my life
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Use this guide for Tuske. I recommend the advanced gui, I find it easier to use and more versatile.
    https://github.com/Tuke-Nuke/TuSKe/wiki/GUI-Manager
     
  5. SlackPlaysMC

    SlackPlaysMC Member

    Joined:
    Jul 18, 2017
    Messages:
    20
    Likes Received:
    0
    im still having troubles understanding the guide.. :emoji_stuck_out_tongue:
     
  6. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    It's very step by step. So I would take the time to read through it carefully and then come back with specific questions after you've done some testing yourself. Skript is best learned hands on.
     
  7. SlackPlaysMC

    SlackPlaysMC Member

    Joined:
    Jul 18, 2017
    Messages:
    20
    Likes Received:
    0
    its not skript, i know skript pretty well, i just don't understand tuSKe
     
  8. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Tuske is an addon of skript. The language is the same. Again, that guid is very step by step. But with some google you can find others.
    Take the time to try to understand it.
    I can help with specific questions, but I'm not going to try and teach you the whole addon, lol, thats what the guide is for
     
  9. SlackPlaysMC

    SlackPlaysMC Member

    Joined:
    Jul 18, 2017
    Messages:
    20
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...