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.

unnamed ironsword reacts to named ironsword condition

Discussion in 'Skript' started by thecodingninja, Oct 12, 2021.

  1. thecodingninja

    thecodingninja New Member

    Joined:
    Oct 10, 2021
    Messages:
    8
    Likes Received:
    0
    I am making a wither dagger, but unamed ironswords reacts to ironswords named wither dagger, but iron swords that is named something other than iron sword doesn't react as a wither dagger


    Code (Text):
    1. on damage:
    2.     if attacker is holding an iron_sword named "<green>Wither dagger":
    3.         if unix date of ((metadata tag "cooldown4" of attacker) ? 0) wasn't less than 2 seconds ago:
    4.             set metadata tag "cooldown4" of attacker to unix timestamp of now
    5.             apply wither 1 to victim for 4 seconds
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    You could just check the uncolored name like
    uncolored name of attacker's tool is "Wither dagger"
     

Share This Page

Loading...