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.

Solved Gui in Gui Not working :(

Discussion in 'Skript' started by devsucs, Jul 1, 2020.

  1. devsucs

    devsucs Member

    Joined:
    Jul 1, 2020
    Messages:
    4
    Likes Received:
    0
    hello i am trying to make a gui open another gui but for some reason it just closes the first gui i have made an example with 2 options of command execution i tryed and did not work for me i did allsoo check if everything was okey with the alinement and that did just be fine no problems with that help me please
    Code (Text):
    1. command /examplecommand:
    2.     trigger:
    3.         open chest with 3 rows named "Shops" to player
    4.         format slot 10 of player with iron sword named "combat shop" to close then run [make player execute command "/combatshop"]
    5.         format slot 12 of player with oak sapling named "farm shop" to close then run [execute player command "/farmshop"]


     
  2. Best Answer:
    Post #7 by devsucs, Jul 7, 2020 at 2:33 AM
  3. Baezor

    Baezor Member

    Joined:
    Jan 3, 2020
    Messages:
    14
    Likes Received:
    3
    Hello, I would suggest using functions to create guis. You can call upon a function and open a new gui inside of a gui. I also recommend using TuSKe for guis.
     
  4. devsucs

    devsucs Member

    Joined:
    Jul 1, 2020
    Messages:
    4
    Likes Received:
    0
    can you show an example that would rlly help!
     
  5. egamer3000

    egamer3000 Active Member

    Joined:
    Nov 25, 2019
    Messages:
    34
    Likes Received:
    6
    TuSKe is glitchy, a lot of the times it flat out acts like a chest where you can just take items. Use vanilla GUIs.

    They won't really work on Minehut, as 1.14+ has messed them up a bit, and to fix it you need Skript-mirror, but chances are you're not on Minehut.

    Here's how to use them:
    Code (Text):
    1. command /example:
    2.     trigger:
    3.         open chest inventory with 1 row named "&euwu" to player
    4.         set slot 0 of player to diamond ore named "Example"
    5. on inventory click:
    6.     if event.getView().getTitle() == "&euwu": # it's this, or getTitle().getView(), i dont remember 1000%.
    7.         # here is the way I like to do it:
    8.         if index of event-slot == 0:
    9.             message "Yay!"
    10.         # a more traditional way
    11.         if event-slot == diamond ore named "Example":
    12.             message "Yahoo!"
     
  6. devsucs

    devsucs Member

    Joined:
    Jul 1, 2020
    Messages:
    4
    Likes Received:
    0
    i have my own dedicated server soo hosting is no problem i use paper version 1.15.2
     
  7. egamer3000

    egamer3000 Active Member

    Joined:
    Nov 25, 2019
    Messages:
    34
    Likes Received:
    6
    good, then that script will work.
     
  8. devsucs

    devsucs Member

    Joined:
    Jul 1, 2020
    Messages:
    4
    Likes Received:
    0
    Thanks to:
    I made this little peace of skript that works for me i hope anyone else with this problem is allso helped with this

    here is working code:

    Code (Text):
    1. command /gui:
    2.     trigger:
    3.         open virtual chest inventory with size 3 named "First GUI" to player
    4.         format gui slot 10 of player with book named "seccondgui" to close then run player command "/seccondgui"
    thanks for your help guys!
     
Loading...