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.

Tuske gui opening in another gui

Discussion in 'Skript' started by turtlei, Sep 29, 2020.

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

    turtlei Member

    Joined:
    Sep 29, 2020
    Messages:
    3
    Likes Received:
    0
    Hello
    I am using Tuske to make my guis
    How do I script it so that an item inside one gui once clicked redirects to another gui?
    (For example an emerald that says "Next page")

    Thank you
     
  2. Linegrite

    Linegrite Member

    Joined:
    May 22, 2020
    Messages:
    17
    Likes Received:
    3
    Create a function for all guis and call this function, when you need to

    sry for the English, I'm not a native speaker
     
    • Like Like x 1
  3. turtlei

    turtlei Member

    Joined:
    Sep 29, 2020
    Messages:
    3
    Likes Received:
    0
    How do I make a function for this ?
     
  4. Linegrite

    Linegrite Member

    Joined:
    May 22, 2020
    Messages:
    17
    Likes Received:
    3
    Just make function for open gui
     
  5. turtlei

    turtlei Member

    Joined:
    Sep 29, 2020
    Messages:
    3
    Likes Received:
    0
    Ok, when I make my function,
    1. what parameters do I set it to,
    2. and I am trying to put in the items in the slots but I can't because it needs the "of player" in there. But if I leave it in there it will say that there can not be "Player" in function. How do I fix this?

    Note: I am using Tuske for my guis
     
  6. Linegrite

    Linegrite Member

    Joined:
    May 22, 2020
    Messages:
    17
    Likes Received:
    3
    Multi-pages GUI from https://forums.skunity.com/threads/gui-manager-tutorial.2349/

    Code (Text):
    1. function openMenu(p: Player, type: String):
    2.     if {_type} is "page 1":
    3.         open virtual chest inventory with size 1 named "Page 1" to {_p}
    4.         make a gui slot 0 of {_p} with stone named "Go to page 2" to run function openMeny({_p}, "page 2")
    5.     else if {_type} is "page 2":
    6.         open virtual chest inventory with size 1 named "Page 2" to {_p}
    7.         make a gui slot 0 of {_p} with stone named "Go to page 3" to run function openMeny({_p}, "page 3")
    8.    #And so on until ends of page...
    9.     else if {_type} is "page 3":
    10.         open virtual chest inventory with size 1 named "Page 3" to {_p}
    11.         make a gui slot 0 of {_p} with stone named "Go back to page 1" to run function openMeny({_p}, "page 1")
     
  7. acai

    acai Active Member

    Joined:
    Oct 23, 2020
    Messages:
    89
    Likes Received:
    1

    bruh. instead of make a gui slot 0 of {_p}, you need to use this code instead:
    format gui slot 0 of player with [item go here w/o brackets] named "Name go here" to close then run player command "/command go here"
    there you go, also spoonfeed from another reply i made
     
Thread Status:
Not open for further replies.

Share This Page

Loading...