Solved Set Custom Head

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

zainmz

Member
Apr 29, 2017
22
1
0
24
I would like to set the hotbar slot 8 to a custom head, is it possible to do that? If so how would i do it?
 
You need the NBT of the Skull or a name of a player:

NBT:
code_language.skript:
player head with custom nbt "[NBT]"

Name:
code_language.skript:
set {_} to "[PLAYERNAME]" parsed as offline player
{_}'s skull

Slots:

3d5ceb0e4998f49be1771df5d1bb62d6c68ebb41

code_language.skript:
set slot [SLOT] of player's inventory to [ITEM]
 
  • Like
Reactions: zainmz
You need the NBT of the Skull or a name of a player:

NBT:
code_language.skript:
player head with custom nbt "[NBT]"

Name:
code_language.skript:
set {_} to "[PLAYERNAME]" parsed as offline player
{_}'s skull

Slots:

3d5ceb0e4998f49be1771df5d1bb62d6c68ebb41

code_language.skript:
set slot [SLOT] of player's inventory to [ITEM]
it says cannot set the item is neither an item or an item stack
 
Can we sewed your code?
code_language.skript:
on join:
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "{display:{Name:"Telephone"},SkullOwner:{Id:"771d5dce-a046-4f34-972e-d6ed5abe0e6a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0="}]}}}"
[doublepost=1495808810,1495807861][/doublepost]i guess its something wrong with the nbt, could someone give me an example??
[doublepost=1495809999][/doublepost]Got it working
code_language.skript:
on join:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%"
 
code_language.skript:
on join:
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "{display:{Name:"Telephone"},SkullOwner:{Id:"771d5dce-a046-4f34-972e-d6ed5abe0e6a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0="}]}}}"
[doublepost=1495808810,1495807861][/doublepost]i guess its something wrong with the nbt, could someone give me an example??
[doublepost=1495809999][/doublepost]Got it working
code_language.skript:
on join:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%"
Mark as solved then?
:emoji_stuck_out_tongue:
 
  • Like
Reactions: zainmz