1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Getting the name of a Skull

Discussion in 'Skript' started by DonaldTrump, Mar 23, 2017.

Thread Status:
Not open for further replies.
  1. DonaldTrump

    DonaldTrump Member

    Joined:
    Feb 6, 2017
    Messages:
    14
    Likes Received:
    1
    I need something that messages the skull owner's name of a skull palced on the ground when rightclicked. Can anybody help?
     
  2. Best Answer:
    Post #2 by ShaneBee, Mar 23, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
    Code (Skript):
    1. on rightclick:
    2.     clicked block is floor head or _mob_head_block
    3.     set {_x} to "%nbt of clicked block%"
    4.     set {_x::*} to {_x} split at "Name:"
    5.     set {_x::*} to {_x::2} split at """"
    6.     set {_skullowner} to {_x::2}
    7.     send "%{_skullowner}%"
     
    • Useful Useful x 1
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
    Or:
    Code (Skript):
    1.  
    2. on rightclick on floor head:
    3.     set {_nbt} to nbt of clicked block
    4.     set {_owner} to "%tag ""SkullOwner"" of {_nbt}%"
    5.     #Now {_owner} should have the skull owner's name of the head, need of skStuff.
    6.  
     
    • Like Like x 1
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
    This one works, thank you very much!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...