Solved Getting the name of a Skull

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

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

DonaldTrump

Member
Feb 6, 2017
14
1
0
I need something that messages the skull owner's name of a skull palced on the ground when rightclicked. Can anybody help?
 
code_language.skript:
on rightclick:
    clicked block is floor head or _mob_head_block
    set {_x} to "%nbt of clicked block%"
    set {_x::*} to {_x} split at "Name:"
    set {_x::*} to {_x::2} split at """"
    set {_skullowner} to {_x::2}
    send "%{_skullowner}%"
 
Or:
code_language.skript:
on rightclick on floor head:
    set {_nbt} to nbt of clicked block
    set {_owner} to "%tag ""SkullOwner"" of {_nbt}%"
    #Now {_owner} should have the skull owner's name of the head, need of skStuff.
 
  • Like
Reactions: DonaldTrump
code_language.skript:
on rightclick:
    clicked block is floor head or _mob_head_block
    set {_x} to "%nbt of clicked block%"
    set {_x::*} to {_x} split at "Name:"
    set {_x::*} to {_x::2} split at """"
    set {_skullowner} to {_x::2}
    send "%{_skullowner}%"

This one works, thank you very much!
 
Status
Not open for further replies.