Solved Open a GUI in a GUI using skQuery?

  • 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!

Status
Not open for further replies.

notblueblob67

Member
Sep 13, 2019
40
1
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:
command /example:
  trigger:
    open chest to player named "This is an example."
    format slot 0 of player to book named "Press here" to close then run "/example2"

# Imagine /example2 will open another GUI
In this case, I want another GUI to open after pressing a book.
Code:
command /example:
  trigger:
    open chest to player named "This is an example."
    format slot 0 of player to book named "Press here" to <here is where i need help>

Please help meeeeeeee thnx
 
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:
 
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:
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?
 
That is exactly what I dont want.

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





Not sure if that'd work with skQuery. Might wanna try TuSKe. But, I'm not too good with skQuery GUIs either.
Do I need another Addon for this or is it a feature of Skript or skQuery?

(ahh it's stuck as a quote)
 
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:
 
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:
This works but I am trying not to use this for simplicity sake.
[doublepost=1573906112,1573906058][/doublepost]
close player's inventory
open chest with 3 rows named "bruh" to player
Haven't tested, but looks like it'll work. I'll let you know if it doesn't work, thank you.
[doublepost=1573906148][/doublepost]
close player's inventory
open chest with 3 rows named "bruh" to player
Actually, could you list an example of how you'd use that? It's confusing me slightly.
 
You could do that you add multiple commands when you click a item like this:

Code:
command /inv [<text>]:
 trigger:
  open chest with 1 row named "Inv1" to sender
  wait a tick
  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:
command /inv [<text>]:
 trigger:
  open chest with 1 row named "Inv1" to sender
  wait a tick
  format slot 0 of sender with dirt named "&bRandom item" to close then run [make sender execute command "sduifhsydfugzonhi"]

command /sduifhsydfugzonhi:
 trigger:
  open chest with 2 rows named "Inv2" to sender
  wait a tick
  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:
 
Last edited:
You could do that you add multiple commands when you click a item like this:

Code:
command /inv [<text>]:
 trigger:
  open chest with 1 row named "Inv1" to sender
  wait a tick
  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:
command /inv [<text>]:
 trigger:
  open chest with 1 row named "Inv1" to sender
  wait a tick
  format slot 0 of sender with dirt named "&bRandom item" to close then run [make sender execute command "sduifhsydfugzonhi"]

command /sduifhsydfugzonhi:
 trigger:
  open chest with 2 rows named "Inv2" to sender
  wait a tick
  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:
Ty, this has helped me. I was hoping not to do it this way, but this is the best way to do it from the responses. :emoji_grinning:
 
Status
Not open for further replies.