TuSKe Gui help

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

    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.

LukaDukaYT

Member
Sep 23, 2019
11
1
3
Okay so I'm new to TuSKe so bare with me.

I have gui, and I want to change the item permanently for that player and set {essentials.%player%} to "true"
my skript goes like this



command /plugins:
trigger:
open virtual chest inventory with size 3 named "&ePlugins" to player
format gui slot 0 of player with a gray dye named "&6Usefull Commands" with lore "&eAdds /gmc /gms /gma /day /sun etc" to change item to green dye and set {essentials.%player%} to "true"
 
make your format run code, then in that code block, reformat the slot to green dye, and set the that var to true (not "true")

If this doesnt make sense, then please at least read the docs for Tuske GUIs, you need to have a basic understand of how Tuske GUIs work if you want to attempt to do something like this.
 
make your format run code, then in that code block, reformat the slot to green dye, and set the that var to true (not "true")

If this doesnt make sense, then please at least read the docs for Tuske GUIs, you need to have a basic understand of how Tuske GUIs work if you want to attempt to do something like this.
Thanks so much! I'm a fan of your work!
 
You're welcome. You're very kind!
So are you!
[doublepost=1569297030,1569296882][/doublepost]
make your format run code, then in that code block, reformat the slot to green dye, and set the that var to true (not "true")

If this doesnt make sense, then please at least read the docs for Tuske GUIs, you need to have a basic understand of how Tuske GUIs work if you want to attempt to do something like this.
Hmm I'm still having a hard time understanding
 
So are you!
Sometimes :emoji_wink:

Since you are so nice, I'm going to give you a little tiny spoon feed on how to make your code work,

So what you want to do, is format your slot to have it run code (you'll see in a second), in the code block, you're going to reformat that slot to do something else, (ie: changing the item) and doing other stuff (ie: changing the var) ... ps this is all pseudo code meant to teach, not copy paste

code_language.skript:
#here we format our slot (the "to run" part will run the code in the next block when the player clicks it)
format gui slot 1 of player with red dye named "RED DYE" to run:
    #this reformats the same slot after clicking to go green
    format gui slot 1 of player with green dye named "GREEN DYE"
    #this obviously sets the variable to true when the player clicks this
    set {your::var::here} to true
 
Quick question, Does it change the dye permanently and only for that player?
It will only change it for the person who has the GUI open.
When someone else opens the GUI, it opens a whole new GUI object
 
Okay Thank you!
I think I misread your question.
Keep in mind, the second the player closes the GUI, and reopens it, it will reset, in this case, you will need to use conditions

using the last ex but now with conditions:
code_language.skript:
open virtual blah blah to player

#we check if that variable is false
if {your::var::here} is false:
    #if its false, show the red dye
    format gui slot 1 of player with red dye named "RED DYE" to run:
        format gui slot 1 of player with green dye named "GREEN DYE"
        # then when the click it, we make it true (next time they open the gui - see below)
        set {your::var::here} to true
else:
    #else if its true, show them the green dye
    format gui slot 1 of player with green dye named "GREEN DYE"
 
I think I misread your question.
Keep in mind, the second the player closes the GUI, and reopens it, it will reset, in this case, you will need to use conditions

using the last ex but now with conditions:
code_language.skript:
open virtual blah blah to player

#we check if that variable is false
if {your::var::here} is false:
    #if its false, show the red dye
    format gui slot 1 of player with red dye named "RED DYE" to run:
        format gui slot 1 of player with green dye named "GREEN DYE"
        # then when the click it, we make it true (next time they open the gui - see below)
        set {your::var::here} to true
else:
    #else if its true, show them the green dye
    format gui slot 1 of player with green dye named "GREEN DYE"
Also, do you know how to make holograms, sorry that I'm a noob xD
 
Status
Not open for further replies.