Custom head items that keep names/lore on place/break

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

mc732

Member
Mar 22, 2018
1
0
0
Category:
Game mechanics?

Suggested name:
I'm not good with clever names..

What I want:
I have a custom item which is a textured playerhead(397:3). When placed on the ground it loses it's name, lore, etc. It becomes "Head" or "Custom head - no owner"
Can Skript keep track of the custom data, and apply it to the head when it is placed, or broken and picked up?
I am working on learning Skript, but this is more complicated than I am ready for.


Ideas for commands:
No commands needed

Ideas for permissions:
No permissions required, at least for my needs

When I'd like it by:
A reasonable time.
 
Last edited:
You can try adding data to a variable when placing the block:
code_language.skript:
on place:
    #check for skull etc
        set {skull.name.%location of event-block%} to "%name of player's tool%}
        set {skull.lore.%location of event-block%} to "%lore of player's tool"

on break:
    if {skull.name.%location of event-block%} is set:
        cancel event
        set {_name} to {skull.name.%location of event-block%}
        set {_lore} to {skull.lore.%location of event-block%}
        drop 397:3 named "%{_name}%" with lore "%{_lore}%" at location of event-block
        delete {skull.name.%location of event-block%}
        delete {skull.lore.%location of event-block%}
[doublepost=1522316237,1522316126][/doublepost]There might be some typos in the code, its because I made it on my phone :emoji_stuck_out_tongue:
 
  • Like
Reactions: mc732