How to change GUI name / title?

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

pepper82

Member
Jan 26, 2017
272
1
18
Hi all,
how would I change the name of the player's currently open inventory?
 
code_language.skript:
set name of player's current inventory to "Toaster"
:emoji_bread:
 
Thanks but it does not work. No error though.

I make the gui slot like this:

make a gui slot {_i} of {_p} with redstone named "%{_debug}%" to run function openBox(player, {_i}, {_maxcash}) using "left" click

and in the function openBox I tried this:
set name of {_p}'s current inventory to "&6Noch &e%{_rest}% &6Truhen!"
 
Well, are you trying to format an item in a GUI or in a player's inventory
 
here the code:

skellett open "CHEST" with 5 rows named "&6TEST" to player
...
make a gui slot {_i} of {_p} with redstone named "%{_debug}%" to run function openBox(player, {_i}, {_maxcash}) using "left" click

and the effect in the function I already posted.

Trying to format stuff in a GUI
 
use TusKE Advanced. Using that method for creating a GUI, you wont ever be able to change the name of the inventory while it is currently opened..

Haven't test it but...
code_language.skript:
command /toaster:
    trigger:
        open virtual chest inventory with size 4 named "This is a Toaster" to player
            format gui slot 0 with 1 potato named "This is Bread":
                broadcast "I like Toast, instead"
            if {BreadPreference::%player's uuid%} is "Toasted":
                set name of player's current inventory to "I Like Toasty"
            else if {BreadPreference::%player's uuid%} is "Crispy":
                set name of player's current inventory to "Crispy Toast is the Best"
            else if {BreadPreference::%player's uuid%} is "Burnt":
                set name of player's current inventory to "What is wrong with you!"
 
here the code:

skellett open "CHEST" with 5 rows named "&6TEST" to player
...
make a gui slot {_i} of {_p} with redstone named "%{_debug}%" to run function openBox(player, {_i}, {_maxcash}) using "left" click

and the effect in the function I already posted.

Trying to format stuff in a GUI
why are you using Skellett for opening chests and TuSKe for formatting slots? lol

You can use TuSKe to open inventories:
code_language.skript:
open virtual chest inventory with 5 rows named "<orange>TEST" to player
Also, you can set the display name of an inventory if you're using bensku's fork like this:
code_language.skript:
set display name of top inventory to "whatever"
and if you aren't using it, you can use skQuery:
code_language.skript:
set inventory name of player's current inventory to "whatever"
 
None of these options work:

Q85lDlA.png


Yes I am using benskus fork (Loading Skript v2.2-dev32d)

EDIT:
well this code works
code_language.skript:
set inventory name of player's current inventory to "whatever"
BUT only once. After executing this code I am able to bug items out of the gui.
 
Status
Not open for further replies.