unnamed ironsword reacts to named ironsword condition

  • 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.
Oct 10, 2021
12
0
1
23
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:
on damage:
    if attacker is holding an iron_sword named "<green>Wither dagger":
        if unix date of ((metadata tag "cooldown4" of attacker) ? 0) wasn't less than 2 seconds ago:
            set metadata tag "cooldown4" of attacker to unix timestamp of now
            apply wither 1 to victim for 4 seconds
 
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:
on damage:
    if attacker is holding an iron_sword named "<green>Wither dagger":
        if unix date of ((metadata tag "cooldown4" of attacker) ? 0) wasn't less than 2 seconds ago:
            set metadata tag "cooldown4" of attacker to unix timestamp of now
            apply wither 1 to victim for 4 seconds
You could just check the uncolored name like
uncolored name of attacker's tool is "Wither dagger"
 
Status
Not open for further replies.