player head skin in gui

  • 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.
Feb 4, 2017
71
4
1
could anyone tell me what i have to do to so the player heads displays when i open the gui/inventory? because like it is now it will only display the correct skin when i click on it with the set gui-clicked-item. Im out of ideas i tried adding waits, change syntaxes, etc. the head will never have the right skin if the player is offline
code_language.skript:
command /test <offline player>:
    trigger:
        create a gui with virtual chest with 3 rows:
            set {_uui} to uuid of arg-1
            set {_a} to bungee name of {_uui}
            set {_s} to {_uui} parsed as offline player's skull
            make gui slot 10 with {_s} named "&b%{_a}%":
                add 1 to {public::%player%}
                if {public::%player%} is odd:
                    set gui-clicked-item to compass
                else:
                    set gui-clicked-item to {_s} named "&b%{_a}%"
        open last created gui to player

the messing around with bungee uuid and stuff were also just attempts to display the head as soon as the inventory opens, didnt work tho. also delays didnt help, i always have to click the damn slot so the head updates
 
Last edited:
You don't use the uuid of the offline player you use the name of them

code_language.skript:
set {_head} to skull of "LimeGlass" parsed as offlineplayer
give player {_head}
Also when using these

code_language.skript:
set {_uui} to uuid of arg-1
set {_a} to bungee name of {_uui}
It's best to not use Spigot's uuid but rather

bungeecord uuid of player

because the UUID from Spigot is most likely a generated UUID because the server is offline. Bungeecord is your online mode.
 
I tried both ways and both only set the right texture after that gui click Event happened
 
I tried both ways and both only set the right texture after that gui click Event happened
Well that's what it is designed todo. Everything in that trigger after is what happens when it executes. I use set slot as it's way better, but you can ask the developer of Tuske to help you with that.
 
Well that's what it is designed todo. Everything in that trigger after is what happens when it executes. I use set slot as it's way better, but you can ask the developer of Tuske to help you with that.
Uhhh no that's not how it works. He formatted the slot with the player's skull so there's no reason to why the texture isn't correct at first
 
Well that's what it is designed todo. Everything in that trigger after is what happens when it executes. I use set slot as it's way better, but you can ask the developer of Tuske to help you with that.

Set slot? i was trying to use that but it didnt work and it kinda isnt anywhere to find on skunity, the docs tuske generated or skelletts syntax.yml ...
also, why is it better?
 
Set slot? i was trying to use that but it didnt work and it kinda isnt anywhere to find on skunity, the docs tuske generated or skelletts syntax.yml ...
also, why is it better?
Here is an example of what you want done.

code_language.skript:
command /test <offline player>:
    trigger:
        set {_i} to a chest with 3 rows named "&4&lExample"
        set {_skull} to skull of arg 1
        set slot 10 of {_i} to {_skull} named "&b%arg 1%"
        open {_i} to player
on inventory click:
    if inventory name of player's current inventory is "&4&lExample":
        cancel event
        if clicked inventory is not player's inventory:
            add 1 to {public::%player%}
            if {public::%player%} is odd: #or you can use #if {public::%player%} mod 2 is 1:
                set clicked item to compass
                play sound block anvil use with pitch at player to player #Skript dev-28+
If you would like explaining of how something works feel free to ask.

And here is an example of a bungeecord player teleporter. You may be doing something similar, either way if people try to search for something like this on the forum this will come up.
Using Skellett and SkellettProxy:

code_language.skript:
command /bungeemenu:
    trigger:
        set {_size} to 1
        loop 6 times:
            if size of all bungeecord players is within row loop-number:
                set {_size} to loop-number
                exit loop
        set {_i} to a chest with {_size} rows named "&4&lBungee player list"
        set {_slot} to 0
        loop all bungeecord servers:
            loop all players on bungeecord server "%loop-value%":
                set slot {_slot} of {_i} to skull of loop-offlineplayer named "&6&l%loop-offlineplayer%" with lore "&cServer: &r%loop-value-1%||&7Click to teleport to their server."
                add 1 to {_slot}
                if {_slot} > inventory size of {_i}:
                    exit loop #Add support for multiple pages with a page option here if you need.
        open {_i} to player
on inventory click:
    if inventory name of player's current inventory is "&4&lBungee player list":
        cancel event
        if clicked inventory is not player's inventory:
            if clicked item is set:
                set {_player} to uncoloured name of clicked item
                loop all bungeecord servers:
                    if lore 1 of clicked item contains "%loop-value-1%":
                        set {_server} to loop-value-1
                        exit loop
                message "&8[&6Bungee&8] &aYou have been connected to %{_player}%'s server %{_server}%"
                connect uuid "%bungeecord uuid of player%" to bungeecord server {_server}
 
@mel_instagibson Oh and by the way, both of our divergent opinions are very one-sided, so I suggest you try each one of them first, possibly mixing up the two. Also, what happens to the skull when you open the gui the first time ?
[doublepost=1499983650,1499983586][/doublepost]Each code made in one system can be made using the other and vice-versa, too
 
This is a issue regardless of the method to make guis.

I saw the same issue happening with 1.12 which I really don't know a fix for that, since it randomly happens, for some works and some not. Even updating the inventory ticks later it doesn't update the skull unless you click on the item or uses it.

Again, not a issue with TuSKe and its GUI. The only way I see is to get that updated skull and store to a variable, but it is not reliable since it is for random offline players.
 
This is a issue regardless of the method to make guis.

I saw the same issue happening with 1.12 which I really don't know a fix for that, since it randomly happens, for some works and some not. Even updating the inventory ticks later it doesn't update the skull unless you click on the item or uses it.

Again, not a issue with TuSKe and its GUI. The only way I see is to get that updated skull and store to a variable, but it is not reliable since it is for random offline players.
I use 1.12 never knew this existed or noticed?
 
Status
Not open for further replies.