auto update lore?

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

Stryff

Member
Mar 14, 2021
15
0
1
18
How would i create a skript where if a player is holding a block of wood that has nbt tag "WOOD:1b" would autimatically set the name to "Updated wood"
 
Try this :emoji_slight_smile:
Code:
on click holding a oak wood:
    remove 1 of oak wood from player's inventory
    give 1 oak wood named "&fUpdated wood" to player
 
Code:
    remove 1 of oak wood from player's inventory
    give 1 oak wood named "&fUpdated wood" to player
That's a bit odd in my opinion, since instead you're removing the block and adding a new one with new lore. I feel like the set lore effect works better here:
code_language.skript:
set lore of player's tool to "&fUpdated wood" # tested on 2.5.3
You could put this into in a loop all players loop, and put that in an every %number% [real] %timespan% event, etc.
 
This hasn't been tested yet, but it'd probably look something like..
code_language.skript:
every 1 real tick: # event not yet tested
    loop all players:
        if loop-player is holding wood:
            set lore of loop-player's tool to "&fUpdated wood"
 
wait i have one more questiuon how would i add an enchantment to an item and hide the flag enchantment ?

like this:

  1. every 1 real tick:
  2. loop all players:
  3. if loop-player is holding wood:
  4. set lore of loop-player's tool to "&fUpdated wood"
  5. enchant item with protection 1
  6. hide flag protection
[doublepost=1623323455,1623323298][/doublepost]oh nevermind i figured it up its just

enchant loop-player's tool with protection 1

but how to hide loop-player's item flag enchantments?
 
Status
Not open for further replies.