looking for naming items skript.

Discussion in 'Skript' started by Andrew112G, Jul 27, 2018.

  1. Hello. I am looking for a skript that permanently names an item. An example:
    if a player smelts a diamond ore, it automatically names the diamond to high quality metal.
     
  2. Try this
    On smelt:
    If event-item is a diamond (or diamond ore I’m not sure)
    Set name of event-item to “name”
     
  3. I don't think 'set name' will work on items, so try this instead
    Code (Text):
    set display name of event-entity to "name"
     
  4. There is no entity when melting (apart from the player, if it's there)
     
  5. Okay so my first idea didn't work. This was trickier than I expected.
    Anyways I tested this out. It may not be the "Cleanest" code, but it works
    Code (Text):
    on smelt:
        if ore slot of event-block is diamond ore:
            if result slot of event-block is not diamond named "&7HIGH QUALITY METAL":
                wait 1 tick
                remove 1 diamond from result slot of event-block
                add 1 of diamond named "&7HIGH QUALITY METAL" to result slot of event-block
            else:
                remove 1 of diamond ore from ore slot of event-block
                add 1 of diamond named "&7HIGH QUALITY METAL" to result slot of event-block
     
    • Agree Agree x 1