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.

auto update lore?

Discussion in 'Skript' started by Stryff, Jun 6, 2021.

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

    Stryff New Member

    Joined:
    Mar 14, 2021
    Messages:
    9
    Likes Received:
    0
    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"
     
  2. wCrazy_

    wCrazy_ Member

    Joined:
    Jan 7, 2021
    Messages:
    15
    Likes Received:
    0
    Try this :emoji_slight_smile:
    Code (Text):
    1. on click holding a oak wood:
    2.     remove 1 of oak wood from player's inventory
    3.     give 1 oak wood named "&fUpdated wood" to player
     
  3. WhiteWolf

    WhiteWolf Member

    Joined:
    May 2, 2020
    Messages:
    32
    Likes Received:
    2
    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 (Skript):
    1.  
    2. set lore of player's tool to "&fUpdated wood" # tested on 2.5.3
    3.  
    You could put this into in a loop all players loop, and put that in an every %number% [real] %timespan% event, etc.
     
    • Agree Agree x 1
  4. Stryff

    Stryff New Member

    Joined:
    Mar 14, 2021
    Messages:
    9
    Likes Received:
    0
    what would the full code look like?
     
  5. WhiteWolf

    WhiteWolf Member

    Joined:
    May 2, 2020
    Messages:
    32
    Likes Received:
    2
    This hasn't been tested yet, but it'd probably look something like..
    Code (Skript):
    1.  
    2. every 1 real tick: # event not yet tested
    3.     loop all players:
    4.         if loop-player is holding wood:
    5.             set lore of loop-player's tool to "&fUpdated wood"
    6.  
     
  6. Stryff

    Stryff New Member

    Joined:
    Mar 14, 2021
    Messages:
    9
    Likes Received:
    0
    Thanks so much!
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Please mark this thread as solved
     
    • Agree Agree x 1
  8. Stryff

    Stryff New Member

    Joined:
    Mar 14, 2021
    Messages:
    9
    Likes Received:
    0
    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
    --- Double Post Merged, Jun 10, 2021, Original Post Date: Jun 10, 2021 ---
    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?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...