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 our 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.

Open a GUI in a GUI using skQuery?

Discussion in 'Skript' started by notblueblob67, Oct 26, 2019.

  1. notblueblob67

    notblueblob67 Active Member

    Joined:
    Sep 13, 2019
    Messages:
    29
    Likes Received:
    0
    Hi

    I want to have a GUI which if u press an item in the GUI it'll open another one, sort of a menu swapper type thing without having to run another command (I use skQuery and would prefer not to get TusKe bc it'll complicate things on my server lol)

    Example of this:
    Code (Text):
    1. command /example:
    2.   trigger:
    3.     open chest to player named "This is an example."
    4.     format slot 0 of player to book named "Press here" to close then run "/example2"
    5.  
    6. # Imagine /example2 will open another GUI
    In this case, I want another GUI to open after pressing a book.
    Code (Text):
    1. command /example:
    2.   trigger:
    3.     open chest to player named "This is an example."
    4.     format slot 0 of player to book named "Press here" to <here is where i need help>
    Please help meeeeeeee thnx
     
  2. Balivok

    Balivok Member

    Joined:
    Oct 28, 2019
    Messages:
    3
    Likes Received:
    0
    command /example:
    trigger:
    open chest with 3 rows named "This is an example." to player
    wait 1 tick
    format slot 0 of player with book named "press here" to close then run [execute console command "random command"]


    thats it :emoji_slight_smile:
     
  3. notblueblob67

    notblueblob67 Active Member

    Joined:
    Sep 13, 2019
    Messages:
    29
    Likes Received:
    0
    That is exactly what I dont want.

    Yes, ik this works but I want it to OPEN another GUI, without creating another command.

    Do I need another Addon for this or is it a feature of Skript or skQuery?
     
  4. EthanTehWeirdo

    Joined:
    Sep 9, 2019
    Messages:
    2
    Likes Received:
    0
    (ahh it's stuck as a quote)
     
  5. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    173
    Likes Received:
    9
    close player's inventory
    open chest with 3 rows named "bruh" to player
     
  6. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    I have the same issue with this but I think this is a fix to it

    command /shop:
    permission: shop.gui
    permission message: &cYou don't have the required permission to perform this action.
    aliases: shops shop.gui
    trigger:
    open chest with 1 row named "&c&lShop" to player
    format slot 0 of player with grass block named "&e&lBuilding" to run [make player execute command "/buildingshop"]

    command /buildingshop:
    trigger:
    open chest with 6 rows named "&e&lBuilding &0- Page 1" to player


    I don't know if this would work but I gave it my best shot :emoji_slight_smile:
     
  7. notblueblob67

    notblueblob67 Active Member

    Joined:
    Sep 13, 2019
    Messages:
    29
    Likes Received:
    0
    This works but I am trying not to use this for simplicity sake.
    --- Double Post Merged, Nov 16, 2019 at 12:08 PM, Original Post Date: Nov 16, 2019 at 12:07 PM ---
    Haven't tested, but looks like it'll work. I'll let you know if it doesn't work, thank you.
    --- Double Post Merged, Nov 16, 2019 at 12:09 PM ---
    Actually, could you list an example of how you'd use that? It's confusing me slightly.
     
  8. Ronnoc2w

    Ronnoc2w Member

    Joined:
    Feb 20, 2019
    Messages:
    5
    Likes Received:
    0
    You could do that you add multiple commands when you click a item like this:

    Code (Text):
    1. command /inv [<text>]:
    2.  trigger:
    3.   open chest with 1 row named "Inv1" to sender
    4.   wait a tick
    5.   format slot 0 of sender with dirt named "&bRandom item" to close then run [wait a tick]->[open chest with 2 rows named "Inv2" to sender]->[wait a tick]->[format slot 2 of sender with dirt named "&3Im a dirt" to be unstealable]
    Should work like that but you can't use an other command in your other GUI now!

    //EDIT

    Just tested it. Does not work why don't do a other command that is pretty silly so other players can't figure it out like this:

    Code (Text):
    1. command /inv [<text>]:
    2.  trigger:
    3.   open chest with 1 row named "Inv1" to sender
    4.   wait a tick
    5.   format slot 0 of sender with dirt named "&bRandom item" to close then run [make sender execute command "sduifhsydfugzonhi"]
    6.  
    7. command /sduifhsydfugzonhi:
    8.  trigger:
    9.   open chest with 2 rows named "Inv2" to sender
    10.   wait a tick
    11.   format slot 2 of sender with grass named "&3Im a grass :D" to be unstelable
    WARNING!!
    To make it even harder to figure the command out, disable tab complete!
    How to disable:
    edit the spigot.yml file.
    under tab-complete the value will be normally 0!
    edit it to -1 then you can't tab complete anymore!
    Should look like this: tab-complete: -1
    Good Luck :emoji_grinning:
     
    #8 Ronnoc2w, Nov 16, 2019 at 8:41 PM
    Last edited: Nov 17, 2019 at 7:41 AM
Loading...